-
Notifications
You must be signed in to change notification settings - Fork 388
Coverlet Collectors intermittently fail to collect coverage results #893
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
Comments
net472 is not supported with collectors #705 (comment) |
I have tried running the Here are the logs: |
Coverlet collectors atm are no supported in .NET Framework, only .NET Core as we reported in guide https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md#coverlet-integration-with-vstest-aka-visual-studio-test-platform TL;DR; As you can see in log
This means that in-process coverlet collector is not loaded in test process because coverlet lib is compiled for netcoreapp and not for netxxx app. When in-process collector is not loaded "sometimes"(randomic related to vstest platform behaviour) process is killed before coverlet flush hits file to disk, because this collector cannot tell to vstest plat to wait. In these cases(randomic) you hit know issue https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#1-vstest-stops-process-execution-earlydotnet-test So your coverage is inconsistent because sometimes process is killed sometimes not. But it's out of control of coverlet. |
So is it possible to resolve this using coverlet.msbuild package for the .NET Framework or the only way is to upgrade to .NET Core ? |
You can use msbuild but you could incur in same issue https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/KnownIssues.md#1-vstest-stops-process-execution-earlydotnet-test |
Thanks for the help. I will keep track on this as we do have projects we can't move to .NET Core. So closing this. |
Keep an eye on this issue #705 (comment) where we track that issue. |
Hello, we are experiencing a problem using the collectors. Our package version are the following:
We run the tests by running
dotnet test {CS Project} --no-build --no-restore --logger trx --collect "XPlat Code Coverage"
.The error we receive is:
The test projects are being run one by one. This does not happen all the time, hence our coverage is inconsistent.
Could it be a problem that our projects consist of net472 and netcoreapp2.2 ?
The text was updated successfully, but these errors were encountered: