【发布时间】:2018-08-16 21:58:39
【问题描述】:
我正在尝试通过从命令行指定测试套件来从命令行运行我的测试。在我的 pom 文件中,它显示“无法解析符号 'suiteXmlFile'(对于 ${suiteXmlFile)。如果我在 pom 文件中指定 WebCheckout.xml 的名称,它可以工作,但我希望能够从命令行运行它,例如这个:
mvn clean test -Dsurefire.suiteXmlFiles=WebCheckout.xml
我一直在关注这个教程:
http://www.seleniumeasy.com/maven-tutorials/choose-selected-testng-xml-files-to-execute-using-maven
我的pom文件配置如下:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
请有人告诉我哪里出错了。
【问题讨论】: