Monday, September 3, 2018

Selenium Grid Ii Configuration - Setup Hub To Live Selenium Webdriver Tests

| Monday, September 3, 2018
We learnt what is Selenium Grid 2 together with when to usage it inward PREVIOUS POST. Selenium Grid is approximately other projection of selenium thus y'all hollo for to configure selenium grid 2 from scratch to execute selenium webdriver software exam cases parallel in grid. Let's elbow grease to configure selenium grid In unmarried machine together with and thus nosotros volition run selenium webdriver tests In It.

As described In my previous post, We hollo for to setup 1 hub together with multiple nodes (number of nodes depends on your requirement) to execute selenium webdriver software exam cases parallel on selenium grid nodes.

What Is Hub?
In selenium grid, Hub is a fundamental indicate which have software exam requests together with transportation those software exam requests to nodes for execution. In our representative of selenium webdriver, When nosotros kickoff executing software exam on selenium grid, Grid hub volition have together with create create exam requests together with and thus transportation them to registered node machine. We tin configure node on same machine or dissimilar machines too. We volition acquire to a greater extent than nearly nodes inward upcoming post.

Setting Up Selenium Grid ii Hub
To execute selenium webdriver exam cases parallel In selenium grid, We hollo for to laid upwards selenium grid hub In your machine which volition supply available capabilities together with configuration to webdriver tests.

Step 1 : Download Selenium Standalone Server jar
You tin download selenium standalone server from THIS PAGE.

Current latest version of selenium standalone server is 2.52.0 thus y'all volition acquire "selenium-server-standalone-2.52.0.jar" file. Put it inward D: drive.

Note : If your selenium standalone server version is dissimilar than usage that version release inward all bellow steps. Otherwise it volition non run for you.

Step ii : Start Selenium Grid Hub
To kickoff hub,
  1. Open ascendance prompt
  2. Navigate to D: create past times typing ascendance D: inward ascendance prompt.
  3. Type bellow given ascendance syntax inward ascendance prompt and press ENTER button.
java -jar selenium-server-standalone-2.52.0.jar -port 4444 -role hub

Command elements
  • selenium-server-standalone-2.52.0.jar -> Selenium standalone server jounce file version. Modify It every bit per your jounce file version inward higher upwards ascendance if it is non 2.52.0.
  • 4444 -> Port used past times hub to brain nodes.
Note : Please restart hub and  if seem upwards whatsoever effect on whatsoever phase during test. To restart grid ii hub
  • Press CTRL+c keys of keyboard to shutdown node.
  • Run higher upwards ascendance in 1 lawsuit once to a greater extent than to register node amongst hub.
Verify whether grid hub is running fine
It volition exhibit y'all message -> "Selenium Grid hub is upwards together with running." every bit shown inward bellow image.

Now y'all tin access selenium grid console using URL : http://localhost:4444/grid/console. Open this URL inward whatsoever browser. It volition exhibit y'all page similar bellow.

That way selenium grid hub is configured properly together with develop to use. We volition acquire how to configure nodes for seleniun grid ii hub inward NEXT POST.

Related Posts