How to run selenium test case in two different nodes? -
actually need run single selenium test case in 2 different nodes using firefox browser (selenium grid) , have started hub using below command
java -jar selenium-server-standalone-2.32.0.jar -role hub
started 2 nodes 2 different port nos :
node :1
java -jar selenium-server-standalone-2.32.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 7575 -browser browsername=firefox,version=18,platform=windows
node :2
java -jar selenium-server-standalone-2.32.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 8585 -browser browsername=firefox,version=18,platform=windows
but when execute test case can view execution in 1 node other node remains still, shows done :/status
no execution has taken place
can u please out solve problem
thanks in advance
tester approach:
- make test runnable indipendent
.jar
file. means test wil not@test
method or piece of code insidemain
method - pro tip: if can, run nodes against same hub. can done if computers in same network , can access these computers.
- if can done, run
.jar
file twice, telling huib is, , nodes assigned automatically - if cannot done, have deploy these
.jar
files on each computer (node) , run them (requires 2 people in cases)
example:
my own computer has ip 10.131.7.11
inside local network. run hub , each node this:
java -jar selenium-server-standalone-2.32.0.jar -role webdriver -hub http://10.131.7.11:4444/grid/register -port 7575 -browser browsername=firefox,version=18,platform=windows
once nodes running, run test twice. hub automatically assign browsers concrete node.
developer approach:
- you can use multithreading , run test once, in 2 threads.
but since tester, use first approach :) , did communicate our developers helped me create multithreading test suite idiot proof (tested on myself :) )
Comments
Post a Comment