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

Protractor + Selenium Grid: Shard Test Specs Across Nodes

I recently setup a Selenium Grid (1 server for the hub, and 10 other servers which host 1 node each), and I have no issues running my Protractor automated tests. However, I'd like to shard my ~400 tests across all the nodes defined in…
4
votes
2 answers

Limiting the number of parallel tests with ThreadCount TestNG

I have a head scratcher here and I do not know how to handle this. I have several test classes that run via xml. Around 90 test classes, each with about 10+ @Test steps inside them. I have a selenium grid configued, with a maxSession=5 so no more…
Tree55Topz
  • 1,102
  • 4
  • 20
  • 51
4
votes
2 answers

Is there a way to schedule the shutdown of Selenium nodes without breaking tests?

I have set up a Selenium Grid with 3 different servers running nodes as windows services. I need to restart those machines regularly to avoid memory leaks and under performance. To do this I need to schedule a job to shutdown the nodes on a server…
4
votes
4 answers

can i use selenium grid on single machine

I don't have multiple machines at my job. I have one window and one mac for script execution. I was wondering if i can use selenium grid for script execution on single machine.I never used selenium grid. Any article, links or suggestion is highly…
Syed
  • 189
  • 1
  • 5
  • 11
4
votes
2 answers

Selenium grid and TeamCity integration

I'm new to TeamCity and Selenium Grid just trying to get my head around it. I'm trying to install Selenium grid. I am a bit confused about starting Selenium Grid. So on the Selenium site it explain to run commands: Hub: java -jar…
shiva
  • 714
  • 10
  • 25
4
votes
2 answers

Setting Device Width for Remote Webdriver in Selenium

I am using Selenium grid 40 with Firefox remote driver that runs in windows 7. I also use C# API. I was wondering how to Set Device width on headless Firefox browser. The device width is less than ipads max width and this causes it to pick up ipad…
4
votes
1 answer

Trouble Connecting Appium to Selenium Grid

I'm having some difficulty connecting Appium to Selenium Grid. Here's what I have for my nodeconfig file: { "capabilities": [ { "browserName":“iPhone5”, "version”:”6.1, "maxInstances": 1, …
Ben
  • 91
  • 1
  • 8
4
votes
2 answers

Selenium grid node with many phantomjs concurrent instances

I'm struggling to add a node with many concurrent PhantomJS instances. On GhostDriver github page you can find instructions which will register one node with only one instance of PhantomJS: phantomjs --webdriver=8080…
4
votes
1 answer

Chrome on remote webdriver (via Grid) failed to start

I'm having trouble launching Cucumber test with Chrome using remote webdriver capabilities on Grid (1 linux hub and 1 linux node with Firefox and Chrome). Firefox test go very well but Chrome returns the following error: unknown error: Chrome failed…
Pablo Gómez
  • 621
  • 1
  • 8
  • 18
4
votes
2 answers

Cannot launch selenium standalone server

After succesfully setting up selenium webdriver with testng, I want to move to Selenium grid 2. I have downlaoded the selenium-server-standalone-2.35.0.jar file, however when runnning this : java –jar selenium-server-standalone-2.30.0.jar –role…
Ziwdigforbugs
  • 1,185
  • 8
  • 24
  • 41
4
votes
1 answer

Redundancy for Selenium Hubs

I am running a large Selenium Grid and trying to achieve high availability. Currently I have a single point of failure at the Hub - if this machine goes down then my Grid goes down. I want to achieve redundancy. I'm looking for approaches which…
Kenn
  • 2,379
  • 2
  • 29
  • 38
4
votes
1 answer

Running WebdriverJS test on Selenium Grid

I have a Selenium Grid running on AmazonEC2 It consists of a hub running on port 7055 and a node running on port 7056. I have the following test: var webdriver = require('selenium-webdriver'), driver = new webdriver.Builder(). …
JasonM
  • 751
  • 6
  • 9
4
votes
1 answer

Can Selenium Grid be configured to require authentication?

How can I force the Selenium hub/node require a password to be accessed? I don't mean authenticate the browser. I mean require the Selenium server to ask for a password before it will execute a test. It seems that if you are running a Selenium hub…
Robert L.
  • 1,469
  • 1
  • 11
  • 10
4
votes
2 answers

Selenium webdriver - click() succeeded but didn't actually happend

I use selenium grid (to run test on 4 browsers: FF13, FF16, IE9 and chrome. each browser is on different machine. In the relevant section of the test, i find a clickable element and click on it. On FF13, IE9 and chrome it works just fine: element…
4
votes
2 answers

selenium grid - api for listing all available nodes

Is there an available API method for listing and getting information for all registered nodes for a Selenium Hub. I can use /grid/api/proxyid=nodeurl:5555 to get a particular nodes information, but can't seem to find a way to list all available…
kushan-
  • 168
  • 1
  • 7