【问题标题】:Phabricator phpunit configuration - coveragePhabricator phpunit 配置 - 覆盖
【发布时间】:2017-08-02 15:28:21
【问题描述】:

我正在尝试在 phabricator 的 DIFF 视图中设置覆盖率报告。我有以下配置:

.arcconfig

{
  "project_id" : "SuperProject",
  "conduit_uri" : "https://phabricator.dev/",
  "unit.engine": "PhpunitTestEngine",
  "unit.phpunit.binary": "./vendor/bin/phpunit",
  "phpunit_config": "tests/phpunit.xml"
}

测试/phpunit.xml

<phpunit>
    <testsuite name="unit">
        <directory suffix="Test.php">unit/accountancy</directory>
        ....
        <directory suffix="Test.php">unit/store</directory>
    </testsuite>
    <logging>
        <log type="coverage-clover" target="../build/logs/clover.xml" />
    </logging>
</phpunit>

但是当我运行arc unit --coverage --json 时,我得到如下内容:

{
  "0": {
    "namespace": null,
    "name": "Restriction\\CalculatorTest::testGetDiscount with data set #0",
    "link": null,
    "result": "pass",
    "duration": 0.00362205505371,
    "extra": null,
    "userData": "",
    "coverage": []   <-- why is it empty?
  },
  ...
}

似乎奥术师没有获取报道信息。我什至尝试过查看 phabricator 源代码,但找不到有关如何启用它的线索。

非常欢迎任何建议!

【问题讨论】:

    标签: phpunit phabricator arcanist


    【解决方案1】:

    【讨论】:

    • 这是一个边界线link-only answer。您应该在此处扩展您的答案以包含尽可能多的信息,并仅将链接用作参考。
    • 这不是完整的配置,我们有一个白名单。 HTML 覆盖工作正常。
    猜你喜欢
    • 2013-05-15
    • 2019-03-30
    • 1970-01-01
    • 2014-06-07
    • 2018-06-21
    • 2012-05-04
    • 2011-09-24
    • 2017-09-08
    • 2014-07-02
    相关资源
    最近更新 更多