Cobertura is a free and open-source Java tool based on jcoverage that calculates the percentage of code and branches covered by tests.
Cobertura is a free and open-source Java tool (commonly called a code coverage tool) based on jcoverage that calculates the percentage of code and branches covered by tests.
Cobertura does this by instrumenting the compiled bytecode. It can be run from the command line, via an Ant task, via a Maven plugin, or via the eCobertura Eclipse plugin. Builds can be made to fail if the code coverage reported by Cobertura does not meet a user-set threshold value. XML and HTML reports can be generated as output.