Skip to content

Commit b82996e

Browse files
committed
small documentation update
1 parent d7d571d commit b82996e

File tree

7 files changed

+60
-56
lines changed

7 files changed

+60
-56
lines changed

Documentation/ConsumeNightlyBuild.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PM> Install-Package coverlet.msbuild -Version X.X.X-preview.X.XXX -Source https:
3333
Example:
3434

3535
```powershell
36-
PM> Install-Package coverlet.msbuild -Version 3.0.4-preview.4.g5de0ad7d60 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
36+
PM> Install-Package coverlet.msbuild -Version 6.0.4-preview.4.g5de0ad7d60 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
3737
```
3838

3939
### .NET CLI
@@ -45,7 +45,7 @@ PM> Install-Package coverlet.msbuild -Version 3.0.4-preview.4.g5de0ad7d60 -Sourc
4545
Example:
4646

4747
```bash
48-
dotnet add package coverlet.msbuild --version 3.0.4-preview.4.g5de0ad7d60 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
48+
dotnet add package coverlet.msbuild --version 6.0.4-preview.4.g5de0ad7d60 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json
4949
```
5050

5151
### MSBuild project file
@@ -57,5 +57,5 @@ Example:
5757
Example:
5858

5959
```xml
60-
<PackageReference Include="coverlet.msbuild" Version="3.0.4-preview.4.g5de0ad7d60" />
60+
<PackageReference Include="coverlet.msbuild" Version="6.0.4-preview.4.g5de0ad7d60" />
6161
```

Documentation/DriversFeatures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ In the table below we keep track of main differences:
88

99
| Feature | MSBuild | .NET Tool | DataCollectors |
1010
|:-----------------------------------|:--------------|--------------|------------------|
11-
| .NET Core support(>= 2.0) | Yes | Yes | Yes |
12-
| .NET Framework support(>= 4.6.1) | Yes | Yes | Yes(since 3.0.0) |
11+
| .NET Core support(>= 6.0) | Yes | Yes | Yes |
12+
| .NET Framework support(>= 4.7.2) | Yes | Yes | Yes(since 3.0.0) |
1313
| Show result on console | Yes | Yes | No |
1414
| Deterministic reports output folder| Yes | Yes | No |
1515
| Merge reports | Yes | Yes | No |

Documentation/GlobalTool.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,43 @@ coverlet --help
99
The current options are (output of `coverlet --help`):
1010

1111
```text
12-
Cross platform .NET Core code coverage tool 6.0.0.0
12+
Description:
13+
Cross platform .NET Core code coverage tool
1314
14-
Usage: coverlet [arguments] [options]
15+
Usage:
16+
coverlet.console <path> [options]
1517
1618
Arguments:
17-
<ASSEMBLY|DIRECTORY> Path to the test assembly or application directory.
19+
<path> Path to the test assembly or application directory.
1820
1921
Options:
20-
-t|--target (REQUIRED) Path to the test runner application.
21-
-a|--targetargs Arguments to be passed to the test runner.
22-
-o|--output Output of the generated coverage report
23-
-v|--verbosity Sets the verbosity level of the command. Allowed values are quiet, minimal, normal, detailed.
24-
-f|--format Format of the generated coverage report. [default: json]
25-
--threshold Exits with error if the coverage % is below value.
26-
--threshold-type Coverage type to apply the threshold to.
27-
--threshold-stat Coverage statistic used to enforce the threshold value. [default: Minimum]
28-
--exclude Filter expressions to exclude specific modules and types.
29-
--include Filter expressions to include only specific modules and types.
30-
--exclude-by-file Glob patterns specifying source files to exclude.
31-
--include-directory Include directories containing additional assemblies to be instrumented.
32-
--exclude-by-attribute Attributes to exclude from code coverage.
33-
--include-test-assembly Specifies whether to report code coverage of the test assembly.
34-
--single-hit Specifies whether to limit code coverage hit reporting to a single hit for each location
35-
--skipautoprops Neither track nor record auto-implemented properties.
36-
--merge-with Path to existing coverage result to merge.
37-
--use-source-link Specifies whether to use SourceLink URIs in place of file system paths.
38-
--does-not-return-attribute Attributes that mark methods that do not return.
39-
--exclude-assemblies-without-sources Specifies behaviour of heuristic to ignore assemblies with missing source documents.
40-
--source-mapping-file Specifies the path to a SourceRootsMappings file.
41-
--version Show version information
42-
-?, -h, --help Show help and usage information
22+
-t, --target <target> (REQUIRED) Path to the test runner application.
23+
-a, --targetargs <targetargs> Arguments to be passed to the test runner.
24+
-o, --output <output> Output of the generated coverage report
25+
-v, --verbosity <Detailed|Minimal|Normal|Quiet> Sets the verbosity level of the command. Allowed values are quiet, minimal, normal, detailed. [default: Normal]
26+
-f, --format <format> Format of the generated coverage report. [default: json]
27+
--threshold <threshold> Exits with error if the coverage % is below value.
28+
--threshold-type <branch|line|method> Coverage type to apply the threshold to. [default: line|branch|method]
29+
--threshold-stat <Average|Minimum|Total> Coverage statistic used to enforce the threshold value. [default: Minimum]
30+
--exclude <exclude> Filter expressions to exclude specific modules and types.
31+
--include <include> Filter expressions to include only specific modules and types.
32+
--exclude-by-file <exclude-by-file> Glob patterns specifying source files to exclude.
33+
--include-directory <include-directory> Include directories containing additional assemblies to be instrumented.
34+
--exclude-by-attribute <exclude-by-attribute> Attributes to exclude from code coverage.
35+
--include-test-assembly Specifies whether to report code coverage of the test assembly.
36+
--single-hit Specifies whether to limit code coverage hit reporting to a single hit for each location
37+
--skipautoprops Neither track nor record auto-implemented properties.
38+
--merge-with <merge-with> Path to existing coverage result to merge.
39+
--use-source-link Specifies whether to use SourceLink URIs in place of file system paths.
40+
--does-not-return-attribute <does-not-return-attribute> Attributes that mark methods that do not return
41+
--exclude-assemblies-without-sources <exclude-assemblies-without-sources> Specifies behaviour of heuristic to ignore assemblies with missing source documents.
42+
--source-mapping-file <source-mapping-file> Specifies the path to a SourceRootsMappings file.
43+
--version Show version information
44+
-?, -h, --help Show help and usage information
4345
```
4446

45-
NB. For [multiple value] options you can either specify values multiple times i.e.
47+
> [!NOTE]
48+
> For [multiple value] options you can either specify values multiple times i.e.
4649
4750
```shell
4851
--exclude-by-attribute 'Obsolete' --exclude-by-attribute 'GeneratedCode' --exclude-by-attribute 'CompilerGenerated'
@@ -74,10 +77,10 @@ _Note: The `--no-build` flag is specified so that the `/path/to/test-assembly.dl
7477

7578
Sometimes, there are tests that doesn't use regular unit test frameworks like xunit. You may find yourself in a situation where your tests are driven by a custom executable/script, which when run, could do anything from making API calls to driving Selenium.
7679

77-
As an example, suppose you have a folder `/integrationtest` which contains said executable (lets call it `runner.exe`) and everything it needs to successfully execute. You can use our tool to startup the executable and gather live coverage:
80+
As an example, suppose you have a folder `/integrationtests` which contains said executable (lets call it `runner.exe`) and everything it needs to successfully execute. You can use our tool to startup the executable and gather live coverage:
7881

7982
```bash
80-
coverlet "/integrationtest" --target "/application/runner.exe"
83+
coverlet "/integrationtests" --target "/application/runner.exe"
8184
```
8285

8386
Coverlet will first instrument all .NET assemblies within the `integrationtests` folder, after which it will execute `runner.exe`. Finally, at shutdown of your `runner.exe`, it will generate the coverage report. You can use all parameters available to customize the report generation. Coverage results will be generated once `runner.exe` exits. You can use all parameters available to customize the report generation.
@@ -106,7 +109,7 @@ The `--format` option can be specified multiple times to output multiple formats
106109
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --format opencover --format lcov
107110
```
108111

109-
By default, Coverlet will output the coverage results file(s) in the current working directory. The `--output` or `-o` options can be used to override this behaviour.
112+
By default, Coverlet will output the coverage results file(s) in the current working directory. The `--output` or `-o` options can be used to override this behavior.
110113

111114
```bash
112115
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --output "/custom/path/result.json"
@@ -256,7 +259,7 @@ Coverlet has the ability to map the paths contained inside the debug sources int
256259

257260
The value for `--source-mapping-file` should be a file with each line being in the format `|path to map to=path in debug symbol`. For example to map the local checkout of a project `C:\git\coverlet` to project that was built with `<Deterministic>true</Deterministic>` which sets the sources to `/_/*` the following line must be in the mapping file.
258261

259-
```
262+
```text
260263
|C:\git\coverlet\=/_/
261264
```
262265

Documentation/MSBuildIntegration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Examples
189189
* `/p:Include="[coverlet.*]Coverlet.Core.Coverage"` => Includes the Coverage class in the `Coverlet.Core` namespace belonging to any assembly that matches `coverlet.*` (e.g `coverlet.core`)
190190
* `/p:Include="[coverlet.*.tests?]*"` => Includes all types in any assembly starting with `coverlet.` and ending with `.test` or `.tests` (the `?` makes the `s` optional)
191191

192-
Both `Exclude` and `Include` properties can be used together but `Exclude` takes precedence. You can specify multiple filter expressions by separting them with a comma (`,`).
192+
Both `Exclude` and `Include` properties can be used together but `Exclude` takes precedence. You can specify multiple filter expressions by separating them with a comma (`,`).
193193

194194
You can also include coverage of the test assembly itself by setting `/p:IncludeTestAssembly` to `true`.
195195

@@ -198,7 +198,7 @@ You can also include coverage of the test assembly itself by setting `/p:Include
198198
Neither track nor record auto-implemented properties.
199199
Syntax: `/p:SkipAutoProps=true`
200200

201-
### Instrument module wihtout local sources file
201+
### Instrument module without local sources file
202202

203203
Syntax: `/p:InstrumentModulesWithoutLocalSources=true`
204204

@@ -218,7 +218,7 @@ To exclude or include multiple assemblies when using Powershell scripts or creat
218218
Azure DevOps builds do not require double quotes to be unescaped:
219219

220220
```shell
221-
dotnet test --configuration $(buildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/ /p:Exclude="[MyAppName.DebugHost]*%2c[MyAppNamet.WebHost]*%2c[MyAppName.App]*"
221+
dotnet test --configuration $(buildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/ /p:Exclude="[MyAppName.DebugHost]*%2c[MyAppName.WebHost]*%2c[MyAppName.App]*"
222222
```
223223

224224
### Note for Linux users
@@ -258,7 +258,7 @@ This parameter has three different values to control the automatic assembly excl
258258
| MissingAny | Includes the assembly only if all documents can be matched to corresponding source files. |
259259
| None | No assembly is excluded. |
260260

261-
Here is an example of how to specifiy the parameter:
261+
Here is an example of how to specify the parameter:
262262

263263
```shell
264264
/p:ExcludeAssembliesWithoutSources="MissingAny"

Documentation/Roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This document describes the roadmap for coverlet showing priorities.
44
Maintain coverlet means like any other project two things, answer/resolve soon as possible new issues that are blocking our users an second improve product with new features and enhancements in different areas.
5-
All coverlet issues are labeled and categorized to better support this activites.
5+
All coverlet issues are labeled and categorized to better support this activities.
66

77
As soon as an issue is open is labeled with `untriaged` if not immediately solvable(we need to do some debugging/PoC to understand where is the issue).
88
After triage a final correct label is applied and will be taken into account depending on priority order.

Documentation/Troubleshooting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ You can "load" your local build using simple switch:
104104
coverlet.testsubject -> D:\git\coverlet\test\coverlet.testsubject\bin\Debug\net6.0\coverlet.testsubject.dll
105105
coverlet.core -> D:\git\coverlet\src\coverlet.core\bin\Debug\netstandard2.0\coverlet.core.dll
106106
coverlet.msbuild.tasks -> D:\git\coverlet\src\coverlet.msbuild.tasks\bin\Debug\netstandard2.0\coverlet.msbuild.tasks.dll
107-
coverlet.collector -> D:\git\coverlet\src\coverlet.collector\bin\Debug\net6.0\coverlet.collector.dll
107+
coverlet.collector -> D:\git\coverlet\src\coverlet.collector\bin\Debug\netstandard2.0\coverlet.collector.dll
108108
coverlet.console -> D:\git\coverlet\src\coverlet.console\bin\Debug\net6.0\coverlet.console.dll
109109
coverlet.core.performancetest -> D:\git\coverlet\test\coverlet.core.performancetest\bin\Debug\net6.0\coverlet.core.performancetest.dll
110110
coverlet.core.tests -> D:\git\coverlet\test\coverlet.core.tests\bin\Debug\net6.0\coverlet.core.tests.dll
@@ -145,9 +145,9 @@ To use/debug local collectors build we need to tell to our project to restore an
145145
Restore completed in 50,28 ms for C:\git\coverlet\src\coverlet.collector\coverlet.collector.csproj.
146146
Restore completed in 50,28 ms for C:\git\coverlet\src\coverlet.core\coverlet.core.csproj.
147147
coverlet.core -> C:\git\coverlet\src\coverlet.core\bin\Debug\netstandard2.0\coverlet.core.dll
148-
coverlet.collector -> C:\git\coverlet\src\coverlet.collector\bin\Debug\netcoreapp2.0\coverlet.collector.dll
149-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.1.0.67.nupkg'.
150-
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.1.0.67.snupkg'.
148+
coverlet.collector -> C:\git\coverlet\src\coverlet.collector\bin\Debug\netstandard2.0\coverlet.collector.dll
149+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.6.0.4.nupkg'.
150+
Successfully created package 'C:\git\coverlet\bin\Debug\Packages\coverlet.collector.6.0.4.snupkg'.
151151
```
152152
153153
2) Add new `NuGet.Config` file on your test project/solution
@@ -178,12 +178,12 @@ To use/debug local collectors build we need to tell to our project to restore an
178178
179179
<ItemGroup>
180180
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
181-
<PackageReference Include="xunit.v3" Version="1.0.1" />
182-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
181+
<PackageReference Include="xunit.v3" Version="1.1.0" />
182+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
183183
<PrivateAssets>all</PrivateAssets>
184184
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
185185
</PackageReference>
186-
<PackageReference Include="coverlet.collector" Version="6.0.3" /> <-- My local package version -->
186+
<PackageReference Include="coverlet.collector" Version="6.0.4" /> <-- My local package version -->
187187
</ItemGroup>
188188
189189
<ItemGroup>

Documentation/VSTestIntegration.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Since version `6.0.0`
66

77
* .NET Core >= 6.0
8-
* .NET Framework >= 4.6.2
8+
* .NET Framework >= 4.7.2
99

1010
As explained in quick start section, to use collectors you need to run *SDK v6.0.100* (LTS) or newer and your project file must reference `coverlet.collector` and a minimum version of `Microsoft.NET.Test.Sdk`.
1111

@@ -17,10 +17,10 @@ A sample project file looks like:
1717
<TargetFramework>net8.0</TargetFramework>
1818
</PropertyGroup>
1919
<ItemGroup>
20-
<!-- Minimum version 17.7.0 -->
20+
<!-- Minimum version 17.12.0 -->
2121
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
2222
<!-- Update this reference when new version is released -->
23-
<PackageReference Include="coverlet.collector" Version="6.0.0">
23+
<PackageReference Include="coverlet.collector" Version="6.0.4">
2424
<PrivateAssets>all</PrivateAssets>
2525
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2626
</PackageReference>
@@ -43,10 +43,10 @@ or
4343
```text
4444
dotnet publish
4545
...
46-
... -> C:\project\bin\Debug\netcoreapp3.0\testdll.dll
47-
... -> C:\project\bin\Debug\netcoreapp3.0\publish\
46+
... -> C:\project\bin\Debug\net6.0\testdll.dll
47+
... -> C:\project\bin\Debug\net6.0\publish\
4848
...
49-
dotnet vstest C:\project\bin\Debug\netcoreapp3.0\publish\testdll.dll --collect:"XPlat Code Coverage"
49+
dotnet vstest C:\project\bin\Debug\net6.0\publish\testdll.dll --collect:"XPlat Code Coverage"
5050
```
5151

5252
As you can see in case of `vstest` verb you **must** publish project before.
@@ -59,12 +59,13 @@ Attachments:
5959
Test Run Successful.
6060
Total tests: 1
6161
Passed: 1
62-
Total time: 2,5451 Seconds
62+
Total time: 2.5451 Seconds
6363
```
6464

6565
You can change the output directory using the standard `dotnet test` switch `--results-directory`
6666

67-
>*NB: By design VSTest platform will create your file under a random named folder(guid string) so if you need stable path to load file to some gui report system(i.e. coveralls, codecov, reportgenerator etc..) that doesn't support glob patterns or hierarchical search, you'll need to manually move resulting file to a predictable folder*
67+
> [!NOTE]
68+
>*By design VSTest platform will create your file under a random named folder(guid string) so if you need stable path to load file to some gui report system(i.e. coveralls, codecov, reportgenerator etc..) that doesn't support glob patterns or hierarchical search, you'll need to manually move resulting file to a predictable folder*
6869
6970
## Coverlet options supported by VSTest integration
7071

0 commit comments

Comments
 (0)