API …
Dynamic & timing

Flaky behaviour

A button that sometimes fails, an element that re-renders under your feet and a stale-element trap.

Practice tasks

  • Set failure rate to 50% and write a retry that makes the test pass reliably.
  • Keep a reference to the re-rendering button and handle the stale element.
  • Hit the flaky API endpoint 20 times and compute the failure ratio.
  • Decide: should you retry the test or fix the cause?

More Dynamic & timing practice