From 3bbe50284571b9ae4f3a0f8a08bd66013adb2177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller?= Date: Wed, 15 Feb 2023 09:03:41 +0100 Subject: [PATCH] Update collector docs with info about passing format without runsettings file (#1444) --- Documentation/VSTestIntegration.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Documentation/VSTestIntegration.md b/Documentation/VSTestIntegration.md index 279250b6c..4cc67383d 100644 --- a/Documentation/VSTestIntegration.md +++ b/Documentation/VSTestIntegration.md @@ -77,9 +77,20 @@ We're working to fill the gaps. ### Default option (if you don't specify a runsettings file) -| Option | Summary | -|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -|Format | Results format in which coverage output is generated. Default format is cobertura. Supported format lcov, opencover, cobertura, teamcity, json (default coverlet proprietary format) | +Without specifying a runsettings file and calling coverlet by just the name of the collector, the result of the generated coverage output is by default in cobertura format. +``` +dotnet test --collect:"XPlat Code Coverage" +``` + +The output format of the coverage report can also be changed without a runsettings file by specifying it in a parameter. The supported formats are lcov, opencover, cobertura, teamcity, json (default coverlet proprietary format). +``` +dotnet test --collect:"XPlat Code Coverage;Format=json" +``` + +It is even possible to specify the coverage output in multiple formats. +``` +dotnet test --collect:"XPlat Code Coverage;Format=json,lcov,cobertura" +``` ### Advanced Options (Supported via runsettings)