| Wiki Markup |
|---|
{iframe:src=http://update.sonarsource.org/plugins/emma.html|width=700|height=250|frameborder=0}
Your browser does not support iframes.
{iframe} |
Compatibility Matrix
Plugin | 1.0.1 | 1.1, 1.2.X+ |
|---|---|---|
emma-maven-plugin | 1.0-alpha-2 | 1.0-alpha-3 |
emma | 2.0.5312 | 2.1.5320 |
Description / Features
Emma is Get code coverage for Java project with Emma (an Open Source and robust code coverage tool. By default, Sonar is delivered with JaCoCo and Cobertura but if you prefer Emma you just have to install this plugin and go back to your favorite practice: the test driven development.)
Installation
- Install the Emma plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
- Restart the Sonar server
Usage
To make the default code coverage tool:
- Log in as an administrator
- Go to Settings > Configuration > General Settings > Java
- Set the 'sonar.java.coveragePlugin' property to 'emma'
To activate Emma on some projects:
- Add the 'sonar.java.coveragePlugin=emma' when executing the maven plugin. This can be set in pom.xml or in command line.
Or use the 'reuseReports' mode:
Code Block title reuseReports mode language html/xml <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> <!-- Path to the .ec and .em Emma files --> <sonar.emma.reportPath>emmaDir</sonar.emma.reportPath>
See the Code Coverage by Unit Tests for Java Project tutorial.
| Info | ||
|---|---|---|
| ||
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.
Change Log
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...

