Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage report file duplicated when using --logger option #733

Closed
tremblaysimon opened this issue Feb 17, 2020 · 2 comments
Closed

Coverage report file duplicated when using --logger option #733

tremblaysimon opened this issue Feb 17, 2020 · 2 comments
Labels
tracking-external-issue The issue is caused by external problem - nothing we can do to fix it directly

Comments

@tremblaysimon
Copy link

In my test project, when I run the command:

dotnet test --settings coverlet.runsettings --logger "trx;LogFileName=testresults.trx"

there are two coverage.opencover.xml file generated. They are identical. Only the path where the file resides are different. There is one in TestResults/a-random-guid/ and another one in TestResults/USERNAME_COMPUTERNAME_generation-date/In/COMPUTERNAME/.

image

I'm using .NET Core SDK 3.1.101, coverlet.collector 1.2.0 and Microsoft.NET.Test.Sdk 16.5.0.

One thing maybe when I start dotnet test it specifies version 16.3.0 (I don't know if it's normal, I think yes since it the version installed by the SDK):

Outil en ligne de commande d'exécution de tests Microsoft (R), version 16.3.0
Copyright (c) Microsoft Corporation. Tous droits réservés.

In the end, I don't know if it's more or less related to vstest than coverlet.

If I don't use --logger option, it doesn't generate a second code coverage file.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Feb 17, 2020

Thank's for reporting this, we'll take a look asap, btw I think it's related to vstest --logger feature and not to coverlet collector.

cc: @nohwnd @vagisha-nidhi

@MarcoRossignoli MarcoRossignoli added untriaged To be investigated tracking-external-issue The issue is caused by external problem - nothing we can do to fix it directly and removed untriaged To be investigated labels Feb 17, 2020
@MarcoRossignoli
Copy link
Collaborator

@tremblaysimon I did a test and confirm your results, I think you should open an issue on vstest repo and ask if this behaviour is by design https://github.com/microsoft/vstest
On coverlet we simply send artifacts to message sink and we don't have any control on it https://github.com/tonerdo/coverlet/blob/master/src/coverlet.collector/DataCollection/AttachmentManager.cs#L146

Feel free to close and reference this issue on other repo. We'll re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking-external-issue The issue is caused by external problem - nothing we can do to fix it directly
Projects
None yet
Development

No branches or pull requests

2 participants