开发者

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

开发者 https://www.devze.com 2023-02-10 09:27 出处:网络
I\'m in the process of refactoring开发者_开发技巧 our SpecFlow-implemented BDD tests. As part of this work, I\'ve commented out most of the step definitions.

I'm in the process of refactoring开发者_开发技巧 our SpecFlow-implemented BDD tests. As part of this work, I've commented out most of the step definitions.

As I run the tests, I'm presented with the "No matching step definition found for one or more steps." message.

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


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

specflow.exe stepdefinitionreport MyTests.csproj

But be aware:

  1. If your assembly uses the .NET 4.0 runtime, you'll need to add a specflow.exe.config file with a <supportedRuntime> element.
  2. It uses some functionality that's 32-bit only. So if you're on 64-bit Windows, you'll need to use CORFLAGS /32BIT+ to edit the Specflow.exe file.
  3. By default, it looks in the bin\Debug folder.
0

精彩评论

暂无评论...
验证码 换一张
取 消