Selenium Grid and Web Driver - Running multiple tests on multiple machines or browsers

Notes on Selenium Grid

Summary of my Understanding
Selenium-Grid support distributed test execution.
Selenium-Grid allows you run your tests on different machines against different browsers in parallel
It is useful in distributed test execution environments.

Selenium-Grid 2.0 is the latest release

To run your tests against
multiple browsers, (IE, Firefox, Chrome, Opera etc.,)
multiple versions of browser, and ( Firefox 23,24,25 etc)
browsers running on different operating systems. ( Windows 7, Windows 8 etc.,)

Additional Information
A grid consists of a single hub, and one or more nodes.

Starting a hub:

java -jar selenium-server-standalone-2.38.0.jar -role hub

The hub receives a test to be executed along with information on which browser and ‘platform’ (i.e. WINDOWS, LINUX, etc)
It ‘knows’ the configuration of each node that has been ‘registered’ to the hub.


To start a node using default parameters, run the following command from a command-line.

java -jar selenium-server-standalone-2.38.0.jar -role node  -hub http://localhost:4444/grid/register

 If running the hub and node on separate machines, simply replace ‘localhost’ with the hostname of the remote machine running the hub.

WARNING: Be sure to turn off the firewalls on the machine running your hub and nodes.

If this occurs you can either shutdown the other process that is using port 4444, or you can tell Selenium-Grid to use a different port for its hub. Use the -port option for changing the port used by the hub.

Configuring Grid
java -jar selenium-server-standalone-2.38.0.jar -role hub -port 4441

To see the ports used by all running programs on your machine use the command.
netstat -a


Configuring Node
The Selenium-Server provides two distinct functions, that of the Selenium-RC server
and that of Selenium-Grid

If you simply pass a -h option as you might first assume, you get the Selenium-RC Server options
but not those for Selenium-Grid.This would give you Selenium-RC’s server options.

Selenium-RC -help option
java -jar selenium-server-standalone-2.38.0.jar -h

Selenium-Grid -help option
java -jar selenium-server-standalone-2.38.0.jar -role node -h



Source: http://docs.seleniumhq.org/docs/07_selenium_grid.jsp

Analytics