UNG
UNG

Reputation: 693

In SpecFlow SpecRun, How to run Specrun.exe instead of runtests.cmd using a .bat file?

I know runtests.cmd works from a .bat file using "C:\Users\username\Documents\Visual Studio 2015\Projects\blah\blahblah\runtests.cmd" . But since I have a MSBuild step in my Team City setup, I do not want to rerun the build step which is trigggered by runtests.cmd

So I try to create a .bat file which runs only Specrun.exe by specifying "C:\Users\username\Documents\Visual Studio 2015\Projects\blah\packages\SpecRun.Runner.1.5.2\tools\SpecRun.exe run Default.srprofile "/baseFolder:C:\Users\username\Documents\Visual Studio 2015\Projects\blah\blahblah\bin\Debug" /log:specrun.log" .

However the problem here is Specrun.exe needs /baseFolder to be specified in quotes and so does the bat command, and it erros saying "C:\Users\nandyu\Documents\Visual Studio 2015\Projects\SpecFrame\packages\SpecRun.Runner.1.5.2\tools\SpecRun.exe run Default.srprofile " is not an internal or external command.

Now, here the problem is that the batch execution gets confused with multiple quotes in the command. Does the /baseFolder has to be mentioned in double quotes "/baseFolder :path" ? or is there other way of specify the /baseFolder parameter?

Upvotes: 0

Views: 2204

Answers (1)

Andreas Willich
Andreas Willich

Reputation: 5825

I think you have to set the quotes at the correct position:

"C:\Users\username\Documents\Visual Studio 2015\Projects\blah\packages\SpecRun.Runner.1.5.2\tools\SpecRun.exe" run Default.srprofile /baseFolder:"C:\Users\username\Documents\Visual Studio 2015\Projects\blah\blahblah\bin\Debug" /log:specrun.log

Upvotes: 2

Related Questions