CallMeLaNN
CallMeLaNN

Reputation: 8578

SpecFlow - Find all scenarios from method step and Find all unimplemented steps

New to SpecFlow.

When specs project become larger, organizing files and refactoring Given/When/Then string become troublesome.

  1. How to find Scenarios in feature file from method step. Sometimes I have a steps shared in a few scenarios and features but from the C# step method view how to 'Find All References' in feature file?
  2. How to get all unimplemented scenario steps (font color purple) in all features files so that I can implement the steps. Currently when I Run All tests, no warn about unimplemented steps left.

Upvotes: 0

Views: 2461

Answers (2)

user22332089
user22332089

Reputation: 1

As of Visual Studio 2022, using Specflow version 3.9.74, when I right click anywhere within the step definition there is an option "Find Step Definition Usages" which is what you are looking for.

Upvotes: 0

paulroho
paulroho

Reputation: 1266

Beginning with version 1.9, SpecFlow supports these things (refer to What's new in v1.9):

  • ad 1.: Context menu in step definition: "Go To SpecFlow Step Definition Usages" (shortcut Ctrl+Shift+Alt+S):
  • ad 2.: Context menu in feature file: "Generate Step Definitions"

Upvotes: 1

Related Questions