Open GrahamMThomas opened 8 months ago
I've found a workaround after viewing some of the sample files in https://github.com/fschwaiger/cobertura-parse.
Looks like the dotnet-compile doesn't include this:
<sources>
tag. Once I added that, even with dummy values, everything was working.
To codify the workaround:
dotnet-coverage merge -f cobertura -o $code_coverage_file_name $latest_file
sed -i '/<coverage/a <sources><source /></sources>' $code_coverage_file_name
This may be more of an issue for the cobertura-parse
library. Let me know if I should punt this to over there instead.
I've found a workaround after viewing some of the sample files in https://github.com/fschwaiger/cobertura-parse.
Looks like the dotnet-compile doesn't include this:
<sources>
tag. Once I added that, even with dummy values, everything was working.To codify the workaround:
dotnet-coverage merge -f cobertura -o $code_coverage_file_name $latest_file sed -i '/<coverage/a <sources><source /></sources>' $code_coverage_file_name
This may be more of an issue for the
cobertura-parse
library. Let me know if I should punt this to over there instead.
Thanks for submitting an issue and figuring out a workaround! Yes, this definitely would be more of an upstream project issue.
Describe the bug After converting to cobertura xml file from .coverage binary file, the parsing fails within the cobertura parser. I don't see any reason this shouldn't work given this looks like a valid cobertura xml file to me.
To Reproduce Steps to reproduce the behaviour:
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Culture=neutral">
dotnet-coverage merge -f cobertura -o $code_coverage_file_name $latest_file
Expected behaviour File to be parsed successfully and coverage gutters to appear.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Windows via WSL
v2.11.1
1.86.2
Additional context Stack Trace: