All glossary terms
Verify

AI test generation

AI test generation is the use of LLMs to author tests — unit tests from source code, acceptance tests from user stories, end-to-end tests from product descriptions. The pattern works well for the mechanical layer (boilerplate test scaffolds, parameterised input variations, mock setup) and struggles with the parts that require judgement about what is worth testing.

Empirical results through 2025 (Meta's TestGen-LLM paper, Stride's research on AI-generated test cases) find AI-generated tests increase coverage significantly while producing a meaningful fraction of low-value tests — tautological assertions, tests that just exercise the happy path, tests that pass against the implementation rather than the requirement. The healthy adoption pattern: AI generates the candidate tests; humans curate, deleting redundant ones and editing assertions to test behaviour rather than implementation. The biggest leverage is in raising coverage floors on legacy code that has historically been undertested — AI can scaffold tests in hours rather than the weeks of human effort that has kept teams from doing it.

Related terms