1

再会。我有几个 .feature 文件:

1.特点

2.特点

1.播放列表

2.播放列表

等等

我可以在 Visual Studio 中分别运行它们:

-调试模式下的任何功能文件

- 任何带有测试资源管理器的播放列表。

但是如果我需要从命令行运行其中一个,我应该怎么做?

如果我使用SpecRun.exe运行

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

这将启动所有 .feature 文件中的所有场景。

4

1 回答 1

2

在此处查看 SpecRun.exe 的命令行开关http://specflow.org/plus/documentation/SpecFlowPlus-Runner-Command-Line/

您正在寻找 /filter 将您的执行过滤到单个场景。它的格式记录在这里:http ://specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter

于 2017-01-09T15:24:35.803 回答