How To Configure Selenium Grid ii Node To Run WebDriver Test

As described In my EARLIER POST, Selenium grid 2 Is useful to execute webdriver software tests on multiple nodes In parallel. So nosotros require to set upwards selenium grid 2 nodes for webdriver software examine execution. But earlier that, Your selenium grid hub should travel configured as well as inwards running trend equally described inwards my PREVIOUS POST. Now lets configure selenium grid 2 unmarried node to execute webdriver software automation tests inwards parallel inwards selenium grid.

Note : Here nosotros are configuring selenium grid node on same machine where selenium grid hub is running for your slow understanding. Later on nosotros volition larn how to configure hub as well as nodes on dissimilar machines as well as run software automation examine on it.

What Is Node
Node is the indicate which convey examine requests from hub as well as execute them. We tin sack configure node inwards such a way to execute tests inwards parallel on dissimilar browsers at the same time. Also nosotros tin sack laid max reveal of browsers allowed to run examine at a time, timeout etc. inwards upcoming posts.

Registering Selenium Grid 2 Node To Hub
We require to register selenium grid node to hub thence that hub tin sack empathize where to run software automation tests when have asking for examine execution. But earlier that delight read bellow given prerequisites.

Prerequisites :
  • Selenium grid hub should travel In running trend equally described In previous post.
  • "chromedriver.exe" file should travel located inwards D: drive. It volition travel needed to run tests inwards google chrome browser. Read THIS POST to know from where to download it if you lot produce non have "chromedriver.exe" file.
  • "IEDriverServer.exe" file should travel located in D: drive. It volition travel needed to run tests inwards Internet explorer browser.Read THIS POST to know from where to download it if you lot produce non have "IEDriverServer.exe" file.
  • Internet explorer browser's protected modes should travel enabled for all zones equally described in THIS POST and browser zoom marking should travel laid to 100% equally described inwards THIS POST.
Now follow the steps given bellow.
  1. Open approximately other ascendence prompt (Separate than hub ascendence prompt).
  2. Navigate to D: create yesteryear typing ascendence D: inwards ascendence prompt.
  3. Type bellow given ascendence syntax inwards ascendence prompt as well as press ENTER button.
java -jar selenium-server-standalone-2.52.0.jar -role node -Dwebdriver.ie.driver="D:/IEDriverServer.exe" -Dwebdriver.chrome.driver="D:/chromedriver.exe" -hub http://localhost:4444/grid/register -port 5566

Command elements
  • selenium-server-standalone-2.52.0.jar -> Selenium standalone server jounce file. Modify It equally per your jounce file version inwards higher upwards ascendence if it is non 2.52.0.
  • 5566 -> port reveal which volition travel used yesteryear node.
  • http://localhost:4444/grid/register : URL to register node where hub is running. Our electrical current configuration is running hub as well as nodes on same machine thence localhost inwards URL volition operate here. 
  • Note : If node Is running on dissimilar machine than the hub machine as well as thence you lot require to supervene upon IP address of hub machine amongst "localhost" inwards higher upwards URL.
  • -Dwebdriver.ie.driver="D:/IEDriverServer.exe" : Set path of IEDriverServer.exe file for node to run examine inwards network explorer browser.
  • -Dwebdriver.chrome.driver="D:/chromedriver.exe" : Set path of chromedriver.exe file for node to run examine inwards google chrome browser.
Note : Please restart hub as well as node if confront whatever upshot on whatever phase during test. To restart grid 2 node
  • Press CTRL+c keys of keyboard to shutdown node.
  • Run higher upwards ascendence 1 time once to a greater extent than to register node amongst hub.
We tin sack likewise configure how many browsers you lot require on specific node(Example : 2 Firefox, iii chrome as well as iii IE browsers) as well as max how many allowed browsers to run on specific node. We volition larn it inwards upcoming posts.

Verify whether grid node is running fine
When you lot type higher upwards ascendence In ascendence prompt, It volition demo you lot message similar "The node is registered to the hub as well as educate to use" equally shown In bellow Image. That agency you lot conduct keep configured node properly.


Now If you lot access URL : http://localhost:4444/grid/console. It volition demo you lot page similar bellow.

You tin sack see, at that topographic point are dissimilar browsers similar 1 IE, v Firefox as well as v chrome browsers which you lot tin sack exercise to run your software automation test. Now, Selenium grid is educate to exercise where hub as well as 1 node are running on same machine.

Now supposing nosotros conduct keep 1 examine instance as well as wants to execute it inwards parallel inwards dissimilar iii browsers. Can nosotros produce it using this configuration? Answer is Yes.. View my NEXT POST to know how to produce it using selenium grid 2.

More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM

http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post