Questions tagged [selenium-grid]

Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a *distributed test execution environment*.

Selenium Grid is a component of the Selenium project that allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. The tests can be run on any number of machines at the same time.

It provides both environment management and resource allocation as it dispatches your tests against nodes in the grid. The environment management allows you to exert finer-grained control over the environment executed in than Selenium Server provides itself. For example, you can target your tests at specific browser versions or particular platforms.

Selenium Grid consist of HUB and Node. Selenium stand alone server jar executable can work as both Node and Hub. In order to configure Grid there must be a single HUB (selenium server running as HUB), and one or more Nodes (selenium server running as Node) attached to the HUB.

PROS AND CONS

Selenium Grid isn't a silver bullet. It solves a subset of common delegation and distribution problems, but will for example not manage your infrastructure and might not suite your specific needs.

Pros

  1. Scale. Scale by distributing tests on several machines using parallel execution.
  2. Central. Manage multiple environments from a central point, making it easy to run the tests against a large combination of browsers and operating systems.
  3. Minimize. Minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage a virtual infrastructure of registered nodes.
  4. Cross-Platform. If your tests are running on one particular platform, by using a node on another platform you effectively have cross-platform testing.
  5. Smart. Grid can route commands to a certain version of a browser if you have two or more nodes registered, each pointing to a different version of the browser binary.

Cons

  1. Prompted input. You have no capabilities for user input if your tests want to prompt for user input whereas you would if your tests ran locally.
  2. Maintainability. You also need to maintain the health of other computer systems which run your nodes.
  3. Limited power. Certain third party libraries have limitations that prevent them from being used in conjunction with Grid.

References:

  1. Selenium Grid docs on seleniumhq.github.io
  2. Selenium Grid docs on seleniumhq.org
  3. Running Standalone Selenium Server form command line
  4. Selenium to Start Hub Server and register Nodes with Hub
1873 questions
0
votes
1 answer

InternetExplorerDriver throws WebDriverException with findElement method: NoSuchWindowException. How do I stop this?

We started a new Selenium environment with Selenium 3.4, using a grid configuration with a Linux-based hub and a Windows Server-based node. InternetExplorerDriver started throwing NoSuchWindowException when run remotely. I got the following…
0
votes
1 answer

Unable to understand WebDriver execption?

I am getting Web-driver exception while running a selenium code for grid.Here is code detail: Chrome Version : 58.0.3029.110 (64-bit) Selenium server : 3.4.0 @Test public void Testgrid() throws MalformedURLException{ DesiredCapabilities cap =…
0
votes
1 answer

Selenium: Unable to run GhostDriver(phantomJS) node on Docker Selenium Grid Setup

I am trying to run my automation scripts using Selenium Grid setup and the docker images found at: https://github.com/SeleniumHQ/docker-selenium. I am able to get the Docker Selenium Hub and ready to go. This is what it looks like on my Grid Console…
jaredgilmore
  • 657
  • 8
  • 17
0
votes
1 answer

Starting phantomjs node on Selenium grid on a external machine

I am trying to start a phantomjs node on a virtual machine to connect to my own computer which hosts the hub. I have gotten a generic node set up externally (5 instances of firefox, chrome and one instance of IE). When I try and set up a phantomjs…
Jay
  • 61
  • 2
  • 14
0
votes
1 answer

Optimize Selenium tests for parallel execution

Currently, I have five instances of phantomjs set up on my Selenium Grid all on different nodes. I am trying to run 5 parallel tests at once, but some of these tests will fail. Each time, it is a different test that will fail on different lines. I…
Jay
  • 61
  • 2
  • 14
0
votes
0 answers

Selenium grid not working in internet explorer 11

Selenium Grid and Hub working perfectly fine and running accordingly, but I'm unable to run the tests on https://i.stack.imgur.com/4g1x1.png and selenium-standalone v2.53. My grid console: My error: public class testSample { @Test public void…
heardm
  • 19
  • 2
  • 11
0
votes
1 answer

Register phantomjs node to Selenium Grid

I am currently running Selenium Grid 3.4.0 and phantomjs 2.1.1 on a windows platform. When I try to register a phantomjs node onto my hub the following error occurs: K:phantomjs-2.1.1-windows/bin/phantomjs.exe --webdriver=8080…
0
votes
4 answers

unable to register node to hub in selenium

My hub is working successfully and running java -jar selenium-server-standalone-2.53.0.jar -role hub -port 5555 my node command java -jar selenium-server-standalone-2.53.0.jar…
heardm
  • 19
  • 2
  • 11
0
votes
1 answer

Registering phantomjs node on Selenium Grid

I have already run my tests in parallel on Selenium Grid using multiple chrome instances. How would I set up Selenium Grid so that I can run my tests using multiple phantomjs instances instead of chrome.
Jay
  • 61
  • 2
  • 14
0
votes
1 answer

selenium grid execution slows down with time

I am running multiple data validation test on selenium grid (only chrome browsers) on CentOS stack. I notice that initially the tests complete real quick. However, with time, the execution slows down considerably. I am trying to validate data from a…
BountyHunter
  • 1,413
  • 21
  • 35
0
votes
1 answer

Selenium Grid session terminated because SO_Timeout

From C# client, my driver variable returns "Selenium Grid session terminated because SO_Timeout" after 2 seconds. I'm looking for a way to increase that from SE Grid server since it looks like I need to increase the timeout from Selenium…
Buu Tran
  • 1
  • 1
0
votes
1 answer

Selenium Grid doesn't work with more than one session

I'm using Selenium grid with a couple of virtual machines. So each machine is one node. I'm trying to start a selenium test that will end up on one of the machines (due to capabilities) and then start the same test again at the same time. So the…
yeaitsme
  • 91
  • 1
  • 9
0
votes
1 answer

selenium grid connection timed out

I want to automate tests using bamboo CI server. I set up selenium-grid on the server and on the nodes using this jar I'm able to see the nodes in the grid console, but when I run the test I have a timout error :…
Joël
  • 105
  • 2
  • 10
0
votes
1 answer

On applying Selenium Grid concept only one random node among several nodes is chosen for execution

On applying Selenium Grid concept only one random node among several nodes is chosen for execution. How to make the same test to be executed on multiple nodes? The combination I use to execute the script: Selenium(Java)+Junit Framework.
Dhuruvan
  • 91
  • 10
0
votes
1 answer

Selenium SouceLabs - java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

I have built an UI automation framework with Cucumber-jvm and selenium webdriver, for cross browser testing i have selenium grid which gets executed successfully locally but when i point the selenium grid to soucelabs grid it throws the below error,…
Yogiraj
  • 223
  • 1
  • 4
  • 15