FortuneN / FineCodeCoverage

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
Other
506 stars 38 forks source link

No Coverage due to false "tests failed" statement #427

Closed Zaimatsu closed 1 month ago

Zaimatsu commented 1 month ago

Installed product versions

Description

Coverage Log displays (Tests) Failed, despite the fact that tests passed. This results in no coverage report.

tonyhallett commented 1 month ago

Firstly I am assuming that you have set the FCC option for not providing coverage when tests fail. Secondly I am assuming that you are not using the option to use ms code coverage and that the tests have indeed failed. When ms code coverage is not used FCC copies DLLs to a different directory and executes the tests in this directory which will cause tests to fail that rely on the original dll paths.

Zaimatsu commented 1 month ago

Thank you for your quick response! Yes, I'm not using MS code coverage. Thank you for explaining what is happening under the hood; it's clearer now what could be causing the issue. I reported this issue because it was working fine a few weeks ago, and I'm pretty sure nothing that could affect the tests has changed in my solution. To confirm the problem, I've created a brand new solution (console app, .NET8, and NUnit3 project), and FCC fails there as well. Also, no fine-code-coverage directory is created. Maybe it has something to do with the Visual Studio upgrade I did recently? Are there any verbose logs I could check?

Output FCC:

Fine Code Coverage 6/5/2024 9:17:04 AM: Initialized
Fine Code Coverage 6/5/2024 9:18:13 AM: See option RunMsCodeCoverage for a better ( Beta ) experience.  https://github.com/FortuneN/FineCodeCoverage/blob/master/README.md
Fine Code Coverage 6/5/2024 9:18:13 AM: Coverage collected when tests finish. RunInParallel option true for immediate
Fine Code Coverage 6/5/2024 9:18:15 AM: ================================== START ==================================
Fine Code Coverage 6/5/2024 9:18:15 AM: (FCCTestTests) Failed.
Disabled
Fine Code Coverage 6/5/2024 9:18:15 AM: ================================== DONE ==================================

image

tonyhallett commented 1 month ago

Looks like FCC is disabled

Zaimatsu commented 1 month ago

Well, you're right. It was disabled. Tools->Options->Fine Code Coverage->General->Run(Common) - 'Enabled' was set to false. I don't know how this could have happened. Are the Fine Code Coverage options global and shared between solutions?

EDIT: I've discovered that all the settings are disabled. Everything is set to false. What are the default settings?

EDIT2: Ok, found it. https://github.com/FortuneN/FineCodeCoverage/blob/7d401cf9409573bab017e454a6264195e79e5fb1/SharedProject/Options/AppOptionsProvider.cs#L55

I'm closing the issue, but I find it peculiar that all options have been reset. Thank you for your help!

tonyhallett commented 1 month ago

I find it peculiar that all options have been reset.

Me too. This is the first time it has been mentioned

Doomwhite commented 1 month ago

I find it peculiar that all options have been reset.

Happened to me as well