Print

Different methods run in parallel on the same servers with same browser

In some cases, QA Engineers need to run different methods in parallel on the same servers with same browser. Selenium Grid 2.0 infrastructure supports parallel test execution with TestNG or JUnit. Here are the steps to run different methods in parallel on the same servers with same browser with TestNG.

 

Let's say, you have a computer with IP address 192.168.1.7 :

  • 192.168.1.7 working as a hub and node (can be Linux based or windows based; Lets assume it is a Windows box. )

 Let's start the hub and nodes on the machine 192.168.1.7 (run the command below as an administrator in the command prompt)

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

 

Step 1: start 1st node on the hub (run this command below in a new command console as an Administrator)

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

Step 2: start 2nd node on the hub (run this command below in a new command console as an Administrator)


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

 

Step 3: visit the hub console and confirm the two nodes

Hub and nodes are ready on the Selenium Grid. Now, write test code.

Click here for the source code.