You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ Options:
68
68
--include Filter expressions to include specific modules and types.
69
69
--exclude-by-file Glob patterns specifying source files to exclude.
70
70
--merge-with Path to existing coverage result to merge.
71
+
--teamcity-output Output coverage results to console using TeamCity service messages.
71
72
```
72
73
73
74
#### Code Coverage
@@ -194,6 +195,27 @@ Examples
194
195
195
196
Both `--exclude` and `--include` options can be used together but `--exclude` takes precedence. You can specify the `--exclude` and `--include` options multiple times to allow for multiple filter expressions.
196
197
198
+
#### TeamCity Output
199
+
200
+
Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages).
The currently supported [TeamCity statistics](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages) are:
207
+
| TeamCity Statistic Key | Description |
208
+
| :--- | :--- |
209
+
| CodeCoverageL | Line-level code coverage |
210
+
| CodeCoverageC | Class-level code coverage |
211
+
| CodeCoverageM | Method-level code coverage |
212
+
| CodeCoverageAbsLTotal | The total number of lines |
213
+
| CodeCoverageAbsLCovered | The number of covered lines |
214
+
| CodeCoverageAbsCTotal | The total number of classes |
215
+
| CodeCoverageAbsCCovered | The number of covered classes |
216
+
| CodeCoverageAbsMTotal | The total number of methods |
217
+
| CodeCoverageAbsMCovered | The number of covered methods |
218
+
197
219
### MSBuild
198
220
199
221
In this mode, Coverlet doesn't require any additional setup other than including the NuGet package in the unit test project. It integrates with the `dotnet test` infrastructure built into the .NET Core CLI and when enabled, will automatically generate coverage results after tests are run.
@@ -275,6 +297,27 @@ dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:ThresholdType=line
275
297
276
298
You can specify multiple values for `ThresholdType` by separating them with commas. Valid values include `line`, `branch` and `method`.
277
299
300
+
#### TeamCity Output
301
+
302
+
Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages).
303
+
304
+
```bash
305
+
dotnet test /p:CollectCoverage=true /p:TeamCityOutput=true
306
+
```
307
+
308
+
The currently supported [TeamCity statistics](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages) are:
309
+
| TeamCity Statistic Key | Description |
310
+
| :--- | :--- |
311
+
| CodeCoverageL | Line-level code coverage |
312
+
| CodeCoverageC | Class-level code coverage |
313
+
| CodeCoverageM | Method-level code coverage |
314
+
| CodeCoverageAbsLTotal | The total number of lines |
315
+
| CodeCoverageAbsLCovered | The number of covered lines |
316
+
| CodeCoverageAbsCTotal | The total number of classes |
317
+
| CodeCoverageAbsCCovered | The number of covered classes |
318
+
| CodeCoverageAbsMTotal | The total number of methods |
319
+
| CodeCoverageAbsMCovered | The number of covered methods |
0 commit comments