Skip to content

dotnet coverage merge leads to filenames with the leading characters "/_/" in the filenames which bricks other tools #101

Closed

Description

I have got 2 projects in one solution. The first project is the source code and the second project is the xunit test project.

Reproduction Steps:

  • dotnet test -c Release --collect:"Code Coverage"
  • dotnet coverage merge ./**/*.coverage -f cobertura -o mergedResult.cobertura.xml

The unit test files are getting the absolute path as filenames:
image

the source code files are getting a relative path with leading /_/
image

Then Sonarqube for example can't find the files.

Activity

  1. jakubch1 commented on Feb 22, 2024

    @jakubch1
    Member

    Thanks for reporting this. I've fixed issue in https://dev.azure.com/dnceng/public/_artifacts/feed/test-tools/NuGet/Microsoft.CodeCoverage/overview/17.10.0-preview-24120-01. I've added logic to resolve full paths by default. There is also configuration flag DeterministicReport to skip resolving and keep relative paths.

  2. DerGary commented on Jul 2, 2024

    @DerGary
    Author

    Jakub Chocholowicz (@jakubch1) We still experience this issue with the latest version 17.11.3. Do you have an idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions