Back to articles
Before You Let an Agent Touch Your Code, Write the Tests
NewsTools

Before You Let an Agent Touch Your Code, Write the Tests

via Dev.toIan Johnson

The Codebase Nobody Wanted to Touch I inherited a Laravel 9 application — a line-of-business app with complex workflows, role-based access, and third-party integrations. It worked. Users depended on it. And it had exactly zero automated tests. Note: The code examples throughout this series have been made generic to protect the original domain, but they reflect real patterns from a production codebase. Think of them as practical, working examples you can adapt to your own project. No tests. No linting. No CI pipeline. Just a repo, a prayer, and git push origin main . I knew I wanted to use AI coding agents (specifically Claude Code) to accelerate development. But here's the thing about AI agents writing code on a codebase with no tests: you get slop. Fast slop. Confidently wrong slop. An agent without tests is a junior engineer without code review. It'll produce something that looks right, compiles fine, and breaks in production at 2am. So before I let an agent touch a single line, I wr

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles