Running automated test cases on VNC Viewer using docker

Rahul
2 min readMay 8, 2019

--

Virtual network computing (VNC) is a type of remote-control software that makes it possible to control another computer over a network connection but it also could be used to run automated test cases if you do not want to run them locally.

Commands:

docker run -d -p 4444:4444 --name zalenium1 selenium/hudocker run -d -P -p 5900:5900 --name zalenium1_node -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 --link zalenium1:hub -v /dev/shm:/dev/shm selenium/node-chrome-debugNEW COMMANDS:docker kill $(docker ps -a -q)docker rm $(docker ps -a -q)docker run -d -p 4444:4444 --name zalenium1 selenium/hubdocker run -d -P -p 5900:5900 --name zalenium1_node -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 --link zalenium1:hub -v /dev/shm:/dev/shm selenium/node-chrome-debug

Prerequisites:

Docker should be up and running.

Download and install Zalenium: It is a container based selenium grid with live recording. https://opensource.zalando.com/zalenium/

Steps:

  1. Download VNC Viewer not VNC server from — https://www.realvnc.com/en/connect/download/viewer/
  2. Start docker
  3. Run the above two commands which might take some time to load the images
  4. Now Open VNC Viewer and put the port shown on terminal: Usually it will be 5900: so put localhost:5900 on the VNC browser.
  5. If it asks for password it is : secret
  6. Now in test scripts put the platform to LINUX
  7. Now run the test cases and it is good to go

Link To Video: https://youtu.be/p4SOrePkEak

--

--

No responses yet