.netspecflowspecrun

how do I obtain or create a .srprofile file when nuget doesn't create it?


To configure and use many features of SpecRun (beefed up version of Specflow, the cucumber for .NET), you need some sort of .sfprofile file. A file "default.sfprofile" is supposedly and (I assume) typically created for you when the Nuget package is installed. But it did not do so for me.

Is there another way to trigger the creation of "default.sfprofile"? If not, will all be well if I create it myself? If that will work, could someone please post what the initial contents of this file should be? Thanks!


Solution

  • The SpecFlow+ Runner configuration file template is available as Item Template if you have the SpecFlow for Visual Studio extension installed:

    enter image description here

    It is the last one in the list.

    Be aware that VS will try to create it as Default1.srProfile by default. You need to adjust the filename manually.

    Old and outdated answer:

    The template for the file is in packages\SpecRun.SpecFlow.1.2.0\content\Default.srprofile.pp

    Copy that and replace the {...} Placeholders with your values. projectId is a Guid.