TestNG parallel Execution with DataProvider
Try to set the thread pool in following way:
@BeforeClass
public void setupClassName(ITestContext context) {
context.getCurrentXmlTest().getSuite().setDataProviderThreadCount(5);
context.getCurrentXmlTest().getSuite().setPreserveOrder(false);
}
You need to use dataproviderthreadcount
. The threadpoolsize
and invocationcount
values are not required. See details here.