I have one @Test
method and I am getting the Test case names from @Dataprovider
. I need to run the test cases in parallel:
@Test(dataprovider="testdataprodivder")
public void TestExecution(String arg 1)
{
/* Read the testcases from dataprovider and execute it*/
}
@Dataprovider(name="testdataprodivder")
public Object [][]Execution() throws IOException
{
return new Object[][] {{"Developer"},{"Team Lead"},{"QA"},{"Business Analyst"},{"DevOps Eng"},{"PMO"} };
}
If I want to run the test cases in parallel i.e if I want to execute " Developer Team lead", "QA", "Business Analyst", "DevOps Eng", "PMO" in parallel what should I do?
5 browsers - Each running different test cases.
TestNG XML:
<suite name="Smoke_Test" parallel="methods" thread-count="5">
<test verbose="2" name="Test1">
<classes>
<class name="Packagename.TestName"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->