Start FreeLog in
SonarCloud | Enriching your analysis | 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 Parameters.

Test execution reports are not generated by SonarCloud itself. Much like tests coverage reports, test execution reports must be generated by an external tool and then imported into SonarCloud by by specifying a parameter telling the scanner where to look for the report. The data is then displayed in your SonarCloud 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

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, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License