使用specrun在项目中执行多个功能文件

时间:2015-12-01 14:30:57

标签: windows cmd bdd specflow specrun

有没有办法使用specrun.exe

在项目中执行多个功能文件

例如:我有一个项目学生,我有以下功能文件:

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

现在我需要一起执行数学和物理。怎么做?

对于单个特征文件(例如:Maths),以下命令工作正常。

@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

1 个答案:

答案 0 :(得分:0)

最后,我得到了答案。

我们必须排除我们不想运行的功能文件。

对我来说工作正常的命令如下

SpecRun.exe run %~dp0\%profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log "/filter:!testpath:Feature:Biology& !testpath:Feature:Chemistry"
相关问题