build should fail if code coverage Report Percenatge is less

Deadly 提交于 2019-12-12 20:32:26

问题


I have written a build.xml for generating Reports through phing.

I have added below command in build.xml to generate code coverage Report ::

<exec command="phpunit  --coverage-html ./code_Coverage_Report codecoverage_test/CodeCoverage.php "/>

Now i wanted to add a check in build.xml that if my code coverage Report percentage is less than 85% then the build should automatically fail.


回答1:


This is not possible with PHPUnit. There was a pull request to implement what you want, but it was rejected.

https://github.com/sebastianbergmann/phpunit/pull/2402



来源:https://stackoverflow.com/questions/19537272/build-should-fail-if-code-coverage-report-percenatge-is-less

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!