DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

1 1

[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)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay