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

Notification

Icon
Error

Test metrics
KrisVH
#1 Posted : Thursday, May 24, 2012 8:55:24 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/24/2012(UTC)
Posts: 9

Was thanked: 2 time(s) in 2 post(s)
First off, I find NCrunch totally brilliant. The new test metrics screen is awesome as hell, it's clean and clear, showing exactly what you need to see and nothing more. Props too for how you managed to only count lines that aren't generated by designers.

One question: excluding files from metrics works very well. But is it possible to exclude just a single line too? I have a single line somewhere that is just too complicated to test and if I could exclude it from counting, well, that would be great.
Remco
#2 Posted : Thursday, May 24, 2012 10:41:25 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 Kris,

Thanks for posting and I'm glad you're enjoying NCrunch and the new metrics view! Right now there isn't any feature that allows you to exclude individual lines from the metrics or code coverage, although I am looking at ways in which this could be done. I'm looking at perhaps using inline comments to do this ... do you think this would work for you?


Cheers,

Remco
KrisVH
#3 Posted : Tuesday, May 29, 2012 7:40:35 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/24/2012(UTC)
Posts: 9

Was thanked: 2 time(s) in 2 post(s)
Yeah, that would probably work. Maybe it would be more elegant to find a way to keep it out of the source code files, like you do with ignoring entire files, but I can't think of a good way to indicate what lines you want to ignore then. Line numbers wouldn't really do it :-)
1 user thanked KrisVH for this useful post.
Remco on 5/29/2012(UTC)
KrisVH
#4 Posted : Tuesday, May 29, 2012 12:02:36 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/24/2012(UTC)
Posts: 9

Was thanked: 2 time(s) in 2 post(s)
Or, as I see now, maybe ignoring entire functions could be useful as well. And since we're already tagging functions with the ExclusivelyUses attribute, ignoring functions for metrics could perhaps work the same way.

Edit: did I say useful? I meant very useful. :-)
Remco
#5 Posted : Thursday, May 31, 2012 9:08:52 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)
I suspect the answer may involve a bit of both. I've had a few people noting the lack of support for MSTest's code coverage control attributes.
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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download