General Feedback

Test metrics

Started by KrisVH on 11,146 views

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

Edited

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.

Post a reply

Log in to reply.