Navigating to SpecFlow Features from Test Runner

It is possible to run NUnit based SpecFlow Feature tests from either Visual Studio Test Explorer, or from the RS Unit Test Runner.

If using the VS Test Explorer, if you double-click on an individual test, it takes you to the relevant scenario in the Feature file.
If using the RS Test Runner, double-clickin on an individual test takes you to the auto-generated method in the relevant feature.cs file.

This second option is rarely, if ever, useful - navigating to the feature definition makes much more sense to me.

Can this behaviour be changed? Could be made an option to go to the Feature or the Class (with the former as the default).

I'm much more likely to use Test Explorer as a result of this difference.

13 comments

It only makes sense for it to open and highlight the test in the .feature file instead of its auto-generated .feature.cs file. I hope this is changed soon. It's a very useful feature on VS Test Explorer and a much needed feature on RS Unit Test Explorer.

2

It is correct, that RS Unit Test Explorer is not useable in combination with Specflow.

0

I have the same opinion. Double-click on test has to open feature file. As alternative I checked setting in Tools – Options – Projects and Solutions – Track Active Item in Solution Explorer and I can quickly open related feature file.

1

I am having the same issue.

What sometimes work is to Clear, Build and then Rebuild the solution.

I hope the issue is resolved soon.

0

Looks like this issue has been around since 2010... don't think we should hope it gets fixed any time soon.

0

Very annoying indeed and a definite productivity killer. Please fix!

1

This would be a really helpful change!

0

Please implement this change. Navigating to feature file is the intuitive behaviour.

0

Bumping this into 2019.  We would love to have this supported as well.

0

Please sign in to leave a comment.