From d1c56cf2818bee2abd89dc34bc3146bd34183789 Mon Sep 17 00:00:00 2001 From: Justin Robb Date: Mon, 5 Nov 2018 11:03:20 -0800 Subject: [PATCH] README updates --- README.md | 67 ++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 6f91c7d..5c11965 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ Options: --include Filter expressions to include specific modules and types. --exclude-by-file Glob patterns specifying source files to exclude. --merge-with Path to existing coverage result to merge. - --teamcity-output Output coverage results to console using TeamCity service messages. ``` #### Code Coverage @@ -99,6 +98,7 @@ Supported Formats: * lcov * opencover * cobertura +* teamcity The `--format` option can be specified multiple times to output multiple formats in a single run: @@ -118,6 +118,28 @@ The above command will write the results to the supplied path, if no file extens coverlet --target --targetargs --output "/custom/directory/" -f json -f lcov ``` +#### TeamCity Output + +Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages). + +```bash +coverlet --target --targetargs --output teamcity +``` + +The currently supported [TeamCity statistics](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages) are: + +| TeamCity Statistic Key | Description | +| :--- | :--- | +| CodeCoverageL | Line-level code coverage | +| CodeCoverageC | Class-level code coverage | +| CodeCoverageM | Method-level code coverage | +| CodeCoverageAbsLTotal | The total number of lines | +| CodeCoverageAbsLCovered | The number of covered lines | +| CodeCoverageAbsCTotal | The total number of classes | +| CodeCoverageAbsCCovered | The number of covered classes | +| CodeCoverageAbsMTotal | The total number of methods | +| CodeCoverageAbsMCovered | The number of covered methods | + #### Merging Results With Coverlet you can combine the output of multiple coverage runs into a single result. @@ -195,27 +217,6 @@ Examples 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. -#### TeamCity Output - -Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages). - -```bash -coverlet --target --targetargs --teamcity-output -``` - -The currently supported [TeamCity statistics](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages) are: -| TeamCity Statistic Key | Description | -| :--- | :--- | -| CodeCoverageL | Line-level code coverage | -| CodeCoverageC | Class-level code coverage | -| CodeCoverageM | Method-level code coverage | -| CodeCoverageAbsLTotal | The total number of lines | -| CodeCoverageAbsLCovered | The number of covered lines | -| CodeCoverageAbsCTotal | The total number of classes | -| CodeCoverageAbsCCovered | The number of covered classes | -| CodeCoverageAbsMTotal | The total number of methods | -| CodeCoverageAbsMCovered | The number of covered methods | - ### MSBuild 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. @@ -256,6 +257,7 @@ Supported Formats: * lcov * opencover * cobertura +* teamcity You can specify multiple output formats by separating them with a comma (`,`). @@ -297,27 +299,6 @@ dotnet test /p:CollectCoverage=true /p:Threshold=80 /p:ThresholdType=line You can specify multiple values for `ThresholdType` by separating them with commas. Valid values include `line`, `branch` and `method`. -#### TeamCity Output - -Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages). - -```bash -dotnet test /p:CollectCoverage=true /p:TeamCityOutput=true -``` - -The currently supported [TeamCity statistics](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages) are: -| TeamCity Statistic Key | Description | -| :--- | :--- | -| CodeCoverageL | Line-level code coverage | -| CodeCoverageC | Class-level code coverage | -| CodeCoverageM | Method-level code coverage | -| CodeCoverageAbsLTotal | The total number of lines | -| CodeCoverageAbsLCovered | The number of covered lines | -| CodeCoverageAbsCTotal | The total number of classes | -| CodeCoverageAbsCCovered | The number of covered classes | -| CodeCoverageAbsMTotal | The total number of methods | -| CodeCoverageAbsMCovered | The number of covered methods | - #### Excluding From Coverage ##### Attributes