SpecFlow Special Tool "SpecFlowSingleFileGenerator"

I found that this custom tool is used to generate .cs files from the SpecFlow.feature file. Is there any way to use this tool outside of VS? I would like to call this tool from the console for a specific .feature file when creating my project using NAnt.

Hello,

Waida Vladimir

+4
source share
1 answer

Are you sure you can! That is, if you mean: "Can I generate unit test code from my .feature files without using Visual Studio"

I wrote about it here: http://www.marcusoft.net/2010/12/specflowexe-and-mstest.html , and in short you can use SpecFlow.exe with the key "generateAll" and it will check your project settings and generate suitable unit tests for you (in my example it is MsTest, but it can be any of the supported testing systems).

Using the SpecFlow.exe help, we get the following brief help:

Generate tests from all feature files in a project usage: specflow generateall projectFile [/force] [/verbose] projectFile Visual Studio Project File containing features 

So, for the Specs.csproj project, this will be:

 "%ProgramFiles(x86)%\TechTalk\SpecFlow\SpecFlow.exe" generateAll Specs\Specs.csproj /force /verbose 

You can read more in your blog post - but that is basically it.

+10
source

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


All Articles