4

I'm new to TeamCity and Selenium Grid just trying to get my head around it. I'm trying to install Selenium grid. I am a bit confused about starting Selenium Grid. So on the Selenium site it explain to run commands:

Hub:

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

Node:

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

for node.

My question is: is this a one off command? or do I need to add these command in my build config and add them as steps in the TeamCity?

shiva
  • 714
  • 10
  • 25
  • This is selenium grid tutorial page that I am talking about http://www.seleniumhq.org/docs/07_selenium_grid.jsp – shiva Apr 29 '15 at 20:52

2 Answers2

3

To answer my own question after doing some reasearch and trial and error:

Yes, this is a one off command. We don't add it into build config. Selenium Hub and nodes should get started by the scripts I mentioned in the question. You need to login to eaxh box and run the script invidualy for each box.

We do not restart our CI boxes, obviously if we did we have run the scripts again.

Probably it worth to have a some sort of a script to make sure that hub and nodes are running.

Unfortunately usually tech tutorials assume you know everything!

shiva
  • 714
  • 10
  • 25
  • I would like to add you could add scripts into your windows startup folders to automatically startup the Nodes on startup of these PCs. (You can also set up automatic login in Windows if your environment allows it). The same can be done for the Hub. – Dean Meehan Sep 17 '18 at 14:15
0

These are commands you need to run once on the machine and then it stays running until you stop it or restart the machine. You can go to the hub machine address like this: http://ipaddress:4444/grid/console to see if your grid and nodes are available. There are also new selenium jars available. 3.8 is pretty stable but they are working on a 4.0

Shannon McRae
  • 231
  • 3
  • 10