我需要从命令行运行多个XML套件文件。
我的POM.xml-
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/xml_Suites/${tests}.xml</suiteXmlFile>
</suiteXmlFiles>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
从命令行尝试-->
mvn clean -Dtests={abcd,xyz} test
仅触发xyz.xml而未触发abcd.xml。
基本上只触发括号中提到的最后一个xml文件。
以上语法有什么问题吗?
我需要从命令行运行多个XML套件文件。我的POM.xml-
我认为您需要指定使用高级路径更改-Dtests = src / test / resources / xml_Suites / abcd.xml,src / test / resources / xml_Suites / xyz.xml
以下示例为我工作: