General Feedback

Code coverage for test classes

Started by Mangust on 9,929 views

I have a suggestion that something has to be done with code coverage for the test classes. There are some cases where the test coverage there is not 100% but it can never be using current model. For instance when you have expected exception. That means that the last line would never be reached really. Is there a way to either exclude this by default from the coverage or make another tab for tests/ another color or something like that? May be there is a way to say that it's still 100% if it did not reach the end but exception was excpected.
Remco wrote:I think this might be what you're after - code coverage suppression.


Well, that thing is too manual so if it's possible to do stuff automatic it would be better :) Though it's not really a big issue.
I agree that the test coverage window/settings should exclude lines of test code by default, or at least treat them separately. It is misleading (not nefariously) to include them in the overall numbers. I have done this manually, but that is a sour experience.

Post a reply

Log in to reply.