distributing testing and test reporting with selenium
TRANSCRIPT
![Page 1: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/1.jpg)
Work Together Effectively
Distributed Testing and Test Reporting with Selenium
Christina Thalayasingam(Software Quality Assurance Engineer)22nd March 2016
![Page 2: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/2.jpg)
Work Together Effectively
Agenda• Introduction to Selenium• Selenium Components• Selenium Grid Introduction• Extent Reports for Test Reporting• Demonstration
![Page 3: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/3.jpg)
Work Together Effectively
What is Selenium ?• Selenium is a free (open source) automated testing suite for web
applications across different browsers and platforms.• Selenium provides a rich set of testing functions.• Selenium has 4 modules.
![Page 4: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/4.jpg)
Work Together Effectively
Selenium Components
Selenium WebDriver
Selenium Grid
Selenium IDE
Selenium RC
![Page 5: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/5.jpg)
Work Together Effectively
What is Selenium Grid ?• It’s allows you to run multiple tests across different browsers,
operating systems, and machines• Grid uses hub-node concept
– The hub is the central point where you load your test– Nodes are the selenium instances that will execute the tests that you loaded on
the hub
![Page 6: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/6.jpg)
Work Together Effectively
Grid 1.0 vs Grid 2.0
![Page 7: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/7.jpg)
Work Together Effectively
What is a Hub?• The hub is the central point where you load your tests into.• There should only be one hub in a grid.• The hub is launched only on a single machine.• The machine containing the hub is where the tests will be run, but
you will see the browser being automated on the node
![Page 8: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/8.jpg)
Work Together Effectively
What is a Node ?• Nodes are the Selenium instances that will execute the tests that
you loaded on the hub.• There can be one or more nodes in a grid.• Nodes can be launched on multiple machines with different
platforms and browsers. • The machines running the nodes need not be the same platform as
that of the hub.
![Page 9: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/9.jpg)
Work Together Effectively
Configuring Selenium Grid
Node 1http://192.168.1.26:5566
Browser - Firefox
Node 2http://192.168.1.26:5567
Browser - Chrome
Node 3http://192.168.1.26:5568
Browser - IE
Hubhttp://192.168.1.71:4444
![Page 10: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/10.jpg)
Work Together Effectively
Demo!
![Page 11: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/11.jpg)
Work Together Effectively
Designing Test Scripts• To design test scripts that will run on the grid, we need to use
DesiredCapabilites and the RemoteWebDriver objects.– DesiredCapabilites is used to set the type of browser and OS that we will automate– RemoteWebDriver is used to set which node (or machine) that our test will run
against.
• To use the DesiredCapabilites object, you must first import this package
• To use the RemoteWebDriver object, you must import these packages.
![Page 12: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/12.jpg)
Work Together Effectively
•Demo!
![Page 13: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/13.jpg)
Work Together Effectively
ExtentReportsFeatures• Very simple to use• Beautiful and responsive UI• Provides dashboard for the entire test run• Organizes all used media (Screen-captures) for the run in a single
view• Supports TestNG and Junit
![Page 14: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/14.jpg)
Work Together Effectively
Log Status of ExtentReports
Add the necessary information to extract PASS, FAIL, ERROR, INFO, etc..
extent.log(LogStatus.PASS, "Checking for the user");extent.log(LogStatus.FAIL, "Checking for the user");extent.log(LogStatus.WARNING, "User not present");extent.log(LogStatus.ERROR, "Used creation did not get through");extent.log(LogStatus.FATAL, "404 Error");extent.log(LogStatus.INFO, "Launching browser");
![Page 15: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/15.jpg)
Work Together Effectively
Demo!
![Page 16: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/16.jpg)
Work Together Effectively
Questions
![Page 17: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/17.jpg)
Work Together Effectively
We Are Hiring
www.zaizi.com/careers
Now looking for QA Automation Engineers
![Page 18: Distributing Testing and Test Reporting with Selenium](https://reader033.vdocuments.us/reader033/viewer/2022042908/58f2bcd61a28ab7d768b4597/html5/thumbnails/18.jpg)
Work Together Effectively
Thank you!