
I Built a RAG Bot to Fix Flaky Cypress Tests
I was spending hours every week manually fixing the same flaky Cypress tests. The failures had patterns. So I built a bot to recognize them. The problem In a large frontend monorepo, flaky tests are a constant drain. They block merges, slow down every pipeline run, and become a blocker for the whole team. And if you just skip them instead of fixing them — which is the easy short-term answer — you're slowly opening the door to production failures nobody saw coming. What I noticed after months of fixing them: most failures aren't random. They're patterns. The same handful of root causes — hardcoded cy.wait() calls, race conditions on async state, tests that assumed backend services would respond the same way they do in production (they don't, not reliably), improper use of selectors — kept showing up in different tests, in different files, written by different engineers at different times. The knowledge to fix them existed. It just wasn't encoded anywhere you could access while staring a
Continue reading on Dev.to
Opens in a new tab



