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

/p:CoverletOutputFormat=cobertura only produces the coverlet coverage.json #1425

Closed
ricardo-noyolalozano opened this issue Dec 14, 2022 · 4 comments

Comments

@ricardo-noyolalozano
Copy link

When I run the 'dotnet test --% /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura' in one of my solutions I get the cobertura format but in another solution I only get the coverlet format. What could I be doing wrong?

@petli
Copy link
Collaborator

petli commented Dec 15, 2022

Is the problematic solution using .NET 7? See #1391 for an issue tracking an error in the .NET 7.0.0 SDK which stops the coverlet.msbuild driver from getting the options. There's workarounds in that issue, and you can also consider switching to the coverlet.collector driver which isn't affected: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md

@daveMueller
Copy link
Collaborator

Hi, the issue @petli mentioned was fixed by the microsoft guys with sdk 7.0.101 that was released last week microsoft/vstest#4014. I just checked it with a repro from another related issue and it works fine. Please give it a try again.

@daveMueller
Copy link
Collaborator

I close this as the external issue is fixed. Feel free to reopen.

@ricardo-noyolalozano
Copy link
Author

ricardo-noyolalozano commented Jan 3, 2023

Could it be the fact that one is running the Microsoft testing framework and one is running XUnit? The former being the one that creates the cobertura file. Both projects are also in .NET 6.0

-Edit: The one not working was running 7.0.100. Running with 7.0.101 fixes the issue. Sorry about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants