Skip to content

Commit dab248f

Browse files
committed
README updates
1 parent 6956f00 commit dab248f

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Options:
6868
--include Filter expressions to include specific modules and types.
6969
--exclude-by-file Glob patterns specifying source files to exclude.
7070
--merge-with Path to existing coverage result to merge.
71+
--teamcity-output Output coverage results to console using TeamCity service messages.
7172
```
7273
7374
#### Code Coverage
@@ -194,6 +195,27 @@ Examples
194195
195196
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.
196197
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).
201+
202+
```bash
203+
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --teamcity-output
204+
```
205+
206+
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+
197219
### MSBuild
198220
199221
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
275297
276298
You can specify multiple values for `ThresholdType` by separating them with commas. Valid values include `line`, `branch` and `method`.
277299
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 |
320+
278321
#### Excluding From Coverage
279322
280323
##### Attributes

0 commit comments

Comments
 (0)