Tests as data: ensuring AI-generated code does what we want

Matteo Vaccari argues that when AI agents write both production and test code, developers risk losing the assurance automated tests provide. He contends developers become customers of AI-written code, so customer tests should be the primary contract between humans and AI. Expressing that contract as test data rather than test code makes it harder for coding agents to alter, and AI makes the needed DSL parsers and custom test runners cheap to build.

AI-written summary, checked against the cited sources. How summaries work

Image: Martin Fowler

Read at Martin Fowler