Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Coverage Markers not working
andjon2005
#1 Posted : Thursday, April 21, 2022 5:32:53 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/20/2022(UTC)
Posts: 2
Location: Sweden

Hi!

I use NCrunch 4.11.0.2 with Microsoft Visual Studio Professional 2019 and Microsoft.VisualStudio.TestTools.UnitTesting with Moq. The last couple of months or so, a strange behaviour with the Coverage Markers appeared. Code being covered with unit tests are showing the black color meaning "uncovered" and the same thing for the unit tests in the unit test classes. Even stranger, some of the unit tests that are Ok and supposed to show the color green, are actually showing the color red. Another strange behaviour is when I force an Ok unit test to fail, then the unit test is supposed to change color from green to red, but it doesn't.

I've tried all the basic stuff to get rid of this behaviour, but failed so far.

Attempts to fix the problems:

- Restarting the NCrunch engine to resynchronise with Visual Studio and restarting all projects in solution.
- Disabled/enabled the NCrunch Extension in Visual Studio.
- Deleted the _NCrunch_SOLUTION directory adjacent to the Visual Studio solution file.
- Rerunning the Configuration Wizard.
- Uninstalled NCrunch and reinstalled it.

Do you have any ideas what might cause this behaviour and how to fix it?

Regards,

/Andreas
Remco
#2 Posted : Thursday, April 21, 2022 12:19:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

Have you checked the troubleshooting page for this problem? There are a range of configuration issues that can cause this.

Note that when you run a test with a debugger attached, the coverage from the run will not be recorded but the pass/fail result will still be reported. This can cause some inconsistencies in the coverage display. Running the test without a debugger attached will clean this up.

Does the debugger work successfully for you? (i.e. are you able to debug your code with the black markers using NCrunch?)
andjon2005
#3 Posted : Thursday, April 21, 2022 12:47:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/20/2022(UTC)
Posts: 2
Location: Sweden

Hi!

Thanks for your answer!

The debugger works as expected!

I will check the troubleshooting page more in detail to see if anything interesting turns up. The thing is, I been using NCrunch for a couple of years with my team at work and there hasn´t been any problems until the last couple of months and we have never made any minor or major configuration changes. Only the configuration wizard the first time we started using NCrunch.

/Andreas
Remco
#4 Posted : Thursday, April 21, 2022 12:57:35 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Something else worth checking is your engine mode.

The 'Run pinned tests automatically' mode can have a coverage filter set up (the 'Show coverage for tests' setting).
PoorHippo
#5 Posted : Saturday, July 9, 2022 10:32:06 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/9/2022(UTC)
Posts: 1
Location: United States of America

I faced similar kind of issue last time, I am still searching for some proper solution Same issue still no fix to this.
Remco
#6 Posted : Sunday, July 10, 2022 11:45:44 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
PoorHippo;16201 wrote:
I faced similar kind of issue last time, I am still searching for some proper solution Same issue still no fix to this.


Can you confirm if you've tried the tips in the troubleshooting page linked above? We presently have no outstanding issues in this area that we are aware of.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download