【问题标题】:How to export phpunit coverage to xml ( necessary for jenkins reports )如何将 phpunit 覆盖率导出到 xml(对于 jenkins 报告是必需的)
【发布时间】:2013-02-05 04:44:39
【问题描述】:

我正在使用 phpunit 和 jenkins,关键是 jenkins 通过使用带有测试结果的 xml 文件创建报告,但我不知道如何导出到 phpunit 中的 xml,目前我只看到了选项以 HTML 格式导出(用于覆盖)。

【问题讨论】:

    标签: jenkins phpunit


    【解决方案1】:

    来自 Sebastian Bergmann 的This project 应该给你一些建议。它提到了 PHPUnit 的以下配置...

    <logging>
     <log type="coverage-html" target="build/coverage" title="Name of Project"
          charset="UTF-8" yui="true" highlight="true"
          lowUpperBound="35" highLowerBound="70"/>
     <log type="coverage-clover" target="build/logs/clover.xml"/>
     <log type="junit" target="build/logs/junit.xml"
          logIncompleteSkipped="false"/>
    </logging>
    

    ...所以我认为您应该尝试使用--coverage-clover 而不是--coverage-html 来获取 XML 文件。

    【讨论】:

      猜你喜欢
      • 2020-06-07
      • 2012-05-07
      • 2018-02-22
      • 2020-07-10
      • 2014-04-16
      • 1970-01-01
      • 2012-08-23
      • 2013-08-14
      • 2019-04-24
      相关资源
      最近更新 更多