Versions Compared


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


  1. Install the Emma plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server


To make the default code coverage tool:

  1. Log in as an administrator
  2. Go to Settings > Configuration > General Settings > Java
  3. Set the '' property to 'emma'

To activate Emma on some projects:

  1. Add the '' when executing the maven plugin. This can be set in pom.xml or in command line.
  2. Or use the 'reuseReports' mode:

    Code Block
    titlereuseReports mode
    <!-- Path to the directory with .ec and .em Emma files -->



See the Code Coverage by Unit Tests for Java Project tutorial.

titleSupported report formats

Note that only reports of offline instrumentation are currently supported (*.ec and *.em files). XML or HTML formats are not.

See also the Code Coverage by Unit Tests tutorial.

Known Limitations

Branch coverage is not calculated as such notion does not exist in Emma.