<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
</dependency>
</dependencies>
groovy
dependencies {
testImplementation 'org.testng:testng:7.4.0'
}
import org.testng.annotations.Test;
public class MyConcurrentTests {
@Test(threadPoolSize = 10, invocationCount = 100)
public void testConcurrentMethod() {
}
}
import org.testng.annotations.Test;
@Test(threadPoolSize = 10, invocationCount = 100, timeOut = 10000)
public class MyConcurrentTests {
}
mvn clean test
@Test(threadPoolSize = 10, invocationCount = 100, dataProvider = "testData")
public void testConcurrentMethod(String data) {
}
@DataProvider(name = "testData")
public Object[][] provideTestData() {
return new Object[][]{{"data1"}, {"data2"}, {"data3"}};
}
@Test(threadPoolSize = 10, invocationCount = 100)
public void testConcurrentMethod() {
Assert.assertEquals(actualResult, expectedResult);
}