Please see the reported issue here https://github.com/tonerdo/coverlet/issues/733 about using --logger option in conjunction with --collect:"XPlat Code Coverage".
We think that it should be related more with vstest than coverlet.
Is it an expected behavior to get two generated code coverage file instead of one if we use vstest logger option?
@jakubch1 this is CC related, please have a look 馃檪
Or maybe @MarcoRossignoli if this is coverlet related? Thx
I dont' think it's related to coverlet, collectors(wrote by @vagisha-nidhi) only send artifact through data sink https://github.com/tonerdo/coverlet/blob/master/src/coverlet.collector/DataCollection/AttachmentManager.cs#L146
We don't handle nothing about loggers.
I'm experiencing the same thing (also using coverlet)... each xml file is duplicated.
Same here.
tests.runsettings:
<?xml version="1.0" encoding="UTF-8"?>
<RunSettings>
<RunConfiguration>
<ResultsDirectory>.\TestResults</ResultsDirectory>
</RunConfiguration>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>cobertura</Format>
<IncludeTestAssembly>false</IncludeTestAssembly>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
<LoggerRunSettings>
<Loggers>
<Logger friendlyName="trx" />
</Loggers>
</LoggerRunSettings>
</RunSettings>
dotnet test --settings tests.runsettings
Result:

I have four projects and every coverage.cobertura.xml-file is duplicated.
Is there any solution found for this issue?
Still experiencing this
Most helpful comment
Still experiencing this