Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 set-up, as a hub...

java -jar selenium-server-standalone-2.42.2.jar -role hub 

and an attached node...

java -jar .\selenium-server-standalone-2.42.2.jar -role node -hub http://localhost:4444/grid/register

which also seemed to work the same.

Is the hub/node set-up my best option just purely for configuration flexibility?

like image 634
Mr B. Avatar asked Jun 19 '14 10:06

Mr B.


People also ask

What is the difference between Selenium server and Selenium server standalone?

Selenium Standalone server is a java jar file used to start the Selenium server. It is a smart proxy server that allows Selenium tests to route commands to remote web browser instances. The aim is to provide an easy way to run tests in parallel on multiple machines.

What is hub and node in Selenium?

The hub is the central point wherein you load your tests. Nodes are the Selenium instances that will execute the tests that you loaded on the hub. To install Selenium Grid, you only need to download the Selenium Server jar file – the same file used in running Selenium RC tests.

Can Selenium hub and node on same machine?

Note: There is only one hub in selenium grid but can have multiple nodes.In normal scenario, Hub should be on same machine where Selenium WebDriver script is present. Node: Node is the part of Selenium Grid where all test script get executed. In Selenium grid architecture one or more than one nodes are allowed.


2 Answers

Hub/Node setup gives you the flexibility to run tests on different machines and different environment. Sometimes you may want to a run test in different browsers or different version of browsers ex on IE 6 to 10. In such cases you can setup multiple nodes with different versions of IE. While on single machine you cant have multiple versions of IE.
Also with Grid you can run multiple tests in parallel across different nodes. If your script doesn't demand such environments or parallel execution you can use single machine.

like image 82
Ajinkya Avatar answered Sep 22 '22 23:09

Ajinkya


Hub/Node is useful if you need to run tests on a variety of operating systems/browser configurations. For instance you could have Nodes running XP, Windows 7, Windows 8.1. Each of these machines could also be running a different version of each internet browser (if you need to support IE8 on Windows XP for instance). This allows you to test around a wide variety of configurations. I've found that running tests on my local machine is generally sufficient, but it really depends on the needs of your application.

For further reading check out:

http://www.guru99.com/introduction-to-selenium-grid.html and https://saucelabs.com/

Hope this helps!

like image 28
bobbyg603 Avatar answered Sep 22 '22 23:09

bobbyg603