How to debug a failing automated test?
Reproduce locally with the same browser, environment, and data the pipeline uses. Note whether the failure is consistent or intermittent - consistent failures usually mean a real regression or bad assertion; intermittent ones often point to timing, data collisions, or environment drift. Use artifacts from the failed run: step logs, screenshots, video, and console or network errors. Compare against the last known green run to see what changed in code, config, dependencies, or the application UI. Narrow the failure to one step by re-running from the middle of the flow or isolating setup. Fix the root cause (selector, wait, data, or product bug) rather than re-running until green. If the same test flakes repeatedly, treat stability work as part of the fix, not as noise to ignore.
More testing & automation FAQs