microsoft / microsoft/codecoverage
`dotnet-coverage merge` drops hit counts, sets them all to 1
@jakubch1 is already working on this.
Since Sep 14, 2022.
- Dominant language
- C#
- Stars
- 125
- Forks
- 17
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 2
Description
Description
The merge command produces coverage data with hits="1" hard-coded for all covered lines.
Steps to reproduce
I have multiple cobertura coverage reports that I want to use dotnet-coverage merge to merge into one.
Consider these coverage files:
TestResults.zip
dotnet-coverage merge TestResults\*xml -r -o merged.cobertura.xml -f cobertura
Expected behavior
I expect the merged report to reflect the hit counts for each line.
In particular, the merged product should report that the {reporoot}\test\Library.Tests\Calculator.cs file's line 17 was hit 3 times.
I get the expected result when merging with the dotnet-reportgenerator-globaltool dotnet CLI tool.
Actual behavior
Every line reported in the merged .xml file reports hits="1".
merged outputs.zip contains outputs from both tools so you can compare.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.