Selenium Grid Overview

Chaya Thilakumara
Chaya Thilakumara
Published in
3 min readJan 3, 2019
Selenium Grid Overview

The Selenium Grid allow us to run our tests in different machines, operating systems and browsers.Through selenium remote’s capabilities you can specify the browser version,browser and the operating systems you want to run your test case.There are basic two elements under Selenium Grid — hub and nodes.

Hub

Hub is the central point where we can load our test cases.
Also it acts as a server to control the other test machines(nodes).
The Selenium Grid has only one hub and can have many nodes.

A test with Desired Capabilities is provided to the Hub, the Hub searches for the node which matches the given configuration (Browser,Browser version,Platform).If there is no match, the hub will trigger and error.

Nodes

A node is referred as a Test Machine which connects to a Hub. Test machine will be used by Hub to run your test cases. A grid network can have multiple nodes.A node is supposed to have different platforms and browsers.

Grid overview
  • Number of nodes are running in different machines (VM2,VM3 and VM4).
  • Hub server running in one node (VM1).
  • Hub (VM1) is connected to control nodes (VM2,VM3 and VM4).
  • VM2,VM3 and VM4 have four different browsers,versions and platforms.(VM2 is a windows machine,VM3 is a MAC machine and VM4 is a Linux machine)
  • Hub machine can have any type of operating system. (MAC/Windows)
  • In the code you have to mention the desired capabilities <platform/operating system,browser and browser version> you want to run your test case. You can send single request or multiple requests (multiple desired capabilities) using this desired capabilities.
  • In order to execute your code with a particular combination of desired capabilities, you must communicate that to the hub.In order to build up that communication, the server configuration needs to be done using RemoteWebDriver. Remote web driver is used to execute your program in a VM. You can pass any desired capability from remote driver and then it pass to server or the hub.Hub will decide on which machine the specific configuration is available.If a certain configuration is not available then it trigger and error.
  • Selenium Grid helps us to do cross browser testing in parallel mode.

See you soon with a another amazing article on Selenium Grid.There I am going to discuss on the implementation side of the Selenium Grid.

Happy Testing & Follow!!!

--

--

Chaya Thilakumara
Chaya Thilakumara

Pursue your passion, and everything else will fall into place.