SlideShare a Scribd company logo
1 of 19
Download to read offline
Test Automation
with

Selenium
Selenium

Selenium automates browsers.
That's it. What you do with that power is entirely up to
you. Primarily it is for automating web applications for
testing purposes, but is certainly not limited to just that.
Boring web-based administration tasks can (and should!)
also be automated as well.
Selenium has the support of some of the largest browser
vendors who have taken (or are taking) steps to make
Selenium a native part of their browser. It is also the core
technology in countless other browser automation tools,
APIs and frameworks.

Source:
http://www.seleniumhq.org/
Selenium 1.0
Selenium IDE

Selenium IDE is a Firefox plugin
which records and plays back
user interactions with the
browser. Use this to either
create simple scripts or assist in
exploratory testing.

It can also export Remote
Control or WebDriver scripts,
though they tend to be
somewhat brittle and should be
overhauled into some sort of
Page Object-y structure for any
kind of resiliency.

Start and Stop
Recording

Script
Editor

Selenium Log
Selenium 1.0 – Remote Control

Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium
merge brought up Selenium 2, the newest and more powerful tool.
Selenium 1 is still actively supported (mostly in maintenance mode) and provides some
features that may not be available in Selenium 2 for a while, including support for several
languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every
browser out there.
Selenium 1.0 – Grid

Selenium-Grid allows the Selenium RC
solution to scale for large test suites and
for test suites that must be run in
multiple environments.
Selenium Grid allows you to run your
tests in parallel, that is, different tests
can be run at the same time on different
remote machines.
This additional server piece allows the
several Remote Control servers to
accessed in parallel by one or more
driving processes. You may want to do
this if you want to use scale to speed
everything up, or because you need to
test on Mac and/or Linux, as well as
Windows from one driving test-suite.
Selenium 2.0 – WebDriver

The primary new feature in Selenium 2.0 is the integration of the WebDriver API.
WebDriver is designed to provide a simpler, more concise programming interface in
addition to addressing some limitations in the Selenium-RC API.

Selenium WebDriver was developed to better support dynamic web pages where
elements of a page may change without the page itself being reloaded.
WebDriver’s goal is to supply a well-designed object-oriented API that provides improved
support for modern advanced web-app testing problems.
Selenium 1.0 vs. 2.0

 Selenium WebDriver makes direct calls to the browser using each browser’s native support
for automation.
 For those familiar with Selenium-RC, this is quite different from what you are used to.
Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript
functions into the browser when the browser was loaded and then used its javascript to
drive the AUT within the browser. WebDriver does not use this technique. Again, it drives
the browser directly using the browser’s built in support for automation.
Selenium WebDriver – Development Environment

 IntelliJ, development environment
 JUnit, unit testing framework
 Maven, build tool
IntelliJ

IntelliJ IDEA is a Java IDE by JetBrains, available as an
Apache 2 Licensed community edition and commercial
edition. It is often simply referred to as "IDEA" or
"IntelliJ"
IntelliJ
JUnit
JUnit is a unit testing framework for the Java
programming language. JUnit has been important in the
development of test-driven development, and is one of
a family of unit testing frameworks which is collectively
known as xUnit that originated with SUnit.

JUnit is linked as a JAR at compile-time; the framework resides under package
junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4
and later.
A JUnit test fixture is a Java object. With older versions of JUnit, fixtures had to
inherit from junit.framework.TestCase, but the new tests using JUnit 4 should not
do this. Test methods must be annotated by the @Test annotation.
JUnit
JUnit

 If you do not use IDE, add a method ‘suite()’, it automatically creates a test suite
including all test methods.

 Then add a main method and use textui runner run all test cases.
Maven
Maven is a build automation tool used primarily for Java projects.
Maven serves a similar purpose to the Apache Ant tool, but it is
based on different concepts and works in a different manner.

Maven uses an XML file to describe the software project being built, its dependencies on
other external modules and components, the build order, directories, and required plugins.

 It comes with pre-defined targets for performing certain well-defined tasks such as
compilation of code and its packaging.
Maven dynamically downloads Java libraries and Maven plug-ins from one or more
repositories such as the Maven 2 Central Repository, and stores them in a local cache.
 This local cache of downloaded artifacts can also be updated with artifacts created
by local projects. Public repositories can also be updated.
.
Maven
Maven projects are configured using a Project Object Model, which is stored in a
pom.xml-file.
This POM only defines a
unique identifier for the
project (coordinates) and its
dependency on the JUnit
framework.
However, that is already
enough for building the project
and running the unit tests
associated with the project.
Maven accomplishes this by
embracing
the idea of
Convention
over
Configuration, that is, Maven
provides default values for the
project's configuration.
Maven

The directory structure of a normal idiomatic Maven
project has the following directory entries:
Selenium Webdriver – Getting Started

How to create a simple Selenium Webdriver test
using

Java, IntelliJ, Junit and Maven
Contact
Bize Ulaşın
info@keytorc.com

blogs.keytorc.com

tr.linkedin.com/in/keytorc

www.twitter.com/Keytorc

Keytorc Software Testing Services

More Related Content

Viewers also liked

ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam Practice
Yogindernath Gupta
 
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test ManagementKeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
Keytorc Software Testing Services
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
Keytorc Software Testing Services
 
EbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDFEbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDF
Ebru Kazaskeroglu
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
Yogindernath Gupta
 
Keynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview PresentationKeynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview Presentation
vprathap
 
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption TheoryKeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
Keytorc Software Testing Services
 
ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2
Yogindernath Gupta
 

Viewers also liked (17)

Web Application Testing
Web Application Testing Web Application Testing
Web Application Testing
 
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolüKeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
 
ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam Practice
 
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test ManagementKeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
 
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan CuellarTestistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
 
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex BlackTestistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
 
EbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDFEbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDF
 
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
 
Istqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingIstqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box Testing
 
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan ŞenKeytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Keynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview PresentationKeynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview Presentation
 
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland LeusdenTestistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
 
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption TheoryKeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
 
ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2
 

More from Keytorc Software Testing Services

Test Data Management - Keytorc Approach
Test Data Management - Keytorc ApproachTest Data Management - Keytorc Approach
Test Data Management - Keytorc Approach
Keytorc Software Testing Services
 
Testing Center of Excellence - Keytorc Approach
Testing Center of Excellence -  Keytorc ApproachTesting Center of Excellence -  Keytorc Approach
Testing Center of Excellence - Keytorc Approach
Keytorc Software Testing Services
 
Performance Testing - Keytorc Approach
Performance Testing - Keytorc ApproachPerformance Testing - Keytorc Approach
Performance Testing - Keytorc Approach
Keytorc Software Testing Services
 

More from Keytorc Software Testing Services (11)

Insights Quarterly - Ekim 2017
Insights Quarterly - Ekim 2017Insights Quarterly - Ekim 2017
Insights Quarterly - Ekim 2017
 
Bir Test Uzmanına Söylenmemesi Gereken Şeyler
Bir Test Uzmanına Söylenmemesi Gereken ŞeylerBir Test Uzmanına Söylenmemesi Gereken Şeyler
Bir Test Uzmanına Söylenmemesi Gereken Şeyler
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
 
Keytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
Keytorc Proje Ekibi Zubizu Sunumu - Miray DoğanKeytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
Keytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
 
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhanKeytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
 
JMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc ApproachJMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc Approach
 
Version Control CheatSheet - Git
Version Control CheatSheet - GitVersion Control CheatSheet - Git
Version Control CheatSheet - Git
 
Selenium 2- Keytorc Test Automation Cheatsheet
Selenium 2- Keytorc Test Automation CheatsheetSelenium 2- Keytorc Test Automation Cheatsheet
Selenium 2- Keytorc Test Automation Cheatsheet
 
Test Data Management - Keytorc Approach
Test Data Management - Keytorc ApproachTest Data Management - Keytorc Approach
Test Data Management - Keytorc Approach
 
Testing Center of Excellence - Keytorc Approach
Testing Center of Excellence -  Keytorc ApproachTesting Center of Excellence -  Keytorc Approach
Testing Center of Excellence - Keytorc Approach
 
Performance Testing - Keytorc Approach
Performance Testing - Keytorc ApproachPerformance Testing - Keytorc Approach
Performance Testing - Keytorc Approach
 

Recently uploaded

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 

Selenium Test Automation - Keytorc Approach

  • 2. Selenium Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well. Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks. Source: http://www.seleniumhq.org/
  • 4. Selenium IDE Selenium IDE is a Firefox plugin which records and plays back user interactions with the browser. Use this to either create simple scripts or assist in exploratory testing. It can also export Remote Control or WebDriver scripts, though they tend to be somewhat brittle and should be overhauled into some sort of Page Object-y structure for any kind of resiliency. Start and Stop Recording Script Editor Selenium Log
  • 5. Selenium 1.0 – Remote Control Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more powerful tool. Selenium 1 is still actively supported (mostly in maintenance mode) and provides some features that may not be available in Selenium 2 for a while, including support for several languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there.
  • 6. Selenium 1.0 – Grid Selenium-Grid allows the Selenium RC solution to scale for large test suites and for test suites that must be run in multiple environments. Selenium Grid allows you to run your tests in parallel, that is, different tests can be run at the same time on different remote machines. This additional server piece allows the several Remote Control servers to accessed in parallel by one or more driving processes. You may want to do this if you want to use scale to speed everything up, or because you need to test on Mac and/or Linux, as well as Windows from one driving test-suite.
  • 7. Selenium 2.0 – WebDriver The primary new feature in Selenium 2.0 is the integration of the WebDriver API. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API. Selenium WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded. WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.
  • 8. Selenium 1.0 vs. 2.0  Selenium WebDriver makes direct calls to the browser using each browser’s native support for automation.  For those familiar with Selenium-RC, this is quite different from what you are used to. Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.
  • 9. Selenium WebDriver – Development Environment  IntelliJ, development environment  JUnit, unit testing framework  Maven, build tool
  • 10. IntelliJ IntelliJ IDEA is a Java IDE by JetBrains, available as an Apache 2 Licensed community edition and commercial edition. It is often simply referred to as "IDEA" or "IntelliJ"
  • 12. JUnit JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit. JUnit is linked as a JAR at compile-time; the framework resides under package junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4 and later. A JUnit test fixture is a Java object. With older versions of JUnit, fixtures had to inherit from junit.framework.TestCase, but the new tests using JUnit 4 should not do this. Test methods must be annotated by the @Test annotation.
  • 13. JUnit
  • 14. JUnit  If you do not use IDE, add a method ‘suite()’, it automatically creates a test suite including all test methods.  Then add a main method and use textui runner run all test cases.
  • 15. Maven Maven is a build automation tool used primarily for Java projects. Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and works in a different manner. Maven uses an XML file to describe the software project being built, its dependencies on other external modules and components, the build order, directories, and required plugins.  It comes with pre-defined targets for performing certain well-defined tasks such as compilation of code and its packaging. Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local cache.  This local cache of downloaded artifacts can also be updated with artifacts created by local projects. Public repositories can also be updated. .
  • 16. Maven Maven projects are configured using a Project Object Model, which is stored in a pom.xml-file. This POM only defines a unique identifier for the project (coordinates) and its dependency on the JUnit framework. However, that is already enough for building the project and running the unit tests associated with the project. Maven accomplishes this by embracing the idea of Convention over Configuration, that is, Maven provides default values for the project's configuration.
  • 17. Maven The directory structure of a normal idiomatic Maven project has the following directory entries:
  • 18. Selenium Webdriver – Getting Started How to create a simple Selenium Webdriver test using Java, IntelliJ, Junit and Maven