Suggestion: Features to help get 100% coverage

I'm becoming addicted to seeing all green in my code highlighting.

- Option to show the closing brace of a unit test with an ExpectedExpection attribute as green.

- Shortcut key/menu item/icon to move to the next uncovered statement in a file. (My previous suggestion about per file code highlighting suggested using the bottom right corner of the code form - well there's enough room for two icons there!)
- Another alternative, an option toggle the contents of the resharper column between the normal errors/warnings and uncovered items.

- Option (maybe an attribute?) to be able to treat an exception, where it is the last statement of a method, as 'covered' or at least show as green. I have some exceptions that cannot be reached and are only there to allow compilation (e.g. a method with a switch containing all possible values of an enum). I cannot write a test to cover that statement but I don't want it to show as red.

- On the EAP I am using at the moment (1.1.304 - still a bit miffed that I upgrade Resharper to v6 and only then find out I need to change dotCover and dotTrace!), there is a noticeable pause when turning code highlighting on, (5 seconds or so for a relatively small project). This happens even when nothing has changed - ie switch highlighting off then switch it on again. Its not clear why the delay is there - all the information must have been compiled already and it can't take long to refresh a code file. Can you confirm this is going to be significantly improved in future releases? Also, there is no hourglass or other indication for this delay.

Cheers
Simon

3 comments

Hello Simon,
Thank you for the feedback!
Here are some more links for tracking feature requests you've described:

1) coverage of the closing brace:
http://youtrack.jetbrains.net/issue/DCVR-1577
2) go to next uncovered statement:
http://youtrack.jetbrains.net/issue/DCVR-422
3) statement filters (option to exclude from coverage results certain statement types like code in catch blocks):
http://youtrack.jetbrains.net/issue/DCVR-138
4) for ReSharper 6 integration you need just released dotCOver 1.1.1

Regarding delay before highlighting:
could you please provide some details about your environment?
What is the VS version? What is the project type (class library, web appplication etc.)?
Thanks in advance!

0

Hi Ruslan,

I'm evaulating DotCover and ReSharper, I just wanted to say how annoying it is to know that I can never get 100% coverage because of this closing brace issue.

That issue DCVR-1577 has been open 21 months!

Wouldn't a simple fix be to not count closing braces as a statement in any situation?

Alan

0

Hi Alan,
Thank you for the feedback!
Question with the closing brace is not so simple.
We've performed detailed investigation with several examples, inspected the IL code and in all cases closing brace corresponded to the statement which actually wasn't executed.
Currently we are thinking about something similar to your suggestion. Optional ability to exclude opening and closing braces from coverage results.

0

Please sign in to leave a comment.