InterviewSolution
| 1. |
How To Run Test Cases In Parallel Using Testng? |
|
Answer» we can use “parallel” attribute in testng.xml to accomplish parallel test execution in TestNG The parallel attribute of suite tag can accept four values: tests: All the test CASES inside <test> tag of testng.xml file will run parallel classes: All the test cases inside a java class will run parallel METHODS: All the methods with @Test annotation will EXECUTE parallel instances: Test cases in same instance will execute parallel but two methods of two DIFFERENT instances will run in different thread. <suite name="softwaretestingmaterial" parallel="methods"> we can use “parallel” attribute in testng.xml to accomplish parallel test execution in TestNG The parallel attribute of suite tag can accept four values: tests: All the test cases inside <test> tag of testng.xml file will run parallel classes: All the test cases inside a java class will run parallel methods: All the methods with @Test annotation will execute parallel instances: Test cases in same instance will execute parallel but two methods of two different instances will run in different thread. <suite name="softwaretestingmaterial" parallel="methods"> |
|