The test passes. You re-run it. It fails. Nothing changed.
39 sec video · 1 min readIt passes or fails without any code change.
If everyone does that, nobody trusts the tests anymore.
Timing and waits, shared data between tests, or tests that only pass in a certain order.
Skip it for now, with a ticket and an owner.
test.skip("applies the coupon") // PAY-311In 2016, Google reported about 16% of its tests were somewhat flaky.
is worse than no test.
Source: John Micco, “Flaky Tests at Google and How We Mitigate Them”, Google Testing Blog, 2016