jenkins the definitive guide

(Jeff_L) #1

Figure 2.32. Jenkins also displays a graph of code coverage over time


Note that our objective here is not to improve the code coverage just for the sake of improving code
coverage—we are adding an extra test to verify some code that was not previously tested, and as a result
the code coverage goes up. There is a subtle but important difference here—code coverage, as with any
other metric, is very much a means to an end (high code quality and low maintenance costs), and not
an end in itself.


Nevertheless, metrics like this can give you a great insight into the health of your project, and Jenkins
presents them in a particularly accessible way.


This is just one of the code quality metrics plugins that have been written for Jenkins. There are many
more (over fifty reporting plugins alone at the time of writing). We’ll look at some more of them in
Chapter 9, Code Quality.


2.9. Conclusion


In this chapter, we have gone through what you need to know to get started with Jenkins. You should
be able to set up a new build job, and setting up reporting on JUnit test results and javadocs. And you
have seen how to add a reporting plugin and keep tabs on code coverage. Well done! But there’s still a
lot more to learn about Jenkins—in the following chapters, we will be looking at how Jenkins can help
you improve your build automation process in many other areas as well.

Free download pdf