Multithreading 在不同的线程中运行多个同步和异步测试套件
在我的testng中,我有多个测试套件。 对于一个例子来说Multithreading 在不同的线程中运行多个同步和异步测试套件,multithreading,parallel-processing,testng,maven-surefire-plugin,testng.xml,Multithreading,Parallel Processing,Testng,Maven Surefire Plugin,Testng.xml,在我的testng中,我有多个测试套件。 对于一个例子来说 <suite name="Suite"> <suite-files> <suite-file path="ASynchronousTestfile1.xml"/> <suite-file path="SynchronousTestfile2.xml"/> <suite-file path="SynchronousTestfile3.xml"/
<suite name="Suite">
<suite-files>
<suite-file path="ASynchronousTestfile1.xml"/>
<suite-file path="SynchronousTestfile2.xml"/>
<suite-file path="SynchronousTestfile3.xml"/>
</suite-files>
</suite>
现在,在单独的testng线程上运行套件。我正在使用surefire插件配置在不同的线程上运行它。大概是这样的:
<configuration>
<suiteXmlFiles>testng.xml</suiteXmlFiles>
<skipTests>false</skipTests>
<properties>
<property>
<name>suitethreadpoolsize</name>
<value>3</value>
</property>
</properties>
</configuration>
testng.xml
假的
suitethreadpoolsize
3.
现在,由于ASynchronousTestFile1.xml具有非依赖的测试用例,因此我希望此测试套件在多个线程上运行。
因此,我通过以下方式提供了套件本身的测试级并行性:
<test name="All Asynchronous Tests" parallel="methods" thread-count="7">
所以我的看法是总共有9个线程,其中2个线程将被定义为2个同步套件,异步测试套件将定义为7个线程
我遗漏了什么,或者实现这种情况的正确方法是什么