Code coverage tools
There are many different code coverage tools specifically for Java, the most popular of them, either free or commercial, being:
- Cobertura (free): http://cobertura.sourceforge.net/
- Clover (Commercial): http://www.atlassian.com/software/ clover/overview
- EMMA (free): http://emma.sourceforge.net/
- JaCoCo (free): http://www.eclemma.org/jacoco/
Sonar uses Cobertura and JaCoCo but there is support for Clover and EMMA via Sonar plugins. The basic lifecycle of a code coverage analysis process consists of the following steps:
- Byte code instrumentation—injects custom code to enable measurements
- Test execution—performs the tests with the injected code
- Analysis report—generation generates a test report in formats such as XML, HTML, PDF
- Sonar data ...
Get Sonar Code Quality Testing Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.