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
9
votes
1 answer

How to find chrome driver version in use for a node on a Selenium grid

Is there a way to check the chrome driver version in use on a particular node remotely? I know running chromedriver.exe -v directly on the node will report the driver version. But is there any way to query this through the selenium grid api? I've…
Chris R
  • 2,464
  • 3
  • 25
  • 31
9
votes
4 answers

Selenium Grid VS Jenkins

I am using TestNG framework for selenium webdriver scripts. I run them periodically using Jenkins in slave machines. I do not use Selenium Grid. What is the advantage of using selenium grid over jenkins in running the webdriver automated testcases?…
KitKarson
  • 5,211
  • 10
  • 51
  • 73
9
votes
3 answers

Do Watir-Webdriver and Capybara have performance issues when compared to Webdriver?

I am about to change my test automation language from Java to Ruby (I have new job where Ruby fits better into the tech stack). I have a lot of experience with Java and Webdriver but can see that wrappers such as Watir and Capybara appear to be used…
9
votes
4 answers

Executing tests Concurrently on different OS and Browsers with WebDriver using Java and TestNG

I have configured grid in my system and written my test script. I can run my test on any specified OS and any Browser but only on one OS and one Browser at one time not all OS and all Browser simultaneously. Here is what I have done. Please tell me…
Kapil
  • 1,790
  • 1
  • 16
  • 32
8
votes
5 answers

Selenium Grid 2 set up on Windows

I am setting up Selenium Grid 2 (selenium-server-standalone-2.1.0) on Windows 7 (I have also tried Windows Server 2008) both 64 bit. I test the WebDriver locally and all is well. I launch the hub with: java -jar selenium-server-standalone-2.1.0.jar…
idsweb
  • 101
  • 1
  • 1
  • 5
8
votes
1 answer

Run Parallel Execution on Selenum Grid

ChanGan
  • 4,254
  • 11
  • 74
  • 135
8
votes
1 answer

Unable to create new remote session - Selenium webdriver

I am getting exception Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, browserName=firefox, version=48.0.1,…
Sona Shetty
  • 997
  • 3
  • 18
  • 41
8
votes
0 answers

Selenium Grid hits command timeout Before newSessionWaitTimeout

Problem In my selenium grid setup, my session requests (that are waiting for empty slots to become available) timeout before hitting the newSessionWaitTimeout because they are hitting the RemoteWebDriver command timeout. Details I sometimes have…
cdzar
  • 494
  • 4
  • 9
8
votes
1 answer

Difference between timeout and browserTimeout

I just started using Selenium Grid. The current problem I'm facing is when a test crashes. The browser stays open forever until I arrive and close it myself so the next set of tests can start. I noticed that the NODE configuration has two timeout…
vianna77
  • 495
  • 1
  • 7
  • 17
8
votes
4 answers

How to change the default download directory with IE (Internet Explorer 11)

In this post I see the solutions for setting the download directories for Chrome and Firefox how to change file download location in Webdriver while using chrome driver/firefox driver These worked perfect for me (the accepted answer that is),…
8
votes
5 answers

How can I run NUnit(Selenium Grid) tests in parallel?

My current project uses NUnit for unit tests and to drive UATs written with Selenium. Developers normally run tests using ReSharper's test runner in VS.Net 2003 and our build box kicks them off via NAnt. We would like to run the UAT tests in…
Benjamin Lee
  • 1,160
  • 3
  • 13
  • 18
8
votes
1 answer

Error running PhantomJS with Selenium RemoteWebDriver

I start a selenium grid hub with it's default startup command, java -jar selenium-server-standalone-2.33.0.jar -role hub And I start up PhantomJS in it's webdriver mode, on the same machine, like, phantomjs --webdriver=8080…
seaders
  • 3,878
  • 3
  • 40
  • 64
8
votes
4 answers

Selenium Grid on Multiple Browsers: should each test case have separate class for each browser?

I'm trying to put together my first Data Driven Test Framework that runs tests through Selenium Grid/WebDriver on multiple browsers. Right now, I have each test case in it's own class, and I parametrize the browser, so it runs each test case once…
Bryan
  • 83
  • 1
  • 5
8
votes
2 answers

Getting a 404 on /wd/hub/session when I try to connect to selenium grid remotely via Python

I can see two remotes under the console but when I try to connect remotely and execute something it fails with a 404. from selenium import webdriver browser = webdriver.Remote( …
Ryan Detzel
  • 5,519
  • 9
  • 37
  • 49
7
votes
4 answers

Selenium Grid2 - Remote Node not connecting to HUB

My current setup is I have a selenium RC running as a hub on a windows machine(lets assume machine name is machine.name.com). I have used the following command to start it java -jar selenium-server2.15.jar -role hub -port 5555 I have a selenium…
Amey
  • 8,470
  • 9
  • 44
  • 63