Selenium Grid + TestNG - Parallel Execution

This blog is about testing in parallel against Selenium Grid Docker images.

In my previous post  "Google Cloud + Docker Compose + Selenium Grid" - we went through installing Selenium Grid Docker images in the Google Cloud by:
  1. Pulling down the images
  2. creating our docker-compose file
  3. running the containers
  4. scaling a Selenium Nodes (test agents) to 15
That is all fine and dandy but lets actually run a test against it.

  • Pull down the project
  • In Eclipse edit Test1.java

Note : I've provide bullet points 1 & 2 in an Eclipse NEON testNG project that has 1 test and the docker compose file in github - https://github.com/CharlieKuharski/parallel-selenium-grid.git


  • Right Click on Test1.java and Run the Test

RESULTS:
I've set my tests to as :@Test(threadPoolSize = 3, invocationCount = 3) 


Painless.  Its a good way to live.