This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
10.0 | Analyzing source code | Test coverage | Test execution parameters

Test execution parameters

On this page

Test execution reports describe which tests within your test suite have been run during a build.

This differs from test coverage reports, which describe the percentage of your code that has been tested by your test suite during a build. For details, see test coverage.

Test execution reports are not generated by SonarQube itself. Much like tests coverage reports, test execution reports must be generated by an external tool and then imported into SonarQube by specifying a parameter telling the scanner where to look for the report. The data is then displayed in your SonarQube analysis.

Below, you will find language- and tool-specific analysis parameters for importing test execution reports.

For information on analysis parameters in general, see analysis parameters.

Unless otherwise specified, these properties require values that are relative to the project root. Some properties support the following wildcards in paths. The remarks for properties that support wildcards will mention this fact. If wildcards are not noted for a given property, then they are not supported for that property.

SymbolMeaning
?a single character
*any number of characters
**any number of directories

Branches only

SonarQube only supports test execution reports for the branches of a project (including the main branch), not for pull requests. This differs from the case with test coverage reports, where pull requests are supported.

All languages

sonar.testExecutionReportPaths

Comma-delimited list of paths to execution reports in the generic test data format.

C/C++/Objective-C

sonar.cfamily.cppunit.reportsPath

Path to the directory holding the CPPUnit reports. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

C#

sonar.cs.vstest.reportsPaths

Paths to VSTest reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

sonar.cs.nunit.reportsPaths

Paths to NUnit execution reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

sonar.cs.xunit.reportsPaths

Paths to xUnit execution reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

Go

sonar.go.tests.reportPaths

Comma-delimited list of paths to unit test report files. Paths may be absolute or relative to the project root.

Java

sonar.junit.reportPaths

Comma-delimited list of paths to Surefire XML-format reports.

PHP

sonar.php.tests.reportPath

Path to the PHPUnit unit test execution report file. The path may be absolute or relative to the project root.

Python

sonar.python.xunit.reportPath

Path to unit test execution report. Leave unset to use the default (xunit-reports/xunit-result-*.xml). Path wildcards (see above) are supported. If any paths in the report are invalid, set sonar.python.xunit.skipDetails=true to collect only project-level details.

VB.NET

sonar.vbnet.vstest.reportsPaths

Paths to VSTest execution reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

sonar.vbnet.nunit.reportsPaths

Paths to NUnit execution reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.

sonar.vbnet.xunit.reportsPaths

Paths to xUnit execution reports. Multiple paths may be comma-delimited or included via wildcards. Note that while measures such as the number of tests are displayed at the project level, no drill-down is available.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License