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
Daily Usage Issues
"Show coverage for Covering Test Only" gets out of sync after function rename
Started by Mark on 5,946 views
Remco NCrunch Developer
#4565
26 Aug 2013 20:46 UTC
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
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
Post a reply
Log in to reply.