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

Notification

Icon
Error

"Take me to first failing test" keyboard shortcut
kalebpederson
#1 Posted : Friday, July 20, 2012 3:44:28 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2012(UTC)
Posts: 25
Location: US

Thanks: 5 times
Was thanked: 3 time(s) in 3 post(s)
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
Remco
#2 Posted : Friday, July 20, 2012 10:38:23 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
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?
kalebpederson
#3 Posted : Friday, July 20, 2012 11:00:51 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2012(UTC)
Posts: 25
Location: US

Thanks: 5 times
Was thanked: 3 time(s) in 3 post(s)
Remco;2493 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
Remco
#4 Posted : Sunday, July 22, 2012 11:51:10 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
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
1 user thanked Remco for this useful post.
kalebpederson on 7/23/2012(UTC)
kalebpederson
#5 Posted : Monday, July 23, 2012 1:33:23 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2012(UTC)
Posts: 25
Location: US

Thanks: 5 times
Was thanked: 3 time(s) in 3 post(s)
Sounds great, thanks!
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.049 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download