Versions Compared

Key

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

This plugin is deprecated since SonarQube 4.2. Use JaCoCo instead for Java projects or the Android plugin to import Emma 2.0 reports.

 

 

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

Description / Features

Get code coverage for Java project with Emma.

Requirements

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 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

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

Usage

To make the default code coverage tool:

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

To activate Emma on some projects:

  1. Add the 'sonar.java.coveragePlugin=emma' 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
    languagehtml/xml
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <!-- Path to the .ec and .em Emma files -->
    <sonar.emma.reportPath>emmaDir</sonar.emma.reportPath> 

     

     

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

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

Info
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 because the concept does not exist in Emma.

Change Log

JIRA Issues
anonymoustrue
titleRelease 1.3
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18890&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

...

JIRA Issues
anonymoustrue
titleRelease 1.2
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17420&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.1
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17046&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.0.1
height90
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16912&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 1.0
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16020&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.3
height120
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15509&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.2
height120
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15143&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleRelease 0.1
height120
renderModestatic
width900
columnstype;key;summary;priority
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=14993&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000