问题
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