
Martin Fowler · 31 min readTesting & code quality
Tests as data: ensuring AI-generated code does what we want
The article argues that AI‑generated tests often lack confidence and are tightly coupled to implementation, leading to false positives. It proposes moving tests to data‑driven, customer‑centric formats to improve readability, resilience to refactoring, and alignment with user expectations.
- AI tests tend to be implementation‑tight and produce many false positives.
- Data‑driven tests focus on inputs/outputs, not internals, improving refactor resilience.
- Customer‑language tests make test intent clear to non‑developers.