Daily Usage Issues

NoCoverage/PassingCoverage - What about PartialCoverage ?

Started by PPetrov on 7,474 views

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.
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

Post a reply

Log in to reply.