What is Selenium Grid?


Selenium Grid is a tool designed to distribute tests across more than one browser and environments. With this concept, we can trigger numerous test cases simultaneously on various devices and platforms. In short, it allows parallel execution.

Thus Selenium Grid helps to achieve concurrent test execution saving a large portion of resources.

So what are the advantages of using Selenium Grid?

  • Parallel execution results in saving a considerable amount of resources.

  • Allows cross browser testing.

  • With the help of more than one machine nodes, test execution can be scattered and then executed.

In Selenium Grid, a hub is a server that monitors concurrent execution on various machines. The machine which is registered to the hub is known as the node. The registration process is done to get the node information and thereby run the test cases. In actual scenarios, we have numerous nodes that can be present in a Selenium Grid.

Selenium Grid Extras is a collection of scripts that manage the nodes. Selenium Grid has the following features −

  • More command on the connected nodes.

  • Browser sessions are killed simply by name.

  • Processes are terminated by PID of the browser.

  • Mouse movement and shift with the help of coordinate.

  • Extract the physical memory and disk storage information trends.

  • Newer versions of WebDriver can be auto upgraded.

  • Restart node machines after a specific interval of time or interactions.

  • Management of all node information centrally.

  • Get the screenshots on failure scenarios and error conditions.

Some important terminologies in Selenium Grid.

  • MaxInstances − It is the number of browser sessions of the same versions that will run in one of the machines.

    For example,

    -browser

    browserName=firefox,version=60,maxInstances=4,platform=LINUX

    -browser

    browserName=InternetExplorer,version=10.0,maxInstances=4,platform=LINUX

  • So we can run 4 instances of Firefox 60 and as well as 4 instances of IE10 at the same time on the remote machine. So the total user can run 8 different browsers (FF & IE) in parallel.

  • MaxSession − It defines the number of browsers (irrespective of version and type) that can run in parallel on the remote machine. It overrides the MaxInstances configurations

Updated on: 10-Jun-2020

209 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements