Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/clover-confluence.html|width=700|height=250|frameborder=0}
{color:#333333}Your browser does not support iframes.{color}{iframe}

Description / Features

Get It provides the ability to feed SonarQube with code coverage with data coming from Atlassian Clover.

Usage

In order to make Sonar use the Clover Java code coverage engine, the property 'sonar.java.coveragePlugin' must be set to 'clover'. It can be set in different locations:

  • Global settings (Settings > Configuration > General Settings > Java). It will apply to all Java projects.
  • Project settings (Project > Configuration > Settings > Java). It will apply to this specific project.
  • Build tool settings, for example a Maven property in the pom or a command-line property.

From the settings pages, the version of the Maven Clover plugin to be used and the license key can be set.
By uploading the license key (clover 1 or clover 2) into Sonar, you will benefit from a centralized configuration.
By default, the sonar-plugin-clover1 runs the maven-clover-plugin.
By default, the sonar-plugin-clover2 runs the maven-clover2-plugin.

Note

In case the Clover plugin is defined in the pom.xml of your project, Sonar will use the version defined in the pom with its attached configuration.

See the Code Coverage by Unit Tests tutorial.

Known Limitations

Change Log

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

 

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

 

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

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

To display code coverage data:

  1. Prior to the SonarQube analysis, execute your unit tests and generate the Clover report.
  2. Import this report while running the SonarQube analysis by setting the sonar.clover.reportPath property to the path to the Clover report. The path may be absolute or relative to the project base directory.

Change Log

Version 3.0

It is no longer possible to let SonarQube drive the execution of unit tests.