DEV Community

n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on

[Capybara] Debug for random error

πŸ€” What is random error

Unstable tests. When you run the feature spec, it sometimes goes to fail and sometimes go to success.

πŸ‘ 1. Read the log and screenshot

omit.

πŸ‘ 2. Run the unstable test for 100 times.

Of course, you can use binding.pry

100.times do
  scenario 'unstable test' do
    # test something
    binding.pry if something.is_not_expected
  end
end

πŸ‘ Other ways

  • under developmnet

πŸ”₯ Problems

πŸ”— Parent Note

Top comments (0)