Directly related to the recently posted "Automatically select first broken test in NCrunch Tests Window," when I'm TDDing it would be great if I had a keyboard shortcut that opened up the test file that contained the failing test and navigated to that test. I'll typically use Resharper's Ctrl-Dash, the requested shortcut would be far better :).
I really don't care how "first" is defined in the above, I usually only have one at a time.
Thanks for an amazing tool.
--Kaleb
Feature Suggestions
"Take me to first failing test" keyboard shortcut
Started by kalebpederson on 7,855 views
Remco NCrunch Developer
#2493
20 Jul 2012 22:38 UTC
Thanks for the suggestion! I've been thinking about the best way to implement something like this and would value your feedback on the approach.
When navigating to a failed test, there are two points of navigation that are of interest:
1. The entry point of the test
2. The deepest accessible point of failure on the failing test's exception call stack
Which do you feel would be more useful to you?
When navigating to a failed test, there are two points of navigation that are of interest:
1. The entry point of the test
2. The deepest accessible point of failure on the failing test's exception call stack
Which do you feel would be more useful to you?
Remco wrote:When navigating to a failed test, there are two points of navigation that are of interest:
1. The entry point of the test
2. The deepest accessible point of failure on the failing test's exception call stack
I think it depends. The main question I'm asking myself is why would the test be red?
- If I just wrote the test I know why it's red and I'm already in the test, so it doesn't matter.
- If I just wrote the code that should have made the test green and it fails then I suspect I'm going to be interested in the deepest point.
- If I've just arrived at work in the morning, then I'll want to see the test again to know where I left off the day before
- If I accidentally broke something I'll probably want to look at the test first to understand the context, then I would be interested in the deepest point.
What other reasons might the test be red?
I asked two of my coworkers and they thought the deepest possible point would be of more interest. One of them suggested that the keyboard shortcut first take me to the test and then, if repeated, take me to the deepest possible point -- which seems quite sensible to me. I suppose repeated executions of the keyboard shortcut could navigate through all the failing tests in that same way (although that wasn't what I originally requested, it seems useful).
Thank you very much for your willingness to reach out to others and look for true utility in the feature.
--Kaleb
Edited 20 Jul 2012 23:00 UTC
Remco NCrunch Developer
#2496
22 Jul 2012 23:51 UTC
From a clean implementation point of view, it seems to me like the best may be to have both options as separate shortcuts. Each could use the current position in order to identify what is the 'next' test to be navigated to, so it should be easy to jump through the code like this ...
Thanks for your feedback. I'll update my backlog notes for this and will see what I can do about implementing it in a future revision.
Cheers,
Remco
Thanks for your feedback. I'll update my backlog notes for this and will see what I can do about implementing it in a future revision.
Cheers,
Remco
Sounds great, thanks!
Post a reply
Log in to reply.