I'm using Selenium Grid2 for executing Selenium Scripts remotely.
Is anyone aware if the Grid2 Hub actually load-balance the workload?
For instance... I have a Grid Hub with 2 registered Nodes, both registered with the same capacities (5 firefox, 5 chrome). What I'm seeing is that all tests are being directed to the first registered node, even if the second node has no work at all.
Does this means that only after a node is at it's full capacity, then the Hub will redirect the job to the second node, and so on?
Thanks and Regards,
Rodrigo.
Related
As per the documentation:
Hub is the central point in the Selenium Grid that routes the JSON test commands to the nodes. It receives test requests from the client and routes them to the required nodes.
What is a hub in the Selenium grid?
Selenium Grid
Selenium Grid allows the execution of WebDriver scripts on remote machines (virtual or real) by routing commands sent by the client to remote browser instances. It aims to provide an easy way to run tests in parallel on multiple machines.
In simple words, Selenium Grid allows us to run tests in parallel on multiple machines, and to manage different browser versions and browser configurations centrally (instead of in each individual test).
Selenium Grid Hub
The Selenium Grid Hub is the central point where all your tests are sent. Each Selenium Grid consists of exactly one hub. The hub needs to be reachable from the respective clients (i.e. CI server, Developer machine etc.) The hub will connect one or more nodes that tests will be delegated to.
I am trying to run Selenium Grid.
Currently, I'm using v3.8.1 with one hub on 1 network and 20+ nodes of different networks registering to that Selenium hub.
It's executing fast when hub and node are created on the same machine where the application has deployed. Nodes created in other remote machines are comparatively slow.
Slow when we try to access particular Node by passing applicationName in capability instead of HUB selecting the node randomly.
More Info:
Windows server 2008, Ruby gem - selenium-webdriver-2.53.4, selenium-server-standalone-3.8.1, Java 8.
Tried Selenium Grid versions - 2.48, 2.49, 2.52, 2.53 and 3.8.1 as per https://github.com/SeleniumHQ/selenium/issues/1565.
Any help on this is appreciated. Thank You.
At last I got it. Its not a selenium node performance issue.
Its a rdp performance issue as it has shared resources.
Its working fine in individual VMs and in server machine.
Thanks You.
I want to run an automatic test develop with Protractor in parallel on 50 instances of google chrome using selenium grid on an 8CPU machine and 16GB RAM. but the machine becomes very slow and the load averge exceeds 40.
There is someone who can help me to increase the instances of chrome on this machine
Check Aerokube guys solution, it works way faster than original Selenium Grid:
Selenoid - Go implementation of original Selenium hub code. It
is using Docker to launch browsers.
GGR - A lightweight load
balancer used to create big Selenium clusters
I have a selenium grid set up with several nodes covering different operating systems and browsers which I use for cross-browser compatibility testing for a site. Those tests are automatically triggered as part of the Jenkins-controlled CI, and currently that grid is for the sole use of that site's testing.
However, does anyone know if there is a limit to the number of incoming test connections for a grid? I want to know if I can reuse this grid for testing another site, so a separate set of tests being triggered by different Jenkins jobs. Will that cause conflicts if the original set of tests happen to be running at the same time, or will the hub simply redirect the new stream of tests to a suitable, free node, and the two sets of tests would run happily in parallel?
If that is the case (parallel running) is there a known limit to how many different sets of tests would be able to use that same hub (assuming enough nodes were connected to service the requests coming in)?
or will the hub simply redirect the new stream of tests to a suitable, free node, and the two sets of tests would run happily in parallel?
This.
The hub can run as many tests in parallel as there are nodes connected. If a node has more than one browser available, you can use them all, given the -maxSession option is set correctly.
This is also interesting:
-browser < params > If -browser is not set, a node will start with 5 firefox, 1 chrome, and 1 internet explorer instance (assuming it’s on a windows box)
In Selenium Grid, is there any limit of nodes on the same machine.
I have 500 test suites to run in parallel, and considering to setup a hub with 25 nodes each with MaxSessions of 20 Firefox browsers in the same machine or should I run virtual machines with Linux platform and register my nodes there to the hub?
Thank you for your advises.
Yes, you can limit the number of nodes with selenium grid
you can do something like this:
Start Hub with max number of session (use -maxSession 500)
Start node with limited number browsers. Since you want 25 nodes, with 20 firefox browser. It would look like something like this (assuming you are using java):
Java -jar %SELENIUM_GRID_VERSION% -role node -hub %HUB_URL% -browser browserName=firefox,maxInstances=20,platform=LINUX
This will insure that only 20 firefox browser will open on node1.
I would advice you to use Virtual Machines to run your test suite. Especially since you want run your test suites parallel. Running on same machine will use up a lot of your computer resources and the nodes might not register with hub or give you an error like "Unable to bind to locking port XXXX within 45000 ms", causing your test to fail.