🧪Flaky Test
Also known as Flaky Tests, Flakiness, Intermittent Test
A test that passes on one run and fails the next, with no code change.
Think of it like
Think of it like a smoke alarm that goes off at random. Soon nobody trusts it.
Example
Lucy's checkout test fails about one run in ten. It waits 500 milliseconds for the page, and on a busy build server that is not enough.
Why it matters
One flaky test makes the whole suite less trusted. People start pressing rerun instead of reading the failure.
Definition
Common mistake
Key takeaways
- 1Same code, different result. Pass, then fail.
- 2Timing, order, network. The usual causes.
- 3Fix it fast. Or nobody trusts red.