Coverlet crashes VSTest
See original GitHub issueI’m getting errors when I’m trying to use the vstest integration to coverlet.
This is with the 2.2.300 SDK.
PS> dotnet test --no-build --no-restore --settings ..\CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true
Test run for D:\dev\xUnit\visualstudio.xunit\test\test.xunit.runner.visualstudio\bin\Debug\net46\test.xunit.runner.visualstudio.dll(.NETFramework,Version=v4.6)
Microsoft (R) Test Execution Command Line Tool Version 16.1.1
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Attachments:
D:\dev\xUnit\visualstudio.xunit\test\test.xunit.runner.visualstudio\TestResults\730034da-8dc8-4a52-9bdf-db094514cf10\coverage.cobertura.xml
D:\dev\xUnit\visualstudio.xunit\test\test.xunit.runner.visualstudio\TestResults\730034da-8dc8-4a52-9bdf-db094514cf10\Oren_ATHENA_2019-06-25.16_25_17.coverage
Test Run Aborted.
To repro:
- clone https://github.com/xunit/visualstudio.xunit
- checkout the
coverlet
branch - from a VS Command prompt, go to the
/test/test.xunit.runner.visualstudio
directory - run
msbuild /restore
to build the test project (and the project it’s testing). You’ll need the Windows/UWP 16299 SDK installed to successfully build it. - From the same directory, run the following command
dotnet test --no-build --no-restore --settings ..\CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true
It’ll start running the tests and then abort.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Coverlet crashes VSTest · Issue #475
I'm getting errors when I'm trying to use the vstest integration to coverlet. This is with the 2.2.300 SDK. PS> dotnet test --no-build ......
Read more >VSTest@2 Task is Updating / Overriding coverlet. ...
I am trying to add code coverage to a .NET Framework 4.8 solution in Azure DevOps. I have based my approach on the...
Read more >Configure unit tests by using a .runsettings file
To run tests from the command line, use vstest.console.exe, ... can help you isolate a problematic test that causes a test host crash....
Read more >Error 'Unable to read beyond the end of the stream. ' in CL ...
Hello,. starting from yesterday we are encountering the following error during build test and collecting test results
Read more >coverlet
Coverlet is a cross platform code coverage framework for .NET, with support for line, ... VSTest engine integration; MSBuild task integration; As a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@onovotny So I have looked at this. In your runsettings you define both data collectors “CodeCoverage” and “Xplat Code coverage” I tried both, and both of them are aborting the run. I don’t have an RCA on the CodeCoverage one but for xplat code coverage, here’s my analysis.
In test.xunit.runner.visualstudio, there’s a condition
This is causing it to refer to old objectmodel which does not work with coverlet. Getting this error when I looked at logs using
--diag
optionCan you try with updating the object model and disabling data collector for CodeCoverage and see if xplat code coverage works?
cc: @MarcoRossignoli
@MarcoRossignoli @onovotny I’ll try to repro the issue and get back.