1
votes

I have visual studio 2015 professional edition and in my project there are many feature files and they contain several scenarios of specflow.

I want to run some specific scenarios(having same tag name) of different features using a batch script. So, How do i do that?

2
Write a bit of batch code doing roughly what you want and post it. Someone just might be able to help you get it right :) - Jonas

2 Answers

0
votes

It depends which test runner you are using and which flavour Specflow generates your tests in. Basically you write a batch script to call a console tool of your test runner to run the tests. Assuming you are using NUnit you can run them with NUnits runner as described in the documentation other runners will require other stuff

0
votes

I got the solution, to run specific scenarios we will use common tag name for those scenarios and use the tag in the batch file. Ex: Features /include:

And after that we use the tag on another batch file(Ex: set arg1=%1). There you initialize the variable for the project. Set the packages for the project and debugger-location.

Then use it in the nunit console and run the .dll file Ex: nunit-console "%DebuggerLocation%\%Namespace%.dll" %arg1%