aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/src/pages/analysis/test-coverage/test-execution-parameters.md
blob: c362b4e357275e815b70f63c5bee40ea5261ff53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
title: Test Execution Parameters
url: /analysis/test-coverage/test-execution-parameters/
---

_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](/analysis/test-coverage/overview/).

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](/analysis/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.

Symbol | Meaning
-|-
`?` | 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](/analysis/generic-test/) format.


## C/C++/Objective-C

### sonar.cfamily.cppunit.reportsPath

Path to the directory holding the [CPPUnit](https://sourceforge.net/projects/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.mstest.reportsPaths

Paths to MSTest 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.mstest.reportsPaths

Paths to MSTest 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.