如何仅使用 pom.xml 文件在没有 testng.xml 文件的情况下执行 Testng 和 Maven
问问题
580 次
1 回答
0
不,不可能仅通过 Maven执行基于Testng的测试套件pom.xml
,即仅使用而不使用testng.xml
。
您需要使用所需的文件配置Maven ie作为强制配置,如下所示:pom.xml
testng.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
于 2019-11-29T07:37:03.250 回答