Closed adc-cjewett closed 10 months ago
Hi, the collector you are using is not coverlet
. It is the data collector build in vstest (different collector name). For using coverlet
you need to add our coverlet.collector
nuget package to your test projects and then run dotnet test --collect:"XPlat Code Coverage;Format=cobertura"
.
Ah, apologies! I'll create an issue over on the Microsoft.CodeCoverage project.
I was curious myself and tried out your repo. For cobertura
reports we use relative paths by default regardless of the operating system.
Windows:
Linux:
Based on previous issues it seems like the expectation is Cobertura reports should output a relative path. I noticed that when building and testing one of our repositories on Windows and Linux I was seeing differing behavior. The Windows machine uses the absolute path in the filename while the Linux machine uses the relative path. What is the expectation there?
You can use this repo to replicate by running https://github.com/adc-cjewett/PartialClassCodeCoverage
dotnet test --collect "Code Coverage;Format=Cobertura"
at the root of the repo then checking the results.