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
3
votes
4 answers

Selenium Grid support for Selenium 2?

I have read that Selenium Grid support was planned for Selenium 2.0 at the year end - 2010. Apparently it has not happened. Anyone knows of any updates on this?
Sumod
  • 3,806
  • 9
  • 50
  • 69
3
votes
2 answers

Can I use Cucumber with Selenium Grid to run the scripts on different node at the same time?

I have searched for same but faced with failure. Is there any other tool which can be utilised effectively to run the scripts on multiple node?
3
votes
1 answer

Selenium: Session externalKey not available

The Selenium Grid Hub I am running displays this error message whenever a Robot Framework automation test (kicked off by a Jenkins job) requests a Chrome browser from the Hub: Session [(null externalkey)] not available and is not among the last …
Glenn Doten
  • 2,603
  • 3
  • 21
  • 22
3
votes
0 answers

Unable to launch host angular app in docker chrome node via selenium grid

I am trying to get my e2e tests to run against a selenium grid and a chrome node that I have setup in docker containers linked together like so: So far I have managed to get the containers running via docker-compose version: '2' services: hub: …
mindparse
  • 6,115
  • 27
  • 90
  • 191
3
votes
0 answers

unable to create new remote session with remotewebdriver and gecko driver SessionNotCreatedException with Firefox

I am having issues with connecting selenium webdriver with firefox using GeckoDriver. My Firefox version is - Mozilla Firefox 52.8.1 pom.xml 3.3.0
3
votes
1 answer

How to run Selenium-Grid on CloudFoundry?

Did anyone run Selenium-Grid on CloudFoundry with routing provided by Gorouter? According to the "Selenium-Grid Documentation" we can pass the hub address to a node instance like that: java -jar selenium-server-standalone.jar \ -role node \ …
kinjelom
  • 6,105
  • 3
  • 35
  • 61
3
votes
1 answer

org.openqa.selenium.remote.ProtocolHandshake createSession INFORMATION: Attempting bi-dialect session with Selenium Grid

I set up a local selenium grid to test something. The build runs normal when connecting to another grid but when using the local grid the build just stops at this point: ------------------------------------------------------- T E S T…
Niko Lang
  • 549
  • 1
  • 5
  • 23
3
votes
4 answers

Selenium file_detector unable to find file to upload to selenium grid

Using selenium webdriver 3.12 and running a file upload tests on saucelabs(a selenium grid) as Win 10 chrome 66. I've tried to implement file detector and send keys into my code so that the system can take the file off my local machine and use it in…
Doug
  • 53
  • 5
3
votes
1 answer

Selenium/hub can't recognize selenium/node-chrome-debug while in network_mode = "host"

I use Docker to start my Selenium grid in network_mode = "host" so that I can access my local development site. Both the hub and node started, but when I check http://localhost:4444/grid/console, there's no node. I wonder if there is any way to…
Quinn Wynn
  • 1,334
  • 2
  • 15
  • 20
3
votes
1 answer

Selenium Docker: Firefox crashes when trying to open fancybox popup

I am using Selenium docker-compose with specs: ubuntu instance: 16.04 firefox browser version is 61.0 selenium version is 3.13.0 geckodriver version is 0.21.0. My docker-compose.yml file is as follows: version: "3" services: selenium-hub: …
3
votes
1 answer

init.d script for SeleniumGrid under CentOS 5.5

I'm establishing Continuous Integration environment for our team. And part of that environment is Selenium Grid running under the CentOS 5.5. I ran into a problem, i can't set up an autostartup for SeleniumGrid with a system. I've tried to write…
zEvg
  • 71
  • 5
3
votes
1 answer

org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities

Hub starting command : java -jar selenium-server-standalone-3.11.0.jar -role hub Node starting command : java -Dwebdriver.chrome.driver=/Users/alina/Selenium/chromedriver.exe -jar selenium-server-standalone-3.11.0.jar -role webdriver -hub…
3
votes
3 answers

"Cannot call method 'indexOf' of undefined" when using Google Chrome (*googlechrome) as Selenium RC target

I'm trying to run a test in Google Chrome 9.0.597.98 beta using Selenium Grid. I'm firing the test off from C# using the default *googlechrome target that ships with Selenium Grid. When I try to open a site, I'm greeted with a "Cannot call method…
Ryan Hayes
  • 5,290
  • 4
  • 42
  • 52
3
votes
2 answers

Selenium Grid: queue size of the Hub?

The Selenium Grid Hub distribute the tests launched between the registered RCs, but if there is no available RCs, it will enqueue them. Anyone knows the max size of this queue? I'm asking this because i suspect that if you enqueue a big number of…
3
votes
1 answer

Remote WebDriver UnreachableBrowserException: Could not start a new session

I got this exception for all browsers. For example, I create a remote webdriver on chrome like this: caps = DesiredCapabilities.chrome(); ChromeOptions options = new…
Ragnarsson
  • 1,715
  • 7
  • 41
  • 74