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:
- If your assembly uses the .NET 4.0 runtime, you'll need to add a
specflow.exe.config
file with a<supportedRuntime>
element. - 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 theSpecflow.exe
file. - By default, it looks in the
bin\Debug
folder.
精彩评论