Docker Community Forums

Share and learn in the Docker community.

How to Run Multiple Selenium testcases in multiple docker containers


(Satishd1) #1

Hi All,

I have automated 3 test case using Selenium. Now i was wanted to create 3 containers and run each script in each machine parallel.

Below is the code snippet from docker-compose file
image

And below is the code i have in my script.
DesiredCapabilities cap = DesiredCapabilities.Chrome(); cap.SetCapability("version", ""); cap.SetCapability("platform", "LINUX"); driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), cap);

And when i try to run my script. The execution happens sequentially in the Cloud VM and not parallel. I mean the first script will run in first VM after the execution, the second script will run in second machine and so on.

Your help is appreciated.

Thanks in Advance.