I'm using Selenium for automated testing. What's the difference between
java -jar selenium-server-standalone-2.24.1.jar -role hub
and
java -jar selenium-server-standalone-2.24.1.jar -role webdriver
?
It seems to be the same. Or is there any difference?
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.
Unlike Selenium WebDriver which allows you automated browser testing in a sequential manner, a Selenium Grid setup will allow you to run test cases in different browsers/ browser versions, simultaneously. One of the reasons behind the huge popularity of Selenium is its capability to automate cross browser testing.
Hub − The hub can also be understood as a server which acts as the central point where the tests would be triggered. A Selenium Grid has only one Hub and it is launched on a single machine once. Node − Nodes are the Selenium instances that are attached to the Hub which execute the tests.
To double-check if the hub is up and running, you can simply type in http://localhost:4444/grid/console in your web browser of choice. Clicking on the View Config link pulls up a detailed configuration window with data that we succeeded in launching a Selenium hub.
Quoting from the official wiki page:
The Hub is the central point that will receive all the test request and distribute them the the right nodes.
Regardless on whether you want to run a grid with new WebDriver functionality, or a grid with Selenium 1 RC functionality, or both at the same time, you use the same selenium-server-standalone jar file to start the nodes.
My personal thought: The node is used for Selenium 1 (RC) and webdriver for selenium 2 (webdriver). In my personal setup i use role webdriver
If the wiki is not enough, I would suggest you to join Selenium users group
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With