[ https://issues.jenkins-ci.org/browse/JENKINS-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161244#comment-161244 ]
Rob Hunter commented on JENKINS-8326: ------------------------------------- I'd also like to have support for failing the build when the coverage gets worse than it was. I've been looking at different options like: * post-build script to re-configure thresholds with Groovy * post-build script to re-configure thresholds with HTTP API * thresholds use variables ${COBERTURA_MIN_METHOD_COVERAGE} or something It'd be super-nice if the Cobertura plugin supported "ratcheting" limits like this but I'd be happy if it were obvious how to source the thresholds from anywhere other than a fixed value in the Web interface. (FWIW, I don't think this is a duplicate of JENKINS-11025 -- that only covers static thresholds, this ticket covers dynamic thresholds) > Support for ratcheting > ---------------------- > > Key: JENKINS-8326 > URL: https://issues.jenkins-ci.org/browse/JENKINS-8326 > Project: Jenkins > Issue Type: New Feature > Components: cobertura > Reporter: johnsmart > Assignee: stephenconnolly > > It would be very useful to add support for ratcheting. This would involve > making the build job fail or become unstable if the code coverage for a build > drops below the code coverage of the previous build. The plugin could keep > track of the highest code coverage metrics values from previous builds, and > check against this. If the current results are lower, the build fails. If > not, the latest values are stored as the new reference values. > This is very useful for legacy projects, where you want to adopt a Continuous > Improvement strategy rather than just imposing a minimum required level of > test coverage. > Thoughts? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira