Search code examples
testingautomated-testsspecflowautotestspecrun

SpecRun.exe: run .feature or .playlist file from command line


Good day. I have a several .feature files:

1.feature

2.feature

1.playlist

2.playlist

etc.

I can run they separatelly in visual studio:

-any feature file in debug mode

-any playlist with Test Explorer.

But if i need to run one of they from command line, what i should do?

If i use SpecRun.exe run

SpecRun.exe run %profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log

this performs launch of ALL scenarios in ALL .feature files.


Solution

  • Have a look at the command line switches of the SpecRun.exe here http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/

    You are looking for /filter to filter your execution to a single scenario. The format of it is documented here: http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter