/p:CollectCoverage=true causes all test discovery to fail when class derives from XUnitVerifier
See original GitHub issueRepro Unzip: mytestlib.zip Within the unzipped directory, run:
dotnet test
dotnet test /p:CollectCoverage=true
Notice how the one test method runs successfully the first time. But when code coverage is enabled, no tests are discovered at all.
I suspect an exception is being thrown during the code coverage instrumentation. Perhaps the XunitVerifier
class I’m using as a base class (which is required to repro the failure) uses a pattern that coverlet.msbuild can’t deal with.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
/p:CollectCoverage=true causes all test discovery to fail ...
I suspect an exception is being thrown during the code coverage instrumentation. Perhaps the XunitVerifier class I'm using as a base class ( ......
Read more >Xunit Unit Tests will not run
To fix, as mentioned here, from the Visual Studio menu, go to Test -> Test Settings -> Default Processor Architecture and set that...
Read more >How To Resolve Issue Of Test Project Not Running The ...
Introduction. I was upgrading the .NET Core 3.1 project to .NET 6 and faced issues running test cases in my test projects.
Read more >Using xUnit to Test your C# Code
This type of test focuses on testing a unit of code: a building block of a software application, such as a function or...
Read more >Problems with .NET unit testing
The following information is essential to determine the cause of the issue: ... We are unable to run tests without rebuilding all dependencies...
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
I moved from warning to verbose because xunit will warning every time. https://github.com/tonerdo/coverlet/pull/548
Maybe the message is not so clear…I mean “embedded pdb without local source files,” local is about local hard drive…if sources are not on pc running test we skip.