What is a flaky test?

Updated May 6, 2026

Short answer

A flaky test passes or fails inconsistently.

Deep explanation

Caused by timing issues, external dependencies, or shared state.

Real-world example

CI tests failing intermittently.

Common mistakes

  • Ignoring flaky tests.

Follow-up questions

  • How to fix flaky tests?
  • Why are flaky tests bad?

More Unit Testing interview questions

View all →