O'Reilly logo

Testing with JUnit by Frank Appel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating code coverage reports

The last section will revisit and deepen the knowledge about the assets and drawbacks of code coverage. It'll conclude this book by showing you how to add coverage analysis to your CI build.

Enlarging on code coverage

Recall Chapter 2, Writing Well-structured Tests, and we know code coverage reports can be a useful tool to detect gaps of untested passages in our production classes. However, full coverage does not guarantee complete or even reasonable behavior verification. To substantiate these statements a bit more, let's take a look at a class highlighted with full coverage:

Enlarging on code coverage

Full coverage

The preceding image shows ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required