SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Toolbox for Selenium Tests in
Java: WebDriverManager and
Selenium-Jupiter
SeleniumConf Tokyo
19/04/2019
Boni García
boni.garcia@urjc.es http://bonigarcia.github.io/
@boni_gg https://github.com/bonigarcia
Boni García
• PhD in Information and Communications Technology from
Technical University of Madrid (UPM) in Spain. Dissertation
focused on software testing with Selenium
• Assistant Professor at King Juan Carlos University (URJC) in
Spain
• Open source software enthusiast. Creator and maintainer
of a number of projects: WebDriverManager, Selenium-
Jupiter, DualSub
• Author of more than 30 research papers in different
journals, magazines, international conferences, and the
book Mastering Software Testing with JUnit 5
Table of contents
WebDriverManager Selenium-Jupiter
Toolbox for Selenium in Java (but not only Java)
WebDriverManager - Motivation
• Selenium WebDriver allows to control different types of
browsers (such as Chrome, Firefox, Opera, Edge, and so on)
programmatically using different programming languages
(Java, JavaScript, Python, C#, …)
• Browser is driven using native mechanism, so we need a
binary file (driver) in between the test using the WebDriver
API and the actual browser
WebDriverManager - Motivation
System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
System.setProperty("webdriver.opera.driver", "/path/to/operadriver");
System.setProperty("webdriver.ie.driver", "C:/path/to/IEDriverServer.exe");
System.setProperty("webdriver.edge.driver", "C:/path/to/MicrosoftWebDriver.exe");
System.setProperty("phantomjs.binary.path", "/path/to/phantomjs");
System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");
WebDriverManager - Motivation
• Driver management is painful:
• Driver (chromedriver, geckodriver, etc.) must be downloaded
manually for the proper platform running the test (i.e. Windows,
Linux, Mac)
• Proper driver version must match the browser version
• Browser are constantly updated (and drivers too)
• Tests are not portable (different operative systems, path to driver)
WebDriverManager - Motivation
WebDriverManager - Objective
• WebDriverManager is a Java library that allows to
automate the management of the binary drivers
(chromedriver, geckodriver, etc.) required by Selenium
WebDriver
WebDriverManager.chromedriver().setup();
WebDriverManager.firefoxdriver().setup();
WebDriverManager.operadriver().setup();
WebDriverManager.edgedriver().setup();
WebDriverManager.iedriver().setup();
WebDriverManager.phantomjs().setup();
https://github.com/bonigarcia/webdrivermanager
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.4.0</version>
<scope>test</scope>
</dependency>
dependencies {
testCompile("io.github.bonigarcia:webdrivermanager:3.4.0")
}
WebDriverManager - Objective
public class ChromeTest {
private WebDriver driver;
@BeforeClass
public static void setupClass() {
WebDriverManager.chromedriver().setup();
}
@Before
public void setupTest() {
driver = new ChromeDriver();
}
@After
public void teardown() {
if (driver != null) {
driver.quit();
}
}
@Test
public void test() {
// Your test code here
}
}
public class ChromeTest {
private WebDriver driver;
@BeforeClass
public static void setupClass() {
WebDriverManager.firefoxdriver().setup();
}
@Before
public void setupTest() {
driver = new FirefoxDriver();
}
@After
public void teardown() {
if (driver != null) {
driver.quit();
}
}
@Test
public void test() {
// Your test code here
}
}
WebDriverManager - Design
• WebDriverManager was first released on 21st March 2015
• In its earlier versions, WebDriverManager downloaded the
latest version of the driver by default
Check driver
latest version
Driver in
cache?
Download driver
Export driver path Driver
cache
no
Driver repository (online)
yes
setup()
WebDriverManager - Design
• Currently, WebDriverManager resolution algorithm is much richer
Check browser
version
Driver in
cache?
Download driver
Export driver path Driver
cache
no
Driver repository (online)
Internal
preferences
Recently
resolved?
Check driver
version
Versions
database
TTL
no
yes
yes
setup()
Versions database (online)
WebDriverManager - API
• WebDriverManager exposes a fluent API. For instance:
WebDriverManager.chromedriver().setup();
WebDriverManager.chromedriver().version("2.46").setup();
WebDriverManager.firefoxdriver().arch32().setup();
WebDriverManager.operadriver().forceDownload().setup();
WebDriverManager.phantomjs().avoidPreferences().setup();
WebDriverManager.edgedriver().proxy("server:port").setup();
Default usage for managing
chromedriver
Force a given version (2.46)
for chromedriver
Force 32-bit architecture for
geckodriver
Force the download of
operadriver
Avoid the use of preferences
for PhantomJS driver
Set proxy setup when
managing Edge driver
WebDriverManager - API
• More examples of the WebDriverManager API:
Method Description
version(String) Set a concrete version for the driver to be downloaded
targetPath(String) Change cache path (by default ~/.m2/repository/webdriver)
architecture(Architecture) Force a given architecture: 32-bits or 64-bits
operatingSystem(OperatingSystem) Force a given OS: WIN, LINUX, MAC
proxy(String) Use a HTTP proxy for the Internet connection
avoidPreferences() Avoid the use of Java preferences
driverRepositoryUrl(URL) Set a custom repository URL
timeout(int) Change connection timeout
browserPath() Set path for a given browser
ttl() Change time-to-live (by default 3600 seconds)
forceDownload() Force to download driver even if it exists in cache
https://github.com/bonigarcia/webdrivermanager
WebDriverManager - Configuration
• WebDriverManager is highly configurable with:
1. Environment variables. For example
2. Java properties. For example:
3. Configuration manager in Java. For example:
export WDM_TARGETPATH=~/.selenium
export WDM_CHROMEDRIVERVERSION=2.46
mvn test -Dwdm.targetPath=~/.selenium
gradle test -Dwdm.chromeDriverVersion=2.46
WebDriverManager.globalConfig().setTargetPath("~/.selenium");
WebDriverManager.chromedriver().version("2.46").setup();
WebDriverManager - Beyond Java
• WebDriverManager can be also used:
1. As CLI (command line interface) tool:
2. As server (using a REST-like API):
> java -jar webdrivermanager-3.4.0-fat.jar chrome
[INFO] Using WebDriverManager to resolve chrome
[INFO] Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
[INFO] Latest version of chromedriver is 2.37
[INFO] Downloading https://chromedriver.storage.googleapis.com/2.37/chromedriver_win32.zip
to folder D:projectswebdrivermanager
[INFO] Resulting binary D:projectswebdrivermanagertargetchromedriver.exe
> java -jar webdrivermanager-3.4.0-fat.jar server
[INFO] WebDriverManager server listening on port 4041
Examples of requests to WebDriverManager Server:
http://localhost:4041/firefoxdriver
http://localhost:4041/chromedriver?chromeDriverVersion=2.40
WebDriverManager - Conclusions
• WebDriverManager is a helper library for automating the
management of Selenium drivers (chromedriver, etc.)
WebDriverManager - Conclusions
• WebDriverManager is used in different projects in the Selenium
ecosystem. For instance:
• io.appium » java-client: https://github.com/appium/java-client
• com.codeborne » selenide: https://github.com/selenide/selenide
• WebDriverManager concept has been ported to other languages:
• webdriver-manager (Node.js): https://github.com/angular/webdriver-manager
• webdriver_manager (Python): https://github.com/jeffnyman/webdriver_manager
• WebDriverManager.Net (.Net): https://github.com/rosolko/WebDriverManager.Net
• Webdrivers Gem (Ruby): https://github.com/titusfortner/webdrivers
• WebDriverManager is in constant evolution. Its roadmap includes:
• Support Edge based on Chromium
• Using aspects (cross-cutting concerns) to resolve drivers automatically when
instantiating WebDriver objects
Table of contents
WebDriverManager Selenium-Jupiter
Toolbox for Selenium in Java (but not only Java)
Selenium-Jupiter - Motivation
• JUnit 5 (stable) was first released on September 2017
Revolutionary
Evolutionary
Necessary
Selenium-Jupiter - Motivation
• JUnit 5 provides a brand-new
programming an extension model
called Jupiter
• Basic test are similar than in JUnit 4
and provide a wide range of new
features, such as:
• Enhanced parameterized tests
• Parallel execution
• Test ordering
• Kotlin support
• …
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class BasicJUnit5Test {
@BeforeAll
static void setupAll() {
// setup all tests
}
@BeforeEach
void setup() {
// setup each test
}
@Test
void test() {
// exercise and verify SUT
}
@AfterEach
void teardown() {
// teardown each test
}
@AfterAll
static void teardownAll() {
// teardown all tests
}
}
https://junit.org/junit5/docs/current/user-guide/
Selenium-Jupiter - Motivation
• The extension model of JUnit 5 allows to add custom features
to the programming model through extension points:
Very convenient
for Selenium!
1. Custom logic in the test
lifecycle
2. Dependency injection in test
methods and constructors
3. Test templates
4. Test conditional execution
Selenium-Jupiter - Objective
• Selenium-Jupiter is a JUnit 5 extension aimed to ease the
use of Selenium from Java tests
• Thanks to the Jupiter extension model, the required
boilerplate to use Selenium from JUnit 5 is minimum
• Moreover, it allows to use browser and Android devices in
Docker containers in a effortless manner
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>selenium-jupiter</artifactId>
<version>3.2.0</version>
<scope>test</scope>
</dependency>
dependencies {
testCompile("io.github.bonigarcia:selenium-jupiter:3.2.0")
}
https://github.com/bonigarcia/selenium-jupiter
Selenium-Jupiter - Local browsers
• Selenium-Jupiter uses the dependency injection mechanism
to instantiate/release WebDriver objects before/after tests
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class ChromeAndFirefoxJupiterTest {
@Test
public void testWithOneChrome(ChromeDriver chromeDriver) {
// Use Chrome in this test
}
@Test
public void testWithFirefox(FirefoxDriver firefoxDriver) {
// Use Firefox in this test
}
@Test
public void testWithChromeAndFirefox(ChromeDriver chromeDriver,
FirefoxDriver firefoxDriver) {
// Use Chrome and Firefox in this test
}
}
We simply need to specify the type of browser to
be used, as test or constructor parameters:
• ChromeDriver
• FirefoxDriver
• OperaDriver
• SafariDriver
• EdgeDriver
• InternetExplorerDriver
• HtmlUnitDriver
• PhantomJSDriver
• AppiumDriver
Internally, Selenium-Jupiter uses
WebDriverManager to resolve properly the
required binary drivers to control local browsers
Selenium-Jupiter - Remote browsers
• Selenium-Jupiter provides
the annotation @DriverUrl
to locate the Selenium or
Appium server and
@DriverCapabilities to
specify the desired
capabilities
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import io.github.bonigarcia.DriverCapabilities;
import io.github.bonigarcia.DriverUrl;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class SauceLabsJupiterTest {
@DriverUrl
String url = "https://ondemand.eu-central-1.saucelabs.com/wd/hub";
@DriverCapabilities
DesiredCapabilities capabilities = new DesiredCapabilities();
{
capabilities.setCapability("username", "<my-saucelabs-user>");
capabilities.setCapability("accessKey", "<my-saucelabs-key>");
capabilities.setCapability("browserName", "Chrome");
capabilities.setCapability("platform", "Windows 10");
capabilities.setCapability("version", "59.0");
capabilities.setCapability("name", "selenium-jupiter-and-saucelabs");
}
@Test
void testWithSaucelabs(RemoteWebDriver driver) {
// test
}
}
Selenium-Jupiter - Remote browsers
• Selenium-Jupiter provides
the annotation @DriverUrl
to locate the Selenium or
Appium server and
@DriverCapabilities to
specify the desired
capabilities
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.github.bonigarcia.seljup.DriverCapabilities;
import io.github.bonigarcia.seljup.DriverUrl;
import io.github.bonigarcia.seljup.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class AppiumWithGlobalOptionsChromeJupiterTest {
@DriverUrl
String url = "http://localhost:4723/wd/hub";
@DriverCapabilities
DesiredCapabilities capabilities = new DesiredCapabilities();
{
capabilities.setCapability("browserName", "chrome");
capabilities.setCapability("deviceName", "Samsung Galaxy S6");
}
@Test
void testWithAndroid(AppiumDriver<WebElement> driver) {
// test
}
}
Selenium-Jupiter - Dockerized browsers
• Selenium-Jupiter provides seamless integration with Docker
• The annotation @DockerBrowser is used to declare a dockerized
browsers. The supported browser are
• Chrome, Firefox, and Opera:
• Docker images for stable versions are maintained by Aerokube
• Beta and unstable (Chrome and Firefox) are maintained by ElasTest
• Edge and Internet Explorer:
• Due to license, these Docker images are not hosted in Docker Hub
• It can be built following a tutorial provided by Aerokube
• Android devices:
• Docker images for Android devices are maintained in the docker-android project (by Budi
Utomo)
Selenium-Jupiter - Dockerized browsers
• Browser in Docker containers example:
import static io.github.bonigarcia.BrowserType.CHROME;
import static io.github.bonigarcia.BrowserType.FIREFOX;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.remote.RemoteWebDriver;
import io.github.bonigarcia.DockerBrowser;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class DockerChromeJupiterTest {
@Test
public void testChrome(@DockerBrowser(type = CHROME) RemoteWebDriver driver) {
// test
}
@Test
public void testChromeWithVersion(@DockerBrowser(type = FIREFOX, version = "66.0")
RemoteWebDriver driver) {
// test
}
}
Supported browser types are: CHROME,
FIREFOX, OPERA, y EDGE , IEXPLORER
and ANDROID
The parameter version admits the
following special values: latest,
latest-*, beta, y unstable
If version is not specified, the latest
stable will be used. For that, Selenium-
Jupiter internally connects to Docker
Hub to find out the latest version (ever
green Docker browser)
Selenium-Jupiter - Dockerized browsers
• Browsers in Docker containers can be used to create performance tests:
import static io.github.bonigarcia.BrowserType.CHROME;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.util.List;
import io.github.bonigarcia.DockerBrowser;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class DockerChromeJupiterTest {
static final int NUM_BROWSERS = 10;
@Test
public void testPerformance(
@DockerBrowser(type = CHROME, size = NUM_BROWSERS) List<RemoteWebDriver> driverList) {
// test
}
} In this test, we will have 10
Chrome browsers ready to be
used by the test logic
Selenium-Jupiter - Dockerized browsers
• Android in Docker container example:
import static io.github.bonigarcia.BrowserType.ANDROID;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.remote.RemoteWebDriver;
import io.github.bonigarcia.DockerBrowser;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class DockerAndroidCustomJupiterTest {
@Test
public void testAndroid(@DockerBrowser(type = ANDROID, version = "8.1",
deviceName = "Nexus S") RemoteWebDriver driver) {
// test
}
} When using Android in Docker
containers, the type of device can
be specified
Android version API level Browser name
5.0.1 21 browser
5.1.1 22 browser
6.0 23 chrome
7.0 24 chrome
7.1.1 25 chrome
8.0 26 chrome
8.1 27 chrome
9.0 28 chrome
Type Device name
Phone Samsung Galaxy S6
Phone Nexus 4
Phone Nexus 5
Phone Nexus One
Phone Nexus S
Tablet Nexus 7
Selenium-Jupiter - Dockerized browsers
• When using Docker containers, it is possible to interact with the remote
session using VNC (and also recording these sessions)
Selenium-Jupiter - Test templates
• Selenium-Jupiter use the JUnit 5’s support for test templates
• A template defines the number and types of browser used by a test:
1. By means of a JSON file:
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;
import io.github.bonigarcia.SeleniumExtension;
@ExtendWith(SeleniumExtension.class)
public class TemplateTest {
@TestTemplate
void templateTest(WebDriver driver) {
// test
}
}
{
"browsers": [
[
{
"type": "chrome-in-docker",
"version": "latest"
}
],
[
{
"type": "chrome-in-docker",
"version": "latest-1"
}
],
[
{
"type": "chrome-in-docker",
"version": "beta"
}
],
[
{
"type": "chrome-in-docker",
"version": "unstable"
}
]
]
}
Selenium-Jupiter - Test templates
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.openqa.selenium.WebDriver;
import io.github.bonigarcia.BrowserBuilder;
import io.github.bonigarcia.BrowsersTemplate.Browser;
import io.github.bonigarcia.SeleniumExtension;
public class TemplateRegisterTest {
@RegisterExtension
static SeleniumExtension seleniumExtension = new SeleniumExtension();
@BeforeAll
static void setup() {
Browser chrome = BrowserBuilder.chrome().build();
Browser firefox = BrowserBuilder.firefox().build();
seleniumExtension.addBrowsers(chrome, firefox);
}
@TestTemplate
void templateTest(WebDriver driver) {
// ...
}
}
• Selenium-Jupiter use the JUnit 5’s support for test templates
• A template defines the number and types of browser used by a test:
2. Programmatically:
Selenium-Jupiter - Configuration
• Selenium-Jupiter is also highly configurable with:
1. Environment variables. For example
2. Java properties. For example:
3. Configuration manager in Java. For example:
export SEL_JUP_VNC=true
export SEL_JUP_RECORDING=true
mvn test –Dsel.jup.vnc=true
gradle test –Dsel.jup.vnc=true
@RegisterExtension
static SeleniumExtension seleniumExtension = new SeleniumExtension();
@BeforeAll
static void setup() {
seleniumExtension.getConfig().setVnc(true);
seleniumExtension.getConfig().setRecording(true);
}
Selenium-Jupiter - Beyond Java
• Selenium-Jupiter can be also used:
1. As CLI (command line interface) tool:
2. As server (using a REST-like API):
> java -jar selenium-jupiter-3.2.0-fat.jar chrome
[INFO] Using SeleniumJupiter to execute chrome (latest) in Docker
[INFO] Using CHROME version 73.0 (latest)
[INFO] Starting Docker container aerokube/selenoid:1.8.4
[DEBUG] Creating WebDriver for CHROME at http://172.17.0.1:32784/wd/hub
Jan 07, 2019 6:55:17 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
[INFO] Starting Docker container psharkey/novnc:3.3-t6
[INFO] Session id 8edd28c130bb2bc62f8e4467c20f4dc0
[INFO] VNC URL (copy and paste in a browser navigation bar to interact with remote session)
[INFO]
http://172.17.0.1:32785/vnc.html?host=172.17.0.1&port=32784&path=vnc/8edd28c130bb2bc62f8e44
67c20f4dc0&resize=scale&autoconnect=true&password=selenoid
[INFO] Press ENTER to exit
[INFO] Stopping Docker container aerokube/selenoid:1.8.4
[INFO] Stopping Docker container psharkey/novnc:3.3-t6
java -jar webdrivermanager-3.2.0-fat.jar server
[INFO] Selenium-Jupiter server listening on http://localhost:4042/wd/hub
Selenium-Jupiter becomes
a Selenium Server
Selenium-Jupiter allows to
control Docker browsers
through VNC
Selenium-Jupiter - Conclusions
• Selenium-Jupiter is a JUnit 5 extension for Selenium (WebDriver, Grid)
and Appium
Selenium-Jupiter - Conclusions
• Selenium-Jupiter has much more features such as:
• Using WebDriver @Options in tests (e.g. ChromeOptions,
FirefoxOptions, etc.)
• Screenshots at the end of test (as PNG image or Base64)
• Integration with Jenkins (publishing test results in the Jenkins GUI)
• Integration with Genymotion (cloud provider for Android devices)
• Generic driver (configurable type of browser)
• Single session (reuse browser in different tests)
• Selenium-Jupiter is evolving in the near future. Its roadmap includes:
• Improve test template support (e.g. specifying options within the template)
• Improve scalability for performance tests (candidate technology: Kubernetes)
https://bonigarcia.github.io/selenium-jupiter/
Toolbox for Selenium Tests in
Java: WebDriverManager and
Selenium-Jupiter
Thank you very much!
Q&A
Boni García
boni.garcia@urjc.es http://bonigarcia.github.io/
@boni_gg https://github.com/bonigarcia

Más contenido relacionado

La actualidad más candente

Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytestviniciusban
 
TestNG introduction
TestNG introductionTestNG introduction
TestNG introductionDenis Bazhin
 
Manual testing interview questions by infotech
Manual testing interview questions by infotech Manual testing interview questions by infotech
Manual testing interview questions by infotech suhasreddy1
 
Karate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter ThomasKarate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter Thomasintuit_india
 
Why Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightKnoldus Inc.
 
구글테스트
구글테스트구글테스트
구글테스트진화 손
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and SeleniumKarapet Sarkisyan
 
Test Automation Architecture
Test Automation ArchitectureTest Automation Architecture
Test Automation ArchitectureApplitools
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cyclegueste730d5
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With PythonSiddhi
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaEdureka!
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
 
Unit Test and TDD
Unit Test and TDDUnit Test and TDD
Unit Test and TDDViet Tran
 

La actualidad más candente (20)

Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytest
 
Junit
JunitJunit
Junit
 
TestNG introduction
TestNG introductionTestNG introduction
TestNG introduction
 
Manual testing interview questions by infotech
Manual testing interview questions by infotech Manual testing interview questions by infotech
Manual testing interview questions by infotech
 
Karate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter ThomasKarate for Complex Web-Service API Testing by Peter Thomas
Karate for Complex Web-Service API Testing by Peter Thomas
 
Test NG Framework Complete Walk Through
Test NG Framework Complete Walk ThroughTest NG Framework Complete Walk Through
Test NG Framework Complete Walk Through
 
Why Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's Playwright
 
구글테스트
구글테스트구글테스트
구글테스트
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Test Automation Architecture
Test Automation ArchitectureTest Automation Architecture
Test Automation Architecture
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With Python
 
Software testing
Software testingSoftware testing
Software testing
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | Edureka
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
 
Unit Test and TDD
Unit Test and TDDUnit Test and TDD
Unit Test and TDD
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 

Similar a Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter

WebDriverManager: the Swiss Army Knife for Selenium WebDriver
WebDriverManager: the Swiss Army Knife for Selenium WebDriverWebDriverManager: the Swiss Army Knife for Selenium WebDriver
WebDriverManager: the Swiss Army Knife for Selenium WebDriverBoni García
 
Selenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSelenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSoftware Testing Board
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introductionSergii Fesenko
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Selenium for Tester.pdf
Selenium for Tester.pdfSelenium for Tester.pdf
Selenium for Tester.pdfRTechRInfoIT
 
Developing Selenium tests with JUnit 5
Developing Selenium tests with JUnit 5Developing Selenium tests with JUnit 5
Developing Selenium tests with JUnit 5Boni García
 
Introduction to Selenium and WebDriver
Introduction to Selenium and WebDriverIntroduction to Selenium and WebDriver
Introduction to Selenium and WebDriverTechWell
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousaEmma Armstrong
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instrumentsArtem Nagornyi
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriverRajathi-QA
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with exampleshadabgilani
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpikeos890
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests🌱 Dale Spoonemore
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest servicesIoan Eugen Stan
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaEr. Sndp Srda
 

Similar a Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter (20)

WebDriverManager: the Swiss Army Knife for Selenium WebDriver
WebDriverManager: the Swiss Army Knife for Selenium WebDriverWebDriverManager: the Swiss Army Knife for Selenium WebDriver
WebDriverManager: the Swiss Army Knife for Selenium WebDriver
 
Selenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit PathakSelenium Java for Beginners by Sujit Pathak
Selenium Java for Beginners by Sujit Pathak
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Maven and j unit introduction
Maven and j unit introductionMaven and j unit introduction
Maven and j unit introduction
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Selenium for Tester.pdf
Selenium for Tester.pdfSelenium for Tester.pdf
Selenium for Tester.pdf
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Developing Selenium tests with JUnit 5
Developing Selenium tests with JUnit 5Developing Selenium tests with JUnit 5
Developing Selenium tests with JUnit 5
 
Introduction to Selenium and WebDriver
Introduction to Selenium and WebDriverIntroduction to Selenium and WebDriver
Introduction to Selenium and WebDriver
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousa
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpike
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
 
Selenium
SeleniumSelenium
Selenium
 

Más de Boni García

Selenium Manager: Automated Driver & Browser Management for Selenium WebDriver
Selenium Manager: Automated Driver & Browser Management for Selenium WebDriverSelenium Manager: Automated Driver & Browser Management for Selenium WebDriver
Selenium Manager: Automated Driver & Browser Management for Selenium WebDriverBoni García
 
Extending WebDriver: A cloud approach
Extending WebDriver: A cloud approachExtending WebDriver: A cloud approach
Extending WebDriver: A cloud approachBoni García
 
A Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesA Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesBoni García
 
Introducción y novedades de JUnit 5 (04/07/2018)
Introducción y novedades de JUnit 5 (04/07/2018)Introducción y novedades de JUnit 5 (04/07/2018)
Introducción y novedades de JUnit 5 (04/07/2018)Boni García
 
User Impersonation as a Service in End-to-End Testing
User Impersonation as a Service in End-to-End TestingUser Impersonation as a Service in End-to-End Testing
User Impersonation as a Service in End-to-End TestingBoni García
 
Introducción y novedades de JUnit 5 (16/01/2018)
Introducción y novedades de JUnit 5 (16/01/2018)Introducción y novedades de JUnit 5 (16/01/2018)
Introducción y novedades de JUnit 5 (16/01/2018)Boni García
 
WebRTC Testing: State of the Art
WebRTC Testing: State of the ArtWebRTC Testing: State of the Art
WebRTC Testing: State of the ArtBoni García
 
ElasTest: an elastic platform for testing complex distributed large software ...
ElasTest: an elastic platform for testing complex distributed large software ...ElasTest: an elastic platform for testing complex distributed large software ...
ElasTest: an elastic platform for testing complex distributed large software ...Boni García
 
Analysis of video quality and end-to-end latency in WebRTC
Analysis of video quality and end-to-end latency in WebRTCAnalysis of video quality and end-to-end latency in WebRTC
Analysis of video quality and end-to-end latency in WebRTCBoni García
 
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...Boni García
 
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96Boni García
 
Cloud Instances of Kurento v6 on FIWARE Lab
Cloud Instances of Kurento v6 on FIWARE LabCloud Instances of Kurento v6 on FIWARE Lab
Cloud Instances of Kurento v6 on FIWARE LabBoni García
 
Kurento v6 Development Guide
Kurento v6 Development GuideKurento v6 Development Guide
Kurento v6 Development GuideBoni García
 
Kurento v6 Installation Guide
Kurento v6 Installation GuideKurento v6 Installation Guide
Kurento v6 Installation GuideBoni García
 
Introduction to the Stream Oriented GE (Kurento v6)
Introduction to the Stream Oriented GE (Kurento v6)Introduction to the Stream Oriented GE (Kurento v6)
Introduction to the Stream Oriented GE (Kurento v6)Boni García
 

Más de Boni García (16)

Selenium Manager: Automated Driver & Browser Management for Selenium WebDriver
Selenium Manager: Automated Driver & Browser Management for Selenium WebDriverSelenium Manager: Automated Driver & Browser Management for Selenium WebDriver
Selenium Manager: Automated Driver & Browser Management for Selenium WebDriver
 
Extending WebDriver: A cloud approach
Extending WebDriver: A cloud approachExtending WebDriver: A cloud approach
Extending WebDriver: A cloud approach
 
A Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test CasesA Proposal to Orchestrate Test Cases
A Proposal to Orchestrate Test Cases
 
Introducción y novedades de JUnit 5 (04/07/2018)
Introducción y novedades de JUnit 5 (04/07/2018)Introducción y novedades de JUnit 5 (04/07/2018)
Introducción y novedades de JUnit 5 (04/07/2018)
 
User Impersonation as a Service in End-to-End Testing
User Impersonation as a Service in End-to-End TestingUser Impersonation as a Service in End-to-End Testing
User Impersonation as a Service in End-to-End Testing
 
Introducción y novedades de JUnit 5 (16/01/2018)
Introducción y novedades de JUnit 5 (16/01/2018)Introducción y novedades de JUnit 5 (16/01/2018)
Introducción y novedades de JUnit 5 (16/01/2018)
 
WebRTC Testing: State of the Art
WebRTC Testing: State of the ArtWebRTC Testing: State of the Art
WebRTC Testing: State of the Art
 
ElasTest: an elastic platform for testing complex distributed large software ...
ElasTest: an elastic platform for testing complex distributed large software ...ElasTest: an elastic platform for testing complex distributed large software ...
ElasTest: an elastic platform for testing complex distributed large software ...
 
Analysis of video quality and end-to-end latency in WebRTC
Analysis of video quality and end-to-end latency in WebRTCAnalysis of video quality and end-to-end latency in WebRTC
Analysis of video quality and end-to-end latency in WebRTC
 
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
NUBOMEDIA: an Elastic PaaS Enabling the Convergence of Real-Time and Big Data...
 
NUBOMEDIA Webinar
NUBOMEDIA WebinarNUBOMEDIA Webinar
NUBOMEDIA Webinar
 
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
WebRTC/Kurento/NUBOMEDIA Hackathon at IETF’96
 
Cloud Instances of Kurento v6 on FIWARE Lab
Cloud Instances of Kurento v6 on FIWARE LabCloud Instances of Kurento v6 on FIWARE Lab
Cloud Instances of Kurento v6 on FIWARE Lab
 
Kurento v6 Development Guide
Kurento v6 Development GuideKurento v6 Development Guide
Kurento v6 Development Guide
 
Kurento v6 Installation Guide
Kurento v6 Installation GuideKurento v6 Installation Guide
Kurento v6 Installation Guide
 
Introduction to the Stream Oriented GE (Kurento v6)
Introduction to the Stream Oriented GE (Kurento v6)Introduction to the Stream Oriented GE (Kurento v6)
Introduction to the Stream Oriented GE (Kurento v6)
 

Último

The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 

Último (20)

The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 

Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter

  • 1. Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter SeleniumConf Tokyo 19/04/2019 Boni García boni.garcia@urjc.es http://bonigarcia.github.io/ @boni_gg https://github.com/bonigarcia
  • 2. Boni García • PhD in Information and Communications Technology from Technical University of Madrid (UPM) in Spain. Dissertation focused on software testing with Selenium • Assistant Professor at King Juan Carlos University (URJC) in Spain • Open source software enthusiast. Creator and maintainer of a number of projects: WebDriverManager, Selenium- Jupiter, DualSub • Author of more than 30 research papers in different journals, magazines, international conferences, and the book Mastering Software Testing with JUnit 5
  • 3. Table of contents WebDriverManager Selenium-Jupiter Toolbox for Selenium in Java (but not only Java)
  • 4. WebDriverManager - Motivation • Selenium WebDriver allows to control different types of browsers (such as Chrome, Firefox, Opera, Edge, and so on) programmatically using different programming languages (Java, JavaScript, Python, C#, …) • Browser is driven using native mechanism, so we need a binary file (driver) in between the test using the WebDriver API and the actual browser
  • 5. WebDriverManager - Motivation System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver"); System.setProperty("webdriver.opera.driver", "/path/to/operadriver"); System.setProperty("webdriver.ie.driver", "C:/path/to/IEDriverServer.exe"); System.setProperty("webdriver.edge.driver", "C:/path/to/MicrosoftWebDriver.exe"); System.setProperty("phantomjs.binary.path", "/path/to/phantomjs"); System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver");
  • 6. WebDriverManager - Motivation • Driver management is painful: • Driver (chromedriver, geckodriver, etc.) must be downloaded manually for the proper platform running the test (i.e. Windows, Linux, Mac) • Proper driver version must match the browser version • Browser are constantly updated (and drivers too) • Tests are not portable (different operative systems, path to driver)
  • 8. WebDriverManager - Objective • WebDriverManager is a Java library that allows to automate the management of the binary drivers (chromedriver, geckodriver, etc.) required by Selenium WebDriver WebDriverManager.chromedriver().setup(); WebDriverManager.firefoxdriver().setup(); WebDriverManager.operadriver().setup(); WebDriverManager.edgedriver().setup(); WebDriverManager.iedriver().setup(); WebDriverManager.phantomjs().setup(); https://github.com/bonigarcia/webdrivermanager <dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>webdrivermanager</artifactId> <version>3.4.0</version> <scope>test</scope> </dependency> dependencies { testCompile("io.github.bonigarcia:webdrivermanager:3.4.0") }
  • 9. WebDriverManager - Objective public class ChromeTest { private WebDriver driver; @BeforeClass public static void setupClass() { WebDriverManager.chromedriver().setup(); } @Before public void setupTest() { driver = new ChromeDriver(); } @After public void teardown() { if (driver != null) { driver.quit(); } } @Test public void test() { // Your test code here } } public class ChromeTest { private WebDriver driver; @BeforeClass public static void setupClass() { WebDriverManager.firefoxdriver().setup(); } @Before public void setupTest() { driver = new FirefoxDriver(); } @After public void teardown() { if (driver != null) { driver.quit(); } } @Test public void test() { // Your test code here } }
  • 10. WebDriverManager - Design • WebDriverManager was first released on 21st March 2015 • In its earlier versions, WebDriverManager downloaded the latest version of the driver by default Check driver latest version Driver in cache? Download driver Export driver path Driver cache no Driver repository (online) yes setup()
  • 11. WebDriverManager - Design • Currently, WebDriverManager resolution algorithm is much richer Check browser version Driver in cache? Download driver Export driver path Driver cache no Driver repository (online) Internal preferences Recently resolved? Check driver version Versions database TTL no yes yes setup() Versions database (online)
  • 12. WebDriverManager - API • WebDriverManager exposes a fluent API. For instance: WebDriverManager.chromedriver().setup(); WebDriverManager.chromedriver().version("2.46").setup(); WebDriverManager.firefoxdriver().arch32().setup(); WebDriverManager.operadriver().forceDownload().setup(); WebDriverManager.phantomjs().avoidPreferences().setup(); WebDriverManager.edgedriver().proxy("server:port").setup(); Default usage for managing chromedriver Force a given version (2.46) for chromedriver Force 32-bit architecture for geckodriver Force the download of operadriver Avoid the use of preferences for PhantomJS driver Set proxy setup when managing Edge driver
  • 13. WebDriverManager - API • More examples of the WebDriverManager API: Method Description version(String) Set a concrete version for the driver to be downloaded targetPath(String) Change cache path (by default ~/.m2/repository/webdriver) architecture(Architecture) Force a given architecture: 32-bits or 64-bits operatingSystem(OperatingSystem) Force a given OS: WIN, LINUX, MAC proxy(String) Use a HTTP proxy for the Internet connection avoidPreferences() Avoid the use of Java preferences driverRepositoryUrl(URL) Set a custom repository URL timeout(int) Change connection timeout browserPath() Set path for a given browser ttl() Change time-to-live (by default 3600 seconds) forceDownload() Force to download driver even if it exists in cache https://github.com/bonigarcia/webdrivermanager
  • 14. WebDriverManager - Configuration • WebDriverManager is highly configurable with: 1. Environment variables. For example 2. Java properties. For example: 3. Configuration manager in Java. For example: export WDM_TARGETPATH=~/.selenium export WDM_CHROMEDRIVERVERSION=2.46 mvn test -Dwdm.targetPath=~/.selenium gradle test -Dwdm.chromeDriverVersion=2.46 WebDriverManager.globalConfig().setTargetPath("~/.selenium"); WebDriverManager.chromedriver().version("2.46").setup();
  • 15. WebDriverManager - Beyond Java • WebDriverManager can be also used: 1. As CLI (command line interface) tool: 2. As server (using a REST-like API): > java -jar webdrivermanager-3.4.0-fat.jar chrome [INFO] Using WebDriverManager to resolve chrome [INFO] Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver [INFO] Latest version of chromedriver is 2.37 [INFO] Downloading https://chromedriver.storage.googleapis.com/2.37/chromedriver_win32.zip to folder D:projectswebdrivermanager [INFO] Resulting binary D:projectswebdrivermanagertargetchromedriver.exe > java -jar webdrivermanager-3.4.0-fat.jar server [INFO] WebDriverManager server listening on port 4041 Examples of requests to WebDriverManager Server: http://localhost:4041/firefoxdriver http://localhost:4041/chromedriver?chromeDriverVersion=2.40
  • 16. WebDriverManager - Conclusions • WebDriverManager is a helper library for automating the management of Selenium drivers (chromedriver, etc.)
  • 17. WebDriverManager - Conclusions • WebDriverManager is used in different projects in the Selenium ecosystem. For instance: • io.appium » java-client: https://github.com/appium/java-client • com.codeborne » selenide: https://github.com/selenide/selenide • WebDriverManager concept has been ported to other languages: • webdriver-manager (Node.js): https://github.com/angular/webdriver-manager • webdriver_manager (Python): https://github.com/jeffnyman/webdriver_manager • WebDriverManager.Net (.Net): https://github.com/rosolko/WebDriverManager.Net • Webdrivers Gem (Ruby): https://github.com/titusfortner/webdrivers • WebDriverManager is in constant evolution. Its roadmap includes: • Support Edge based on Chromium • Using aspects (cross-cutting concerns) to resolve drivers automatically when instantiating WebDriver objects
  • 18. Table of contents WebDriverManager Selenium-Jupiter Toolbox for Selenium in Java (but not only Java)
  • 19. Selenium-Jupiter - Motivation • JUnit 5 (stable) was first released on September 2017 Revolutionary Evolutionary Necessary
  • 20. Selenium-Jupiter - Motivation • JUnit 5 provides a brand-new programming an extension model called Jupiter • Basic test are similar than in JUnit 4 and provide a wide range of new features, such as: • Enhanced parameterized tests • Parallel execution • Test ordering • Kotlin support • … import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class BasicJUnit5Test { @BeforeAll static void setupAll() { // setup all tests } @BeforeEach void setup() { // setup each test } @Test void test() { // exercise and verify SUT } @AfterEach void teardown() { // teardown each test } @AfterAll static void teardownAll() { // teardown all tests } } https://junit.org/junit5/docs/current/user-guide/
  • 21. Selenium-Jupiter - Motivation • The extension model of JUnit 5 allows to add custom features to the programming model through extension points: Very convenient for Selenium! 1. Custom logic in the test lifecycle 2. Dependency injection in test methods and constructors 3. Test templates 4. Test conditional execution
  • 22. Selenium-Jupiter - Objective • Selenium-Jupiter is a JUnit 5 extension aimed to ease the use of Selenium from Java tests • Thanks to the Jupiter extension model, the required boilerplate to use Selenium from JUnit 5 is minimum • Moreover, it allows to use browser and Android devices in Docker containers in a effortless manner <dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>selenium-jupiter</artifactId> <version>3.2.0</version> <scope>test</scope> </dependency> dependencies { testCompile("io.github.bonigarcia:selenium-jupiter:3.2.0") } https://github.com/bonigarcia/selenium-jupiter
  • 23. Selenium-Jupiter - Local browsers • Selenium-Jupiter uses the dependency injection mechanism to instantiate/release WebDriver objects before/after tests import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class ChromeAndFirefoxJupiterTest { @Test public void testWithOneChrome(ChromeDriver chromeDriver) { // Use Chrome in this test } @Test public void testWithFirefox(FirefoxDriver firefoxDriver) { // Use Firefox in this test } @Test public void testWithChromeAndFirefox(ChromeDriver chromeDriver, FirefoxDriver firefoxDriver) { // Use Chrome and Firefox in this test } } We simply need to specify the type of browser to be used, as test or constructor parameters: • ChromeDriver • FirefoxDriver • OperaDriver • SafariDriver • EdgeDriver • InternetExplorerDriver • HtmlUnitDriver • PhantomJSDriver • AppiumDriver Internally, Selenium-Jupiter uses WebDriverManager to resolve properly the required binary drivers to control local browsers
  • 24. Selenium-Jupiter - Remote browsers • Selenium-Jupiter provides the annotation @DriverUrl to locate the Selenium or Appium server and @DriverCapabilities to specify the desired capabilities import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.Capabilities; import org.openqa.selenium.remote.RemoteWebDriver; import io.github.bonigarcia.DriverCapabilities; import io.github.bonigarcia.DriverUrl; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class SauceLabsJupiterTest { @DriverUrl String url = "https://ondemand.eu-central-1.saucelabs.com/wd/hub"; @DriverCapabilities DesiredCapabilities capabilities = new DesiredCapabilities(); { capabilities.setCapability("username", "<my-saucelabs-user>"); capabilities.setCapability("accessKey", "<my-saucelabs-key>"); capabilities.setCapability("browserName", "Chrome"); capabilities.setCapability("platform", "Windows 10"); capabilities.setCapability("version", "59.0"); capabilities.setCapability("name", "selenium-jupiter-and-saucelabs"); } @Test void testWithSaucelabs(RemoteWebDriver driver) { // test } }
  • 25. Selenium-Jupiter - Remote browsers • Selenium-Jupiter provides the annotation @DriverUrl to locate the Selenium or Appium server and @DriverCapabilities to specify the desired capabilities import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.remote.DesiredCapabilities; import io.appium.java_client.AppiumDriver; import io.github.bonigarcia.seljup.DriverCapabilities; import io.github.bonigarcia.seljup.DriverUrl; import io.github.bonigarcia.seljup.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class AppiumWithGlobalOptionsChromeJupiterTest { @DriverUrl String url = "http://localhost:4723/wd/hub"; @DriverCapabilities DesiredCapabilities capabilities = new DesiredCapabilities(); { capabilities.setCapability("browserName", "chrome"); capabilities.setCapability("deviceName", "Samsung Galaxy S6"); } @Test void testWithAndroid(AppiumDriver<WebElement> driver) { // test } }
  • 26. Selenium-Jupiter - Dockerized browsers • Selenium-Jupiter provides seamless integration with Docker • The annotation @DockerBrowser is used to declare a dockerized browsers. The supported browser are • Chrome, Firefox, and Opera: • Docker images for stable versions are maintained by Aerokube • Beta and unstable (Chrome and Firefox) are maintained by ElasTest • Edge and Internet Explorer: • Due to license, these Docker images are not hosted in Docker Hub • It can be built following a tutorial provided by Aerokube • Android devices: • Docker images for Android devices are maintained in the docker-android project (by Budi Utomo)
  • 27. Selenium-Jupiter - Dockerized browsers • Browser in Docker containers example: import static io.github.bonigarcia.BrowserType.CHROME; import static io.github.bonigarcia.BrowserType.FIREFOX; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.remote.RemoteWebDriver; import io.github.bonigarcia.DockerBrowser; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class DockerChromeJupiterTest { @Test public void testChrome(@DockerBrowser(type = CHROME) RemoteWebDriver driver) { // test } @Test public void testChromeWithVersion(@DockerBrowser(type = FIREFOX, version = "66.0") RemoteWebDriver driver) { // test } } Supported browser types are: CHROME, FIREFOX, OPERA, y EDGE , IEXPLORER and ANDROID The parameter version admits the following special values: latest, latest-*, beta, y unstable If version is not specified, the latest stable will be used. For that, Selenium- Jupiter internally connects to Docker Hub to find out the latest version (ever green Docker browser)
  • 28. Selenium-Jupiter - Dockerized browsers • Browsers in Docker containers can be used to create performance tests: import static io.github.bonigarcia.BrowserType.CHROME; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.remote.RemoteWebDriver; import java.util.List; import io.github.bonigarcia.DockerBrowser; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class DockerChromeJupiterTest { static final int NUM_BROWSERS = 10; @Test public void testPerformance( @DockerBrowser(type = CHROME, size = NUM_BROWSERS) List<RemoteWebDriver> driverList) { // test } } In this test, we will have 10 Chrome browsers ready to be used by the test logic
  • 29. Selenium-Jupiter - Dockerized browsers • Android in Docker container example: import static io.github.bonigarcia.BrowserType.ANDROID; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.remote.RemoteWebDriver; import io.github.bonigarcia.DockerBrowser; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class DockerAndroidCustomJupiterTest { @Test public void testAndroid(@DockerBrowser(type = ANDROID, version = "8.1", deviceName = "Nexus S") RemoteWebDriver driver) { // test } } When using Android in Docker containers, the type of device can be specified Android version API level Browser name 5.0.1 21 browser 5.1.1 22 browser 6.0 23 chrome 7.0 24 chrome 7.1.1 25 chrome 8.0 26 chrome 8.1 27 chrome 9.0 28 chrome Type Device name Phone Samsung Galaxy S6 Phone Nexus 4 Phone Nexus 5 Phone Nexus One Phone Nexus S Tablet Nexus 7
  • 30. Selenium-Jupiter - Dockerized browsers • When using Docker containers, it is possible to interact with the remote session using VNC (and also recording these sessions)
  • 31. Selenium-Jupiter - Test templates • Selenium-Jupiter use the JUnit 5’s support for test templates • A template defines the number and types of browser used by a test: 1. By means of a JSON file: import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.ExtendWith; import org.openqa.selenium.WebDriver; import io.github.bonigarcia.SeleniumExtension; @ExtendWith(SeleniumExtension.class) public class TemplateTest { @TestTemplate void templateTest(WebDriver driver) { // test } } { "browsers": [ [ { "type": "chrome-in-docker", "version": "latest" } ], [ { "type": "chrome-in-docker", "version": "latest-1" } ], [ { "type": "chrome-in-docker", "version": "beta" } ], [ { "type": "chrome-in-docker", "version": "unstable" } ] ] }
  • 32. Selenium-Jupiter - Test templates import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestTemplate; import org.junit.jupiter.api.extension.RegisterExtension; import org.openqa.selenium.WebDriver; import io.github.bonigarcia.BrowserBuilder; import io.github.bonigarcia.BrowsersTemplate.Browser; import io.github.bonigarcia.SeleniumExtension; public class TemplateRegisterTest { @RegisterExtension static SeleniumExtension seleniumExtension = new SeleniumExtension(); @BeforeAll static void setup() { Browser chrome = BrowserBuilder.chrome().build(); Browser firefox = BrowserBuilder.firefox().build(); seleniumExtension.addBrowsers(chrome, firefox); } @TestTemplate void templateTest(WebDriver driver) { // ... } } • Selenium-Jupiter use the JUnit 5’s support for test templates • A template defines the number and types of browser used by a test: 2. Programmatically:
  • 33. Selenium-Jupiter - Configuration • Selenium-Jupiter is also highly configurable with: 1. Environment variables. For example 2. Java properties. For example: 3. Configuration manager in Java. For example: export SEL_JUP_VNC=true export SEL_JUP_RECORDING=true mvn test –Dsel.jup.vnc=true gradle test –Dsel.jup.vnc=true @RegisterExtension static SeleniumExtension seleniumExtension = new SeleniumExtension(); @BeforeAll static void setup() { seleniumExtension.getConfig().setVnc(true); seleniumExtension.getConfig().setRecording(true); }
  • 34. Selenium-Jupiter - Beyond Java • Selenium-Jupiter can be also used: 1. As CLI (command line interface) tool: 2. As server (using a REST-like API): > java -jar selenium-jupiter-3.2.0-fat.jar chrome [INFO] Using SeleniumJupiter to execute chrome (latest) in Docker [INFO] Using CHROME version 73.0 (latest) [INFO] Starting Docker container aerokube/selenoid:1.8.4 [DEBUG] Creating WebDriver for CHROME at http://172.17.0.1:32784/wd/hub Jan 07, 2019 6:55:17 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS [INFO] Starting Docker container psharkey/novnc:3.3-t6 [INFO] Session id 8edd28c130bb2bc62f8e4467c20f4dc0 [INFO] VNC URL (copy and paste in a browser navigation bar to interact with remote session) [INFO] http://172.17.0.1:32785/vnc.html?host=172.17.0.1&port=32784&path=vnc/8edd28c130bb2bc62f8e44 67c20f4dc0&resize=scale&autoconnect=true&password=selenoid [INFO] Press ENTER to exit [INFO] Stopping Docker container aerokube/selenoid:1.8.4 [INFO] Stopping Docker container psharkey/novnc:3.3-t6 java -jar webdrivermanager-3.2.0-fat.jar server [INFO] Selenium-Jupiter server listening on http://localhost:4042/wd/hub Selenium-Jupiter becomes a Selenium Server Selenium-Jupiter allows to control Docker browsers through VNC
  • 35. Selenium-Jupiter - Conclusions • Selenium-Jupiter is a JUnit 5 extension for Selenium (WebDriver, Grid) and Appium
  • 36. Selenium-Jupiter - Conclusions • Selenium-Jupiter has much more features such as: • Using WebDriver @Options in tests (e.g. ChromeOptions, FirefoxOptions, etc.) • Screenshots at the end of test (as PNG image or Base64) • Integration with Jenkins (publishing test results in the Jenkins GUI) • Integration with Genymotion (cloud provider for Android devices) • Generic driver (configurable type of browser) • Single session (reuse browser in different tests) • Selenium-Jupiter is evolving in the near future. Its roadmap includes: • Improve test template support (e.g. specifying options within the template) • Improve scalability for performance tests (candidate technology: Kubernetes) https://bonigarcia.github.io/selenium-jupiter/
  • 37. Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter Thank you very much! Q&A Boni García boni.garcia@urjc.es http://bonigarcia.github.io/ @boni_gg https://github.com/bonigarcia