Grid

Selenium Grid Hub and Node configuration using JSON

Selenium Grid is used to speed up the execution by using multiple machines (multiple browsers with different versions, and browsers running on different operating systems) and run tests in parallel. And also to reduce the time spent for running the test suite after developers check-in their code.

Execute webdriver tests in Parallel using selenium Grid

In previous article we have seen configuring selenium grid and execute a simple test on firefox browser. In this tutorial we will see 'Parallel execution of tests' using selenium grid and execute tests on firefox and chrome browser.

We will register multiple nodes to the Hub and execute tests in parallel. In the below example we will register a node in the same local machine where hub is running and other node in remote machine.

How to Setup a Hub and Node for Selenium Grid

Selenium Grid allows us to execute our tests in multiple machines (physical / virtual) and multiple browsers with different versions, which dramatically speeds up test execution and helps in reducing total amount of time required for test execution.

For example, if we have a script that takes 100 minutes to execute sequentially , we could break that down to 10 short tests script run across 10 machines, and can complete them in 10 minutes without copying your test code to the other machine.