Figure 6.15. Configuring the test coverage metrics in Jenkins
Jenkins also does a great job letting you drill down into the coverage metrics, displaying coverage
breakdowns for packages, classes within a package, and lines of code within a class (see Figure 6.16,
“Displaying code coverage metrics”). No matter what level of detail you are viewing, Jenkins will
display a graph at the top of the page showing the code coverage trend over time. Further down, you
will find the breakdown by package or class.
Figure 6.16. Displaying code coverage metrics
Once you get to the class details level, Jenkins will also display the source code of the class, with the lines
color-coded according to their level of coverage. Lines that have been completely executed during the
tests are green, and lines that were never executed are marked in red. A number in the margin indicates