开发者

Ruby on Rails: Cucumber: is there a way to auto 'show me the page' on a failed test?

Is there a way to automatically show me the page when a test fails, then exit, so that i can fix the test, before continuing.. maybe ad开发者_JS百科ding a @skip tag when I don't care if it fails?


Yes, the answer is a bit late, just shy of 1 year, but...

You can add this to the features/env.rb or another file inside features/support:

After do |scenario|
  if scenario.respond_to?(:status) && scenario.status == :failed
    $fail_count = $fail_count.to_i + 1
    save_and_open_page if $fail_count <= 5
  end
end

More here: blog with comments

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜