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

Configuring an independent test method to run in multiple threads

Earlier we discussed how to run classes, methods, and tests in parallel or in multithreaded mode. TestNG also provides the flexibility to configure a test method to be run in a multithreaded environment. This is achieved by configuring it while using the Test annotation on a method.

Let's look at an example of how to configure a test method to run in a multithreaded environment.

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