Automation QA Testing Course Content

Selenium Grid Setup with Docker

 Selenium Grid Setup with Docker





Step1)Install Docker on WIndows

follow the default website:https://docs.docker.com/desktop/install/windows-install/

Install WLS2

if docker has not started uninstall the docker and again install and accept the SLA


Step2)Pull Images

   1)Pull selenium hub image using below command

docker pull selenium/hub

2)pull node-chrome-debug image using below command

docker pull selenium/node-chrome-debug

3)pull node-firefox-debug image using below command

docker pull selenium/node-firefox-debug

4)pull node-edge image using below command

docker pull selenium/node-edge


Step 3)Start Grid3 Network

docker network create gridnetwork

Step4]Create and run the containers and link them

Hub -->docker run -d -p 4445:4444 --net gridnetwork --name seleniumHub selenium/hub

Node --->docker run -d -p 4446:5900 --net gridnetwork -e HUB_HOST=seleniumHub --name chromeNode selenium/node-chrome-debug

docker run -d -p 4447:5900 --net gridnetwork -e HUB_HOST=seleniumHub --name firefoxNode selenium/node-firefox-debug

docker run -d -p 4448:5900 --net gridnetwork -e HUB_HOST=seleniumHub --name edgeNode selenium/node-edge

Selenium Grid 4 Setup:

docker network create grid4nw

Step4]Create and run the containers and link them

Hub -->docker run -d -p 4445:4444 --net grid4nw --name seleniumHub selenium/hub:latest

vnc Node --->docker run -d -p 4446:5900 --net grid4nw -e SE_EVENT_BUS_HOST=seleniumHub  -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm-size="2g" --name chromeNode1 selenium/node-chrome:latest

no VNC Node

docker run -d -p 4447:7900 --net grid4nw -e SE_EVENT_BUS_HOST=seleniumHub  -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm-size="2g" --name chromeNode2 selenium/node-chrome:latest


firefox node:

vnc node

docker run -d -p 4449:5900 --net grid4nw -e SE_EVENT_BUS_HOST=seleniumHub  -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm-size="2g" --name firefoxNode2 selenium/node-firefox:latest

novnc node

docker run -d -p 4448:7900 --net grid4nw -e SE_EVENT_BUS_HOST=seleniumHub  -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm-size="2g" --name firefoxNode1 selenium/node-firefox:latest


edge node:

vnc node

docker run -d -p 4441:5900 --net grid4nw -e SE_EVENT_BUS_HOST=seleniumHub  -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 --shm-size="2g" --name edgeNode1 selenium/node-edge:latest


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.