Cucumber特征文件在命令行上运行,但在Intellij中不运行。我相信这意味着我还缺少其他配置步骤。
我使用的是Windows 7,Intellij IDEA 13.1.3,Ruby 1.9.3,Cucumber 1.3.4
这是我的项目文件夹结构:
\cucumber
\projectName
\features
-mainFeature.feature
\step_definitions
-helperFeature.feature
在命令行中,我导航到黄瓜文件夹:
E:\path\to\cucumber\folder\
然后执行以下命令:
bundle exec cucumber projectName/features/mainFeature.feature
此命令成功运行黄瓜测试用例。
当我尝试在Intellij中运行黄瓜测试用例时,Intellij无法找到/加载步骤定义。它说我可以用这些片段实现未定义步骤的步骤定义"对于我在我的功能中使用的每一步。
具体的错误信息是:
You can implement step definitions for undefined steps with these snippets:
Then(/^verify the same\-date destination airport grouping strategy$/) do
pending # express the regexp above with the code you wish you had
end
1 scenario (1 undefined)
5 steps (5 undefined)
0m0.014s
"运行>编辑配置"我在配置选项卡上定义了以下内容:
Feature file: E:\path\to\cucumber\folder\projectName\features\scratchpad_grouping_strategy.feature
Runner options: --color -r features
'cucumber' gem: 1.3.4
Working directory: E:\path\to\cucumber\folder\
Environment variables: [environment variables]
Ruby arguments: -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift);
Ruby SDK: Use other SDK -> 'cucumber' gem: ruby 1.9.3
在Bundler选项卡下:
Run the script in context of the bundle (bundle exec) is checked
建议?