From abf4bef5dc56010786624d930d29ca8763c23104 Mon Sep 17 00:00:00 2001 From: Bert Date: Fri, 6 Sep 2024 08:54:58 +0200 Subject: [PATCH] add hints in documentation --- Documentation/GlobalTool.md | 3 +++ Documentation/VSTestIntegration.md | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/GlobalTool.md b/Documentation/GlobalTool.md index 602a4aea8..99a9f9b4c 100644 --- a/Documentation/GlobalTool.md +++ b/Documentation/GlobalTool.md @@ -114,6 +114,9 @@ coverlet --target --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 --target --targetargs --output "/custom/directory/" -f json -f lcov ``` diff --git a/Documentation/VSTestIntegration.md b/Documentation/VSTestIntegration.md index d85715c05..3c8be75e1 100644 --- a/Documentation/VSTestIntegration.md +++ b/Documentation/VSTestIntegration.md @@ -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) * + +> [!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)