Three types of coverage are supported: Unit, Integration and Overall coverage. The following properties should be use to import the coverage reports
- sonar.cxx.coverage.reportPath for unit test coverage
- sonar.cxx.coverage.itReportPath for integration test coverage
- sonar.cxx.coverage.overallReportPath for overall test coverage
To feed coverage information into SonarQube, two different XML formats can be used:
- Cobertura XML: the format introduced by Cobertura
- The XML format used by Bullseye (http://www.bullseye.com/)
Notes about coverage display in SonarQube:
SonarQube <3.2 provides metrics for line coverage and branch coverage. Bullseye users have function and branch/decision coverage instead, the cxx plugin coverts the second directly into branch coverage however line coverage is far more complex and cannot be correlated directly into function coverage.
Line coverage imported from a bullseye report means than function coverage + line branch coverage (this second occurs since SonarQube will not display branch coverage if there isn't a line it associated with it). This means also that overall coverage will be affect in SonarQube and cannot be compared directly to bullseye results. The following pictures illustrate this for a small example project.