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
7
votes
2 answers

Parameter Exception - was passed main parameter but no main parameter was defined in your arg class while launching Selenium Grid Node

Error: Parameter Exception - was passed main parameter but no main parameter was defined in your arg class Snapshot of the error: Hub - 10.72.24.148:5555 I am running node using command line: java -Dwebdriver.gecko.driver="C:\geckodriver.exe"…
7
votes
1 answer

Jasmine spec timeout when running Protractor tests on a remote selenium server

I have Protractor tests that run fine locally (directConnect: true), but when I try to run them on a remote Selenium server (Grid), I always get the following message. A Jasmine spec timed out. Resetting the WebDriver Control Flow. Looking at the…
7
votes
1 answer

Multi threaded Selenium WebDriver vs Selenium Grid

I am a newbie to Selenium and am using Selenium to navigate to multiple pages of the same website simultaneously while maintaining a session. I can create a controller in the following 2 ways: The controller initiates Selenium WebDriver in a…
7
votes
5 answers

Using Selenium RemoteWebDriver behind corporate proxy

How can I connect to a selenium grid such as BrowserStack via RemoteWebDriver from behind a corporate proxy? The application under test is outside the proxy and freely accessible from BrowserStack. This Using Selenium RemoteWebDriver behind…
Andrew Sumner
  • 793
  • 2
  • 12
  • 29
7
votes
5 answers

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. with FF version 26.0 and selenium standalone jar 2.39

I am trying to connect to selenium 2.30 with FF version 26.0 installed in my AWS unix machine but I am getting below error when I start both my client which access selenium. Also, when I try the same with selenium standalone jar 2.38.0, it works…
7
votes
1 answer

How do I get karma webdriver launcher to use my selenium server/grid

Can anyone help shed some light on to what is stopping Karma javascript test runner from connecting to and using my selenium grid/server? I have a successfully working selenium grid environment that I already use with python selenium bindings for…
Evolk
  • 171
  • 1
  • 1
  • 6
7
votes
2 answers

What is the difference between running the selenium standalone server and hub/node setup

I started with the selnium stand alone server setup java -jar selenium-server-standalone-2.32.0.jar Which allowed to me successfully connect and run my tests, with multiple browsers running at a time. What is the difference when i use the following…
Mr B.
  • 71
  • 1
  • 2
7
votes
1 answer

How to get statistics for selenium grid utilization

I'm using selenium grid with 13 nodes, each one is limited to one chrome instance. My project uses most of those nodes on different times. In the future, I will need to add more nodes - due to more tests, parallel exec., different browsers ,…
7
votes
2 answers

Create and upload a file on selenium grid

One of tthe test cases that I have is to upload a file to the application. Witouth grid this can be easily done by creating a bogus file and get absolute path of the file and fill the input field and click upload. However when I am using grid, the…
danggrianto
  • 371
  • 1
  • 4
  • 11
7
votes
1 answer

Selenium Grid: How to get node name (computer name or IP address) where current test is executed

I execute my tests under Grid Hub and 3 nodes run on 3 remote computers. In my log I can see the messages in random order posted from all these nodes. In order to analyze the logs I have to sort it by computer name. I tried it in following way…
Dima Star
  • 154
  • 4
  • 15
6
votes
1 answer

Selenium Grid Video Recording

I'm trying to record videos of my Selenium-Tests. These Tests run parallel on Selenium Grid. I wanted to open a VNC-Server for each firefox and then start recording. So one grid-node would open 5 vncservers and then a program like 'recordMyDesktop'…
user1222936
  • 61
  • 1
  • 5
6
votes
1 answer

Selenium Grid2 - Is it possible to run 10 Chrome instances?

Currently Selenium Grid2 running with the default config shows that it can run 5 firefox browsers, 5 chrome browsers and 1 IE. With a max of 5 instances at the same time. How can I change this so that it runs 10 chrome instances at the same time? I…
dgrandes
  • 1,187
  • 2
  • 14
  • 28
6
votes
2 answers

selenium.WebDriverException: unknown error: session deleted because of page crash from tab crashed

Note: My question was closed earlier, I tried solutions mentioned here - unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium -- added these options -…
Kpras
  • 163
  • 2
  • 2
  • 10
6
votes
1 answer

Is it possible to deploy Visual Studio Coded UI Tests to Azure or EC2 as Test Agents?

I'm not that entirely familiar with the testing suite that comes with Visual Studio 2010 (Ultimate) but I'm trying to find a means to produce something similar to Selenium Grid with the Coded UI Tests. I'd like to be able to deploy agents to Azure…
6
votes
1 answer

Is there a way too prevent selenium automatically terminating idle sessions?

I am using selenium for automating some interactions with websites. This process involves opening several browsers and having them perform actions intermittently. However, occasionally there are long (> 1 hour) periods of inaction, and selenium…