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

Notification

Icon
Error

No coverage reporting on Property get - .Net, old-style property
DamonOverboe
#1 Posted : Tuesday, January 29, 2013 10:20:35 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/20/2012(UTC)
Posts: 10
Location: Springfield, MO, USA

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
I am covering a property with tests; it is a non-automatic property in VS 2012 c#, and it is indicating no coverage on the property. However, the set shows that it is covered.

I have put a breakpoint in the get and debugged the test to see that I am in fact hitting it.


I'm currently executing 2 of the three branches in the get, but no luck showing it. It's not a show-stopper, just odd.

I saw a forum post discussing auto-properties (that I can't find now) that was discussing this, and it sounds like it's not currently implemented?

Any plans to implement this in the near future? Again it's not that high priority of a request.
Remco
#2 Posted : Tuesday, January 29, 2013 11:12:32 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi Damon -

This sounds like a bug. Get/Set properties should definitely be tracked by NCrunch. This could be a mapping problem of some kind. Try doing a reset of the NCrunch engine and see if the resulting test run fixes the issue. Also - have a look at the documentation for an explanation of other things that can cause code coverage oddities - http://www.ncrunch.net/documentation/troubleshooting_missing-code-coverage.

Cheers,

Remco
1 user thanked Remco for this useful post.
DamonOverboe on 1/30/2013(UTC)
DamonOverboe
#3 Posted : Wednesday, January 30, 2013 6:54:12 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/20/2012(UTC)
Posts: 10
Location: Springfield, MO, USA

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
I would bet it's related to the Lost Project References. We had to correct quite a few of those and still have 3-4 outstanding warnings, I'll dig into that tomorrow. *I don't think the remaining warnings are Lost Refs, but not positive.*

I did notice once that I got lucky and cleared something and was able to have it mark a getter as covered, towards the end of the day. I'll keep an eye on that, but I'll try to get those other warnings resolved first.
Remco
#4 Posted : Wednesday, January 30, 2013 8:46:23 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Lost project references can definitely cause this to happen. Even if you have no intention of continuing with NCrunch long term, I definitely would still recommend working through the warnings and addressing the ones that you are able to. Most of the warnings are caused by structural abnormalities with your solution that may not be surfacing problems with your current workflow, but could create some very confusing situations in future. Ultimately you are building a cleaner and more reliable solution :)
DamonOverboe
#5 Posted : Wednesday, January 30, 2013 8:54:18 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/20/2012(UTC)
Posts: 10
Location: Springfield, MO, USA

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Yeah we're working through correcting those. This is for a company I am consulting with.

As you already know, I'm addicted to NCrunch, so I'll be continuing with it long term, just waiting for them to pay their 1st invoice before buying it, or my 30 day trial to run out, whichever comes first. :-D
1 user thanked DamonOverboe for this useful post.
Remco on 1/30/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.040 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download