【问题标题】:Jenkins:can not see test report tabJenkins:看不到测试报告选项卡
【发布时间】:2017-06-29 03:45:37
【问题描述】:

我在这里看不到报告标签:

Public Junit 测试报告:

我已经配置了Public JUnit测试报告,但是左侧区域还是看不到测试报告。

【问题讨论】:

  • 确保在 */target/sunfire-reports/.xml 中有一些 .xml 文件
  • 是的,surefire-reports 文件夹中有一些 xml 文件。

标签: jenkins junit


【解决方案1】:

由于OP joan.li 添加了in the comments,您需要确保您的Jenkins 安装了解maven(如“Jenkins executing maven from incorrect path”中所述):

  1. 在(Jenkins -> 配置)下添加默认的maven安装

  2. 转到失败的作业并确保从下拉列表中选择默认的 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文件是否生成

【讨论】:

  • org.codehaus.mojocobertura-maven-plugin2.4xml html
  • @joan.li 不要犹豫,编辑您的问题以添加新信息。
  • surefire-reports 文件夹中有一些 xml 文件。
  • 所以这就是你的情况所缺少的。检查我的答案中的第一个链接以获取完整的 pom.xml 示例。
猜你喜欢
  • 2013-05-05
  • 2016-05-03
  • 1970-01-01
  • 2018-12-06
  • 1970-01-01
  • 2012-11-28
  • 1970-01-01
  • 2014-06-06
  • 2023-01-30
相关资源
最近更新 更多