【发布时间】:2018-11-06 00:45:03
【问题描述】:
我的项目有两个 testNG xml 文件,TestNG.xml 和 TestNG2.xml,它们都在根文件夹中。我已经进行了如下的maven pom配置,但是当我运行时,文件“TestNG.xml”运行了两次并且TestNG2.xml保持不变。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<suiteXmlFiles>
<file>TestNG2.xml</file>
<file>TestNG.xml</file>
</suiteXmlFiles>
<properties>
<property>
<name>suitethreadpoolsize</name>
<value>2</value>
</property>
</properties>
</configuration>
</plugin>
我也尝试过从 cmd 运行,但同样只有 TestNG.xml 运行了两次。
mvn clean test -Dsurefire.suiteXmlFiles=TestNG2.xml,TestNG.xml
如何同时运行这两个文件?
【问题讨论】: