[英]How to generated detailed code coverage report with xdebug?
我正在使用PHPUnit 8.0.4,我的報告如下所示:
Classes: 0.00% (0/1)
Methods: 37.50% (9/24)
Lines: 55.91% (123/220)
我正在使用以下所示的參數運行命令:
phpunit --coverage-html build/coverage-report --configuration phpunit.xml --testsuite query-parser
這些是我在phpunit.xml中的日志記錄設置:
<logging>
<log type="coverage-html" target="./tmp/report" lowUpperBound="35"
highLowerBound="70"/>
<log type="coverage-clover" target="./tmp/coverage.xml"/>
<log type="coverage-php" target="./tmp/coverage.serialized"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
<log type="junit" target="./tmp/logfile.xml"/>
<log type="testdox-html" target="./tmp/testdox.html"/>
<log type="testdox-text" target="./tmp/testdox.txt"/>
</logging>
我想看看為了編寫其他測試以覆蓋100%的代碼而未涵蓋哪些行和方法。
您似乎創建了各種格式的代碼覆蓋率報告,但只看了一份純文本(IMO沒用)。 打開./tmp/report/index.html
查看HTML報告。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.