ToolRadarHQ

How I Used AI to Fix Our E2E Test Architecture

A working engineer inherited a Playwright end-to-end test suite that had grown into something nobody wanted to touch: 38 spec files, roughly 165 tests, inconsistent patterns, and the kind of structural debt that slows every new feature down. Instead of a full manual rewrite, she used AI as a collaborative refactoring partner, walking through the architecture, identifying repeated antipatterns, and reorganizing the suite into something maintainable. The write-up is unusually concrete, showing the actual prompts, the reasoning behind structural decisions, and the tradeoffs that came up along the way. What makes it worth reading is the honesty. This is not a demo or a toy project. It is a real codebase with real constraints, and the author documents where AI helped, where it required correction, and what judgment calls a human still had to make. Developers who have inherited legacy test suites or are trying to establish better Playwright conventions on a team will get direct, applicable takeaways. The one reservation is that the scope is specific to Playwright, so teams on Cypress or other frameworks will need to translate the lessons themselves. -> Best for: solo developers and small engineering teams trying to rescue a neglected test suite without stopping feature work.
More like this