O'Reilly logo

TestNg Beginner's Guide by Varun Menon

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

Running test methods in parallel

In our previous example we had seen a simple class having two test methods being executed in multiple threads. As mentioned previously, TestNG provides multiple ways to execute the tests in a multithreaded condition, one of them is executing each test method in a single thread. This mode reduces the execution time significantly because more tests are executed in parallel, hence reducing the total execution time. In this section we will learn about executing test methods in parallel and will write a sample program, which executes multiple test methods from different classes in parallel.

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