Cobertura report
Next up is the Cobertura report. We will need an additional Jenkins plugin for this one. So go to the Jenkins manager and, from there, to the plugin manager. Search for Cobertura plugin (https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin) and install it without restarting (this will also install the Maven Integration plugin). Go back to your project configuration and add a new post-build action, Publish Cobertura Coverage Report, which was not there before. Use test/coverage/cobertura/*.xml as the report pattern. Now, if you save and run the project, you will see that your build fails even when all your tests succeed. That is because the Cobertura makes your build fail if you do not have a minimum coverage percentage. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access