Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description / Feature

Get code coverage for Java project with JaCoCo (an open source and robust Java code coverage tool, developed by the authors of EclEmma). For more information, see: Comparison of Emma, Clover, Cobertura and JaCoCo.

SonarQube Java Plugin

1.1
1.21.3

JaCoCo

0.5.100.6.20.6.2

Usage

See Code Coverage by Unit Tests for Java Project tutorial.

Known Limitations

  • Some libraries complain on classes, which were instrumented by JaCoCo, so exclusions must be set:
    • Javassist (e.g. when Hibernate used) - "*_javassist_*"
    • Drools - "org.drools.*"
  • The exact number of line hits is not available, because JaCoCo reports only status of line (no code, not covered, partly covered, fully covered) - see JaCoCo Coverage Counters.
Wiki Markup
{iframe:src=http://redirect.sonarsource.com/plugins/jacoco.html|width=700|height=300|frameborder=0}
Documentation has been moved to [http://redirect.sonarsource.com/plugins/jacoco.html].
{iframe}