Search code examples
powershellspecflowcakebuild

Specflow Autogenerated c# code using cake


I was wondering if there was any way Cake could build Visual Studio Solution and detect changes in feature files and generate the corresponding changes. If not Cake, can it be done using any other way other than Visual Studio? I have tried finding documents related to it but I cant find anything related to it.


Solution

  • If you want to generate the code behind files of the feature files during build time, you have 2 options.

    1. Run specflow.exe generate all in the pre build event Documentation: http://specflow.org/documentation/Tools/

    2. Use the MSBuild integration Documentation. http://specflow.org/documentation/Generate-Tests-from-MsBuild/

    The recommend way is to use the MSBuild integration.

    I have no experience with Cake, but perhaps you can integrate/use one of these options with it.