A flaky test is a test that passes sometimes and fails sometimes, even though no code has changed. The causes are race conditions, leaked state, network/third-party dependency, randomness and fixed time dependency. The solution to this sort of race condition is easy: just remove the asynchronicity.

7m read timeFrom codewithjason.com
Post cover image
Table of contents
What is a flaky test?Race conditionsLeaked stateNetwork/third-party dependencyRandomnessFixed time dependencyTakeaways

Sort: