0

Is there any way to execute multiple feature files within a project using specrun.exe

eg: I have a project Student, and I have the below feature files:

a.Maths
b.Biology
C.Chemistry
d.Physics.

Now I need to execute Maths and Physics together. How to do it?

For single feature file (Eg:Maths) the below command is working fine.

@pushd %~dp0

%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "Student.csproj"

@if ERRORLEVEL 1 goto end

@cd ..\packages\SpecRun.Runner.*\tools

@set profile=%1
@if "%profile%" == "" set profile=Default

SpecRun.exe run %~dp0\%profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log %2 /filter:testpath:Feature:Maths %4 %5

:end

@popd
Ross Ridge
  • 38,414
  • 7
  • 81
  • 112
user1117040
  • 131
  • 2
  • 2
  • 11
  • You should tell us precisely what the command that batch executes is. – Magoo Dec 02 '15 at 06:01
  • I have the command in the question itself.Please have a look on it. What I need is like this SpecRun.exe run %~dp0\%profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log %2 /filter:testpath:Feature:Maths & Physics %4 %5 – user1117040 Dec 02 '15 at 06:32

1 Answers1

0

Finally, I got the answer.

we have to exclude the feature files which we don't want to run.

The command that worked fine for me is as below

SpecRun.exe run %~dp0\%profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log "/filter:!testpath:Feature:Biology& !testpath:Feature:Chemistry"
user1117040
  • 131
  • 2
  • 2
  • 11