【发布时间】:2017-06-29 03:45:37
【问题描述】:
【问题讨论】:
-
确保在 */target/sunfire-reports/.xml 中有一些 .xml 文件
-
是的,surefire-reports 文件夹中有一些 xml 文件。
【问题讨论】:
由于OP joan.li 添加了in the comments,您需要确保您的Jenkins 安装了解maven(如“Jenkins executing maven from incorrect path”中所述):
在(Jenkins -> 配置)下添加默认的maven安装
转到失败的作业并确保从下拉列表中选择默认的 maven 安装
你需要确保你的pom.xml does include a surefire build step
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
另见this example。
检查那些xml文件是否生成
【讨论】: