In the Generating unit test report recipe, we leveraged the Surefire plugin to generate reports of our unit tests. These reports contained information about the success or failure of each individual test. However, what it lacked was an assessment of the scope of the unit tests itself in relation to the source code base.
Are these unit tests sufficient? Do they provide test coverage to all important portions of the functional code?
Cobertura is a tool that helps you answer some of these questions. It analyzes your source code and test code, calculates the percentage of code accessed by the tests and thus identifies portions of the code that aren’t covered by tests.
Cobertura instruments Java bytecode after compilation, ...