Vstest: Coverage report file duplicated when using --logger option

Created on 18 Feb 2020  路  7Comments  路  Source: microsoft/vstest

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?

Most helpful comment

Still experiencing this

All 7 comments

@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:
grafik
I have four projects and every coverage.cobertura.xml-file is duplicated.

Is there any solution found for this issue?

Still experiencing this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChaosEngine picture ChaosEngine  路  5Comments

TheRealPiotrP picture TheRealPiotrP  路  3Comments

codito picture codito  路  3Comments

MarcoRossignoli picture MarcoRossignoli  路  3Comments

ahaleiii picture ahaleiii  路  3Comments