需要一点帮助,以获得正确的方法来并行运行testng测试用例。使用testng |并行运行硒测试用例maven
当前设置。 在本地机器上使用单个驱动程序实例运行所有测试用例。 Selenium WebDriver TestNg Maven
必需。 想要在本地运行具有多个驱动程序实例的测试用例。
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
的testng.xml
<suite name="testSuite" verbose="10" preserve-order="true" configfailurepolicy="continue">
<test name="SanityTest" parallel="none">
<classes>
<class name="test.java.HeaderTests"/>
</classes>
</test>
</suite>
驱动
driver = new InternetExplorerDriver(capabilities);
driver.manage().window().maximize();
driver.get(url);
嗯..你在找什么,准确的?您是否尝试过使用TestNG parallel [属性](http://testng.org/doc/documentation-main.html#parallel-running)设置并运行测试? – user2611581
感谢您的回复。我正在研究如何设置驱动程序并行运行测试用例。我需要为不同的线程创建多个实例吗?或者我可以只使用单个驱动程序实例吗? – iamvroon