如何调查在 CI 上没有描述而失败的黄瓜故障

How to investigate cucumber failures which fail with no description on CI

我将水豚从 v2.18.0 升级到了 v3.12.0。现在我的一些黄瓜功能无缘无故地失败了:

..F..............................................................................................................................................

Failing Scenarios:
cucumber features/users/login:7 # Scenario: Login    
9 scenarios (1 failed, 8 passed)
44 steps (44 passed)
2m41.470s

说1个场景失败了,但是所有的步骤都通过了

有什么问题吗?

如何调试这个问题?

我正在使用以下 gem 版本:

rails (5.1.2)
cucumber (3.1.2)
capybara (3.12.0)
selenium-webdriver (3.141.0)

我 运行 在无头模式下 chrome 驱动程序 v2.45.615355 和 google chrome v72.0.3626.28-beta 的测试

我从

更改了我的 CI 测试脚本
bundle exec cucumber

bundle exec cucumber -b

我很容易看出失败的原因:

  execution expired (Timeout::Error)
  ...
  /builds/project/features/support/capybara_helper.rb:8:in `wait_until'
  /builds/project/features/support/capybara_helper.rb:21:in `block_and_wait_for_requests_complete'
  ...

结果是

中发生了超时错误
After do
  block_and_wait_for_requests_complete
end

我等待所有 JS 和机架请求完成的挂钩。 cucumber -h 通过以下方式描述 -b 选项:

-b, --backtrace                  Show full backtrace for all errors.