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

Notification

Icon
Error

NoCoverage/PassingCoverage - What about PartialCoverage ?
PPetrov
#1 Posted : Thursday, June 16, 2011 3:33:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/16/2011(UTC)
Posts: 1
Location: Sofia

Hi! Great product! Keep with the good work!
I've a small issue. I'm using VS2008 with NCrunch 1.32.0.0b and I've a simple Person class with a name property and a validation about the value in the constructor. The exception is covered by a test. When the throw statement is on a different line it gets green. When I comment the test it gets red, which is absolutely correct. The problem comes when I place the throw on the same line, the line marker is green but it shouldn't be. It should be a circle where the one demi-cirlce is with PassingCoverage color and the other is with NoCoverage color.

You can see a video illustrating the problem here coverage problem video

Thanks.
Remco
#2 Posted : Thursday, June 16, 2011 9:46:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi PPetrov,

You're absolutely correct in noting this issue. Basically NCrunch's code coverage isn't yet granular enough to be able to split the coverage information between logical statements that exist on the same line. When the profiling does reach this level of sophistication, splitting the coverage marker up to show partial coverage is definitely the most ideal and intuitive way to show this.

Until then, I recommend splitting logical statements across multiple lines. There are many advantages to doing this (i.e. more articulate stack-traces, easier debugging), and in most situations it can help to make code more readable.

Nice report by the way - I like the video.


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