-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Sonar Code Quality Testing Essentials
By :

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 collecting—Sonar collects reporting data
For the needs of the book, we will use the default Cobertura engine.
Performance tests run by the Sonar team on the four tools in 2010 show that Clover is the slower one, consuming twice the time...
Change the font size
Change margin width
Change background colour