Setting up Simple Selenium Grid


Selenium is one of the most commonly used tool to automate webpage testing. It is relatively simple to develop with, widely supported and supports most common browsers.

In a real project environment however, there is absolute need to quickly scale automated webpage testing in a simple and configurable manner. One of the more effective way to achieve this is to deploy Selenium Grid.


How can a tester scale Selenium testing in a quick and configurable manner?



Selenium Grid is conceived as a way to quickly scale automation testing by distributing tests to multiple machines (nodes). A central machine (hub) manages and oversees execution load in these nodes.

A tester can programmatically notifies the hub to run tests under certain manner (eg. browsers), and the hub distributes tests to relevant nodes.

Folks at SeleniumHQ are ensuring the Grid setup to be as easy as possible by following these steps:

1. Setting up a hub

Download the latest Selenium server jar from here. Place this jar into a machine designated to be the hub and execute this command:

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

This starts up a hub in the localhost using port 4444 as default. Other nodes in visible network may see and get connected to this hub.

2. Setting up a node

Place the same jar used in above steps into a machine designated to be the node. Execute this command below:

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

This tells the node to attempt connection to a hub in http://localhost:4444

3. Check Grid setup

We can check the Grid setup by accessing the hub’s console servlet: http://localhost:4444/grid/console



This is a very simple solution to setup a Selenium Grid. Next few topics will cover more advanced features of Selenium Grid; for example running tests, parallel testing, multi-browser execution and grid management.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *