Reputation: 675
I have the Selenium Grid hub set up with one local node running. I'm using windows 7.
I launched it in the command prompt using:
java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://localhost:4444/grid/register
I have a number of virtual machines all running different versions of Windows. I can access all of them using a remote desktop connection.
How can I get them to register as nodes on the Grid?
Do I have to install any selenium programs on those too?
P.S. All of them have the same ip address as my local machine(dunno if that makes a difference)
Upvotes: 3
Views: 6927
Reputation: 1180
The Selenium grid (2.0 and above) works in the traditional way by having a central server to which clients connect in order to wait for requests. The server (hub) manages incoming jobs and hands the jobs off to clients (nodes) that satisfy the runtime requirements (browser desired, OS desired, etc) The jar file you have is all you need to get started.
First, execute the jar in the hub role on the machine that will handle all incoming requests
java -jar selenium-server-standalone-2.22.0.jar -hub
After that, step out to all of the machines (in your case all of the virtual machines) and start up the same jar as clients
java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://[hostname]:4444/grid/register
Note the hostname in brackets. Replace this line with whatever the name of the machine is running the hub. If you're not sure what the name of your machine is, just type hostname
from the command line.
There are additional options you can play with but this should be enough to get a basic grid set up in your environment.
See The Official Documentation for further information.
Upvotes: 3