BAEL-701 Introduction to TestNG
This commit is contained in:
14
testng/src/test/java/baeldung/com/MultiThreadedTests.java
Normal file
14
testng/src/test/java/baeldung/com/MultiThreadedTests.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package baeldung.com;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class MultiThreadedTests {
|
||||
|
||||
@Test(threadPoolSize = 5, invocationCount = 10, timeOut = 1000)
|
||||
public void givenMethod_whenRunInThreads_thenCorrect(){
|
||||
int count = Thread.activeCount();
|
||||
Assert.assertTrue(count>1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user