Removed in SpecFlow 3¶
Note that this tool has been removed in SpecFlow 3. This topic only applies to earlier versions of SpecFlow.
Besides executing your tests and verifying that acceptance criteria are met, SpecFlow provides a number of other tools to support the development process. These tools are accessed using the
specflow.exe command line tool located in the
/packages/SpecFlow.x.y.a/tools directory of your project.
A number of commands are available. If you start
specflow.exe without any additional options, the available commands are listed.
help command to display the detailed information on a specific command’s syntax. For example,
specflow.exe help generateall displays the options available for the generateall command.
generateall command to re-generate outdated unit test classes based on your feature files. This can be useful when upgrading to a newer SpecFlow version, or if feature files are modified outside of Visual Studio.
The following arguments are available.
|--ProjectFile||required||The path to the project file containing the feature files.|
|--force||optional||Forces the re-generation of the class files, even if the generated class is up-to-date based on the file modification time and the SpecFlow generator version.
Default: disabled (only outdated files are generated)
|--verbose||optional||Displays detailed information about the generation process.
The following command line regenerates unit tests for the BookShop sample application.
specflow.exe generateall --ProjectFile BookShop.AcceptanceTests.csproj
generateall function can also be used with MSBuild, allowing you to update the files before compiling the solution. This can be particularly useful if feature files are regularly modified outside of Visual Studio. See Generate Tests from MsBuild for details on configuring MSBuild to use the
Please note that the following reports are only supported prior to SpecFlow 3. As of SpecFlow 3, these options are no longer available.
Generates a report that includes information on the usage and binding status of the steps in the entire project. For more details, see Reporting.
Generates an execution report based on the output of the NUnit Console Runner. For more details, see Reporting.
Generates an execution report based on the TRX output generated by VSTest. For more details, see Reporting.