Phabricator phpunit配置 - 覆盖范围

时间:2017-08-02 15:28:22

标签: phpunit phabricator arcanist

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

  

.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?
  },
  ...
}

似乎arcanist没有获取覆盖范围信息。我已经尝试过查看phabricator源代码,但无法找到如何启用它的线索。

非常欢迎任何建议!

1 个答案:

答案 0 :(得分:-2)