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

Notification

Icon
Error

VS2012 - Beginning of test not marked where a test is failing, coverage markers incorrect
penguat
#1 Posted : Monday, January 14, 2013 3:33:22 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2012(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Where a test is failing in my big VS2012 solution, the markers are showing no coverage above the exception, where they should show failing coverage. The beginning of the test is also not marked. Tests further down the same testfixture are showing as not covered. These are NUnit tests.



My markers for no coverage are blue, as I sometimes use a dark theme.

thread settings - 2 threads, including a fast lane, optimised for memory efficiency, running in parallel, running all tests automatically.

This isn't the behaviour I expect from NCrunch - even if it is effectively running single-threaded.

Thanks!

Remco
#2 Posted : Monday, January 14, 2013 10:37:55 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
NCrunch maps code coverage information separate from exception lines. Although in normal situations they should align nicely, sometimes there are things that can cause them to go askew. A couple of the things that I'm aware of are:

- If you have code executing in a different application domain from the test runner (i.e. you've built your own app domain at test runtime), then executed code in this domain throws an exception. NCrunch cannot record code coverage in the application domain, but it will still pick up the exception stack trace
- If you have test code that somehow emits an exception stack trace for a part of your system that isn't actually covered by the test (technically this is possible, though very unusual)

Based on the fact that the screenshot you've shown is very close to the root of the test, I suspect that is actually a mapping issue of some kind (i.e. defect). Does the problem occur consistently for you? Or does it go away after you reset the NCrunch engine? if it's still happening, I'd really like to see the log file from a bug report if you're able to push one through.


Cheers,

Remco
penguat
#3 Posted : Tuesday, January 15, 2013 11:30:16 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2012(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Sadly, it doesn't look like i can reproduce it. We don't build our own app domain at test runtime, nor would this be code that's not covered. I'm sorry I didn't think to file a bug report at the time! It occurred consistently until I changed the settings - I hit the reset button a few times.

I have restarted the computer since then, which might've had something to do with it, and I changed to using 3 threads for a while, rather than just two.

If I spot it again, you'll get a bug report, I promise!
Remco
#4 Posted : Tuesday, January 15, 2013 9:21:06 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Thanks! I think this was probably the result of a known mapping issue that's been floating around lately. It appears more or less randomly, infrequently and to date I haven't been able to reproduce it. Usually a reset of the engine will solve the problem. Thanks for taking the time to report it.
penguat
#5 Posted : Thursday, January 31, 2013 2:38:41 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2012(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I've submitted a bug report - something similar if not necessarily identical. My tests are showing multiple start markers, both failing and passing.

Remco
#6 Posted : Thursday, January 31, 2013 8:06:31 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Thanks for the report - I've seen this one come through and will make an effort to get to the bottom of it. Do also let me know if you manage to find clear steps to reproduce.


Cheers,

Remco
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.047 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download