Description / Features
Emma is 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.
Usage & Installation
- Copy the jar into /extensions/plugins/ directory
- Restart Sonar Web server
To activate Emma on all projects:
- Log in as administrator
- Go to Configuration > Settings > General
- Set the property "Code coverage plugin" to "emma"
To activate Emma on selected projects:
- Add the property 'sonar.core.codeCoveragePlugin=emma' when executing the maven plugin. This can be set in pom.xml or in command line.
As it is possible for surefire and Cobertura, reusing already generated Emma reports is possible: the 'sonar.emma.reportPath' must be defined to indicate the directory where the .ec and the .em Emma files are generated.
Branch coverage is not calculated as such notion does not exist in Emma.
Release 1.2.1 (1 issues)
|SONARPLUGINS-1318||The name of the Emma .ec report file is hardcoded and must be "coverage-0.ec"||Closed||Fixed|
Release 1.2 (2 issues)
|SONARPLUGINS-1208||Emma description for report file references and xml file in Sonar UI||Closed||Fixed|
|SONARPLUGINS-1149||The Sonar Emma plugin can't be used with the Sonar Ant or Java runners||Closed||Fixed|
Release 1.1 (2 issues)
|SONARPLUGINS-1090||Sonar Emma Plugin reporting 0.0% coverage||Closed||Not A Bug|
|SONARPLUGINS-736||Update to EMMA 2.1||Closed||Fixed|
Release 1.0.1 (2 issues)
|SONARPLUGINS-810||Change plugin key to comply with standards||Closed||Fixed|
|SONARPLUGINS-673||Migrate to sonar-dev-maven-plugin from sonar-dev-mojo for integration tests||Closed||Fixed|
Release 1.0 (4 issues)
|SONARPLUGINS-592||Make the plugin compatible with Sonar 2.2||Closed||Fixed|
|SONARPLUGINS-294||Make the plugin propagate metrics to all levels||Closed||Fixed|
|SONARPLUGINS-270||Switch of excluded/included sources for emma plugin||Closed||Fixed|
|SONARPLUGINS-52||Display hits by line in sources||Closed||Fixed|
Release 0.3 (3 issues)
|SONARPLUGINS-176||Add a check to only run on Java projects||Closed||Fixed|
|SONARPLUGINS-152||Emma : add property sonar.emma.reportPath to project settings page||Closed||Fixed|
|SONARPLUGINS-151||Emma : Upgrade to Sonar 1.10 API||Closed||Fixed|
Release 0.2 (3 issues)
|SONARPLUGINS-83||Fix code coverage on multi-modules projects||Closed||Fixed|
|SONARPLUGINS-61||Upgrade to Sonar 1.9||Closed||Fixed|
|SONARPLUGINS-56||Property "sonar.emma.reportPath" is not correctly handle by the plugin||Closed||Fixed|