# Investigate flaky browser tests
URL: https://wwadd.dev/moves/testing-shipping/diagnose-flaky-tests

Replace fixed sleeps with assertions that wait for the expected state. Give tests independent accounts or records, control third-party responses, and keep traces from failures. Check whether the application, test data, or selector is unstable before adding retries. A test that passes on retry still needs investigation.

Verified: 2026-09-30

Source: [Official guidance](https://playwright.dev/docs/best-practices)

