microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
883 stars 319 forks source link

dotnet coverage merge fails to merge reports with different base path #4169

Closed riezebosch closed 1 year ago

riezebosch commented 1 year ago

I still see the same results as described here: https://github.com/codecov/uploader/issues/915

  1. extract the coverage.tar.gz reports
  2. reportgenerator '-reports:**/coverage.*.xml' -targetdir:reports -reporttypes:html
  3. open ./reports/index.htm
  4. dotnet coverage merge coverage.cobertura.xml -r -f cobertura
  5. reportgenerator '-reports:output.cobertura.xml' -targetdir:reports -reporttypes:html

Not sure why, but there is a difference in the sources/source element and the relative path in the packages/package/classes/class@filename attribute.

The Hypothesis report is using the .csproj folder as a base, whereas the other two use the .sln folder. That may be up to coverlet to fix, but maybe is also a problem for the coverage tool to handle well?

jakubch1 commented 1 year ago

I've fixed issue. It will be available in upcoming release.