OpenCover / opencover

A code coverage tool for .NET 2 and above (WINDOWS OS only), support for 32 and 64 processes with both branch and sequence points
https://blog.many-monkeys.com
Other
1.31k stars 248 forks source link

OpenCover crash when reference assembly finish by Fakes #883

Open calimero100582 opened 5 years ago

calimero100582 commented 5 years ago

Please provide the following information when submitting an issue.

Where appropriate replace the [ ] with a [X]

My Framework

My Environment

I have already...

My issue is related to (check only those which apply):

Expected Behavior

Code Coverage returned as usual

Actual Behavior

No Code Coverage returned

Steps to reproduce the problem:

Create a new test project Create a new class library with any name finishing by ".Fakes" Run Tests with OpenCover, return a CodeCoverage Add reference from Test project to class library Run Tests with OpenCover, no CodeCoverage returned

In the screenshot below Class1.cs and UnitTest1.cs contain only empty class, and empty test method image

sawilde commented 5 years ago

Both Fakes and OpenCover use the profiling API and as you can imagine things don't always play well.

OpenCover does attempt to see if the Fakes profiler is running and attempt to intercept but it seems to be a moving target for every release of the test/fakes runner.

I'll see if I can get it working with VS2017 but I can't guarantee anything...

barisgul commented 4 years ago

Hi @sawilde , Is there any progress about this problem? we also having same issue. The issue is in progress since Mar 18, 2019 as i seen.