Wednesday, June 10, 2020

Test NG IMP Annotations



1. @Test(invocationCount=?)

This invocationCount determined how many times TestNG should run this test method.
Example 2.1

@Test(invocationCount = 10)
public void repeatThis() {
  //...
}

2. @Test(invocationCount = ?, threadPoolSize = ?)

The threadPoolSize attribute tells TestNG to create a thread pool to run the test method via multiple threads. With thread pool, it will greatly decrease the running time of the test method.
@Test(invocationCount = 3, threadPoolSize = 3)
  public void testThreadPools() {
}

No comments:

Post a Comment