Closed Bertk closed 2 months ago
fix CoverletOutput folder location #1601
Filename for multiple report formats is currently not supported.
CoverletOutput parameter without file shall be used instead e.g. /p:CoverletOutput="C:/GitHub/coverlet/artifacts/Reports/coverlet.core/"
I've seen that we have the same issue for coverlet.console
. The idea to just use the output directory in those cases sounds good to me. We can also create a new issue for this.
Update of GlobalTool.md should be sufficient e.g.
whenever more than one coverage format is used in combination with output parameter only a folder shall be used
current paragraph
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.
coverlet <ASSEMBLY> --target <TARGET> --targetargs <TARGETARGS> --output "/custom/directory/" -f json -f lcov
This issue is stale because it has been open for 3 months with no activity.
Describe the bug coverlet.msbuild.tasks overrides code coverage result file using file name of given CoverletOutput parameter.
To Reproduce
execute command:
dotnet test test\coverlet.core.tests\coverlet.core.tests.csproj --configuration debug /p:CollectCoverage=true /p:CoverletOutputFormat="json%2copencover" /p:CoverletOutput="C:\GitHub\coverlet\artifacts\Reports\coverlet.core\coverage.json" /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.xunit.extensions]*%2c[coverlet.tests.projectsample]*%2c[testgen_]*" --results-directory:"C:\GitHub\coverlet\artifacts\Reports\coverlet.core" --diag:"C:\GitHub\coverlet\artifacts\log\debug\coverlet.core.test.diag.log;tracelevel=diag"
Expected behavior 2 code coverage result files are available (formats: json, opencover)
Actual behavior Only one code coverage result file is available.
Configuration (please complete the following information): Please provide more information on your .NET configuration:
Additional context none