how to run my selenium script on multiple servers at the same time so that i would save one by one execution time ? Scenario: I have 1 hour of total testing time and 20 servers to test and 1 test script takes about 30mins to execute so i want to run my test script simultaneously on all 20 servers in order to save time.
The answer to your question is parallel execution There are multiple ways to achieve this like 1> Creating a Jenkins Job, Registering all the server machines as slave and executing jobon servers Or 2> A comparitively simpler and more widely used concept, using Selenium Grid To Implement Selenium Grid ( for instance with java as a programming language and TestNG framework) we need to take care that A. we have implemented Threading for our webdriver, so that each execution works on its own driver instance. B. We have our Testng.xml with attribute set as parallel=tests
You can easily get step by step guide to establish selenium grid to summarize it, We have one machine as hub(master), we have multiple machines or nodes(slave) registered to the hub, your automation code is supplied to the hub, Hub routes test on multiple nodes keeps track of individual execution and gets you the result on the Hub machine itself
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments