Tests as data: ensuring AI-generated code does what we want
Martin Fowler · 2026年11月11日
Automated testing in the age of AI coding assistants is problematic:
when AI agents write both production and test code, developers risk losing
the assurance that automated tests protect against functional errors.
Matteo Vaccari makes three claims: (1) when AI writes the
code, developers become its customers; (2) therefore customer tests, not
developer tests, become the primary contract between humans and AI; (3)
moving that contract into test data rather than test code makes it easier
to protect it from unexpected modifications by coding agents. All of this
optimizes for human-readable tests that establish a contract between humans
and AI. While in the past DSL parsers and custom test runners were
expensive to write and maintain, now AI makes them cheap.
Marcus Borg recounts an experiment to investigate if healthy code was cheaper for agents to review. Between a typical unhealthy pull request (CodeHealth 2.8) and a typical healthy one (9.7), that adds up to 22 to 35%. The measures of health
Data contracts are a way to describe the contents and guarantees of datasets. Simon Harrer and Arif Wider describe in detail what they are and how to use them. They apply practices from API design to data by treating them as data-providing
Distributed systems are hard to test because partial failures overlap with live traffic and the same fault can produce different execution traces on different runs. Unmesh Joshi describes how deterministic simulation testing addresses this
When we use LLMs in a specialized domain, such as the operations of any reasonably-large organization, there is a lot of specialized vocabulary. Such words and specialized meanings will be foreign to an LLM because they aren't in its traini
It’s that time of the year when the November Thoughtworks Technology Radar appears. Again my colleagues have taken a sweep of the technologies that our teams have used in the field, and pulled together a summary of what’s popped up in the l