我有一种@Test
方法,我从@Dataprovider
. 我需要并行运行测试用例:
@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"} };
}
如果我想并行运行测试用例,即如果我想并行执行“Developer Team Lead”、“QA”、“Business Analyst”、“DevOps Eng”、“PMO”,我应该怎么做?
5 个浏览器——每个都运行不同的测试用例。
测试NG 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 -->