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

2

8

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?

Griddlecake answered 19/6, 2014 at 10:2 Comment(1)
Typically you would use the node/hub system if you were running your tests off your local machine. You could setup a hub and a number of nodes across your network, when you execute your test code that is pointing to the hub, it would then serve out the tests to the nodes. Currently running the hub on your local machine, you're doing to same as the java -jar selenium-server-standalone-2.32.0.jar in a way.Touter
F
5

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.

Flasher answered 19/6, 2014 at 10:32 Comment(0)
C
1

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!

Chris answered 11/8, 2014 at 21:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.