O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – getting our tests running in parallel

Now we are ready to start having our tests running in parallel.

  1. Open your TestNG XML configuration file.
  2. Add parallel=methods to the suite node.
  3. Add thread-count=3 to the suite node. This will run your tests with three threads. This number can be any value that you want. It is best practice to only let this number go to the number of cores that the machine running the tests has minus the number of Selenium Remote Controls running.
  4. Right-click on the configuration file in IDEA and run the tests.

What just happened?

We have just managed to get our tests running in parallel. As you can see this has been fairly easy. We saw that adding the parallel and the thread-count attributes allows us to run ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required