Can I get SpecFlow to generate a list of missing step definitions without running tests?

I am refactoring our BDD tests implemented in SpecFlow. As part of this work, I commented on most of the definitions of steps.

When I run the tests, I am provided with "Determining the appropriate step found for one or more steps." message.

However, I would prefer not to wait for the tests to actually run. Is there a way to get SpecFlow to check for missing step definitions without running tests?

+4
source share
1 answer

You can use the stepdefinitionreport parameter for SpecFlow.exe as follows:

 specflow.exe stepdefinitionreport MyTests.csproj 

But keep in mind:

  • If your assembly uses the .NET 4.0 runtime, you need to add the specflow.exe.config file with the <supportedRuntime> element.
  • It uses some functionality, only 32-bit. Therefore, if you use 64-bit Windows, you need to use CORFLAGS /32BIT+ to edit the Specflow.exe file.
  • By default, it looks in the bin\Debug folder.
+6
source

Source: https://habr.com/ru/post/1339331/