axodox / AxoCover

Nice and free .Net code coverage support for Visual Studio with OpenCover.
https://marketplace.visualstudio.com/items?itemName=axodox1.AxoCover
MIT License
250 stars 60 forks source link

AxoCover does not find all the unitests in the solution #187

Open PickyUsernamee opened 5 years ago

PickyUsernamee commented 5 years ago

As title says, the solution has 1781 unitests and axocover only finds 1587.. any idea why?

selinalisz0 commented 5 years ago

I got the same problem... and don't know why

elliott-beach commented 5 years ago

Perhaps you are using a mix of MSTestv1 and MSTestv2? The AxoCover test settings page has an "Adaper Settings" option with "integrated" or "standard".

Use the integrated adapter mode for executing MSTestV1 tests and the standard mode for MSTestV2, NUnit and XUnit tests.

ReubenAllott commented 4 years ago

It looks like AxoCover does not count inherited tests. I have some generic base classes that perform common tests, and then I do more specific tests in derived test classes for the derived target classes.

The count in AxoCover is exactly lower by the number of inherited tests - if I remove the inherited tests the counts are the same again.

Further, it looks like AxoCover may not be running the inherited tests at all - I don't get the errors when I force errors in the inherited tests.