【发布时间】:2022-01-22 06:28:17
【问题描述】:
我正在为一个项目创建一个批次的多个测试套件。我有一个回归测试和一个冒烟测试。我需要从批处理文件中调用它,所以我需要在发布后运行回归,但每天都吸烟。但是当我运行时
cd %projectLocation%
call mvn clean test -DsuiteXmlFile=smokeTestRunner.xml
在文件中它仍然首先跳转到回归测试。这是我的万无一失的插件配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<suiteXmlFiles>
<!-- TestNG suite XML files -->
<suiteXmlFile>regressionTestRunner.xml</suiteXmlFile>
<suiteXmlFile>smokeTestRunner.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
如何让它分别只运行冒烟测试或回归测试? runner.xml 文件和 pom.xml 都在同一个目录中
【问题讨论】:
-
N. B.:
cd %projectLocation%应该是cd /D "%projectLocation%"...
标签: batch-file testng testng.xml