Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium: difference between "role hub" and "role webdriver"?

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?

like image 791
ccman Avatar asked Jul 20 '12 12:07

ccman


People also ask

What is hub in selenium?

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 difference between selenium grid and WebDriver?

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.

What is hub and node in selenium grid?

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.

How can I tell if selenium hub is running?

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.


1 Answers

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

like image 61
Pavel Janicek Avatar answered Sep 22 '22 23:09

Pavel Janicek