2017-01-09 44 views
0

美好的一天。我有几个.feature文件:SpecRun.exe:从命令行运行.feature或.playlist文件

1.feature

2.feature

1.playlist

2.playlist

我可以运行他们单独在visual studio中:

-any feature file in调试模式

-任何带有Test Explorer的播放列表。

但是如果我需要从命令行运行它们中的一个,我该怎么办?

如果我使用SpecRun.exe运行

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

这个执行发射所有情况下的所有文件.feature。

回答

1

看一看在SpecRun.exe的命令行开关这里http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/

您正在寻找/过滤器,以你的执行筛选到一个场景。 它的格式记录在这里:http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter

+0

这个链接看起来像一个解决方案,但没有例子。如果我编写SpecRun.exe运行过滤器:,我应该写什么? – Evgeniy175

+0

/filter:testpath:Feature:FileName - 我的解决方案。谢谢! – Evgeniy175