Skip to content

Commit

Permalink
add hints in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertk committed Sep 6, 2024
1 parent 7ab5499 commit abf4bef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Documentation/GlobalTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --output "/custo

The above command will write the results to the supplied path, if no file extension is specified it'll use the standard extension of the selected output format. To specify a directory instead, simply append a `/` to the end of the value.

>[!TIP]
>Use only folder name whenever multiple coverage output formats are used.
```bash
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --output "/custom/directory/" -f json -f lcov
```
Expand Down
12 changes: 11 additions & 1 deletion Documentation/VSTestIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,17 @@ You can change the output directory using the standard `dotnet test` switch `--r

:warning:At the moment VSTest integration **doesn't support all features** of msbuild and .NET tool, for instance show result on console, report merging and threshold validation.
We're working to fill the gaps.
>*PS: if you don't have any other way to merge reports(for instance your report generator doesn't support multi coverage file) you can for the moment exploit a trick reported by one of our contributor Daniel Paz(@p4p3) </~https://github.com/tonerdo/coverlet/pull/225#issuecomment-573896446>*

> [!TIP]
> *Some alternative solutions to merge coverage files*
>
> * use _dotnet-coverage_ tool and merge multiple coverage files
>
> `dotnet-coverage merge artifacts/coverage/**/coverage.cobertura.xml -f cobertura -o artifacts/coverage/coverage.xml`*
>
> * use _dotnet-reportgenerator-globaltool_ to create a HTML report and a merged coverage file
>
> `reportgenerator -reports:"**/*.cobertura.xml" -targetdir:"artifacts\reports.cobertura" -reporttypes:"HtmlInline_AzurePipelines_Dark;Cobertura"`
### Default option (if you don't specify a runsettings file)

Expand Down

0 comments on commit abf4bef

Please sign in to comment.