Skip to main content
Community
Q&A

What is your systematic approach when a test passes locally but fails in CI?

Ajitesh Mohanta
Ajitesh MohantaAmbassador
4w ago 2,143 0
This is the most frustrating debugging scenario I encounter regularly. Test passes 100% locally, fails 30–80% in CI. My current process: 1. Check timing — add `--timeout` logging to see if CI is just slow 2. Check environment — compare env vars, browser version, OS 3. Check test isolation — does the test depend on previous test state? 4. Add verbose logging and re-run CI 5. Give up and add a retry (bad) Is there a better systematic approach? Especially for Playwright tests where the failure is often a subtle timing difference between local Chrome and CI Chromium.

No replies yet. Be the first to answer this question!

Join the discussion

Sign in to join the discussion

Sign in
What is your systematic approach when a test passes locally but fails in CI? — Community | QABash