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

Notification

Icon
Error

Code coverage for test classes
Mangust
#1 Posted : Friday, January 11, 2013 9:50:02 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
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
#2 Posted : Friday, January 11, 2013 11:27:02 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I think this might be what you're after - code coverage suppression.
Mangust
#3 Posted : Friday, January 11, 2013 12:51:04 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
Remco;3509 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.
BKStrelioff
#4 Posted : Saturday, February 2, 2013 10:54:34 AM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2012(UTC)
Posts: 23

Was thanked: 4 time(s) in 4 post(s)
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.
1 user thanked BKStrelioff for this useful post.
Remco on 2/2/2013(UTC)
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.032 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download