【发布时间】:2016-07-01 02:47:18
【问题描述】:
即使在步骤定义失败后,Cucumber 也会继续执行,它不仅输出失败的步骤,还输出通过的步骤。我需要使用什么选项来确保 Cucumber 在遇到失败步骤后立即停止执行?
这是我的 cucumber.yml 文件
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
autotest: <%= std_opts %> features --color
【问题讨论】: