AI Coding Agents Require Mandatory Automated Testing
- •AI agents make test creation so cheap that manual excuses for skipping them are no longer valid.
- •Prompting agents to 'run tests first' forces the AI to understand the codebase and its constraints.
- •Automated tests provide a high-fidelity map that helps AI models learn project-specific patterns and behaviors.
Software development is undergoing a fundamental shift as AI coding agents reduce the cost of writing and maintaining code to near zero. Historically, developers often skipped automated tests—scripts that verify if code works correctly—because they were time-consuming to update during rapid prototyping. Simon Willison (tech blogger and co-creator of Django) argues this excuse is now obsolete, as AI can refactor entire test suites in minutes.
Beyond just saving time, testing serves as a critical safety net for AI-generated logic. Since models can occasionally produce code that looks correct but fails in execution, running automated tests is the only way to ensure production readiness. Willison suggests a simple yet powerful engineering pattern: starting every session with the prompt, 'First run the tests.' This command forces the AI to locate the test harness (the software framework used to execute tests), understand the project's scale, and adopt a rigorous engineering mindset.
Furthermore, tests act as a high-fidelity map for AI models entering an unfamiliar codebase. When an agent runs a suite of tests, it gains immediate insight into how different components interact and what behaviors are expected. By integrating testing into the development cycle, developers can leverage the speed of autonomous agents without sacrificing the reliability and discipline of professional software engineering.