[英]Can Execution be possible without using testng.xml file and using only pom.xml file in selenium java POM project?
How to execute Testng and Maven without testng.xml file using only pom.xml file如何仅使用 pom.xml 文件在没有 testng.xml 文件的情况下执行 Testng 和 Maven
No , it wouldn't be possible to execute Testng based Test Suite to be executed only through Maven ie using only pom.xml
without using testng.xml
.不,不可能执行仅通过 Maven 执行的基于Testng的测试套件,即仅使用pom.xml
而不使用testng.xml
。
You need to configure Maven ie pom.xml
with the desired testng.xml
file as a mandatory configuration as follows:您需要使用所需的testng.xml
文件将Maven即pom.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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.