I have a few PHP projects installed for a new team in Jenkins, and I'm trying to lower the expectations initially to help ramp them up on testing and everything. Initially we're shooting for 20% code coverage. I've adjusted the bounds in my PHPUnit config file to go green on code coverage when they hit 20% - so they can see they're heading in the right direction. but what I'm trying to do is update the weather report in my jenkins views to reflect the clover coverage as well, and I can't seem to do that!
I have the Publish Clover PHP Coverage Report checked in my jenkins project configuration, and my clover.xml is being generated from PHPUnit, but I'm not sure how to adjust the bounds for this.
logging from phpunit.xml.dist:
<logging>
<log type="coverage-html" target="build/coverage" title="ERC"
charset="UTF-8" yui="true" highlight="true"
lowUpperBound="10" highLowerBound="20"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
</logging>
Project settings coverage metrics
I initially didn't have the Publish Html Report enabled, but I've found that enabling it and modifying the percentages never had any affect after I saved and re-ran the build.
The bounds for the Jenkins weather report are defined in Jenkins and not in phpunit
It might look a little different for you depending on whether you use the Clover or the CloverPHP plugin but it's in the Jenkins settings page ether way :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With