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

Notification

Icon
Error

"Show coverage for Covering Test Only" gets out of sync after function rename
Mark
#1 Posted : Monday, August 26, 2013 6:43:58 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/29/2012(UTC)
Posts: 36

Thanks: 13 times
Was thanked: 8 time(s) in 8 post(s)
Just a note of something I noticed today. It appears that if you set NCrunch in the mode where it shows the coverage for only the selected test that it does the filtering based on the function name. Renaming the test method leaves you with uncovered coverage markers which was confusing until I realized what happened.

Repro steps
1) Right Click Coverage marker in test (Coverage markers should be green since you're in the test code)
2) Advanced -> Show coverage for covering test only
3) Place cursor in test name and hit F2 to rename. Change the name of the test and hit enter
4) NCrunch resynchronizes and reruns the tests, coverage markers should go all white.
5) Rename Method again back to original name
6) NCrunch resynchronizes, coverage Markers all go green again.

Ideally coverage markers would stay green during Step 4. Not so ideally, kick NCrunch out of the single test coverage mode since in normal workflow, the chance of renaming the function back to the original name is pretty slim. Obviously there's an easy work around but just wanted to make you aware.

VS2012 Pro, Windows 7, Code Rush 13.1.6.0

Thanks,
Mark Smith
Remco
#2 Posted : Monday, August 26, 2013 8:46:35 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 Mark -

Thanks for reporting this. NCrunch isn't able to track renaming of tests. As far as it's concerned, when you rename a test, you're effectively deleting a test and creating a new one. So for the moment, I think the only available solution to this is to stop showing test coverage for any test that NCrunch has detected as being removed, and simply return to showing coverage for everything.

I've noted this down to be fixed.


Thanks!

Remco
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download