selenium grid. simple steps from single platform to multiplatform testing

13
SELENIUM GRID Simple steps from single platform to multiplatform testing by Anton Savka Test Automation Lead

Upload: skelia

Post on 22-Nov-2014

249 views

Category:

Software


0 download

DESCRIPTION

Catch a slideshow from Skelia QA Tech Talk held in June. Selenium WebDriver is generally used for running automated tests against single platform (OS + Browser). In this case quality coverage is intended also in one plane, where functionality is working as expected for particular group of users - the ones, who are using same platform. Selenium WebDriver has a way to extend our assurance in quality for users, who prefer environments, other then one under test. It is called Selenium Grid - network of central hub server and executable node servers. Skelia is a ICT and BPO services company, helping you achieve growth by extending your business with dedicated teams, outsourcing processes and providing consultancy on a wide range of technologies. http://skelia.com/ Stay tuned for more useful materials: https://twitter.com/Skelia_company https://www.facebook.com/Skelia.company http://www.linkedin.com/company/2851166

TRANSCRIPT

Page 1: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

SELENIUM GRID

Simple steps from single platform to multiplatform testing

by Anton Savka Test Automation Lead

Page 2: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

What is Grid ?

Page 3: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

┃ The latest JDK version is installed, all environmental variables are set

┃ Configured PCs, accessible in one network

Prerequisites

Page 4: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

Launch Hub

Page 5: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

Launch Node 1

Page 6: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

Launch Node 2

Page 7: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

java -jar selenium-server-standalone-2.41.0.jar

-port 7777

-role hub

Launch Hub

Page 8: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

java -jar selenium-server-standalone-2.41.0.jar

-role node

-hub http://localhost:7777/grid/register

-browser browserName=firefox,maxInstances=3

Node 1

Page 9: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

java -jar selenium-server-standalone-2.41.0.jar

-role node

-hub http://localhost:7777/grid/register

-browser browserName=chrome,maxInstances=3

-Dwebdriver.chrome.driver=d:\SeleniumGrid\chromedriver.exe

Node 2

Page 10: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

case Chrome:

caps.setBrowserName(BrowserEnum.Chrome.getBrowserName());

caps.setVersion("33");

caps.setPlatform(Platform.WINDOWS);

driver = new RemoteWebDriver(

new URL("http://+ HUB_URL + ":HUB_PORT/wd/hub"), caps);

break;

Driver trigger

Page 11: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

testng.xml

Single Browser Parallel Tests Run

Page 12: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

testng.xml

Multiple Browsers Parallel Tests Run

Page 13: Selenium Grid. Simple Steps from Single Platform to Multiplatform Testing

QUESTIONS?

Write to us: [email protected]

skelia.com