Combined but Not Reached: AI-Generated Tests for Requirement Interactions
Some defects appear only when two requirements hold at once. We asked a coding agent to write tests for eight such historical defects from five open-source projects, from neutral requirements and the code before the repair. Each defect was attempted three times with a plain prompt and three times with an added instruction to exercise the requirements together. For every generated test we recorded three things: whether it combined the two requirements, whether it reached the code path that triggers the defect, and whether it detected the defect. Of 102 valid tests, 40 combined the requirements, 7 reached the triggering path and 6 detected the defect. Reach was the bottleneck. Of the 29 scored suites that missed their defect, 21 combined the requirements without reaching the path, and this happened in every defect that went undetected. In one Celery test an in-memory backend bypassed the faulty message-broker path, so a correct assertion passed on both revisions. The added instruction raised the number of tests that combined the requirements from 16 to 24 and left detection unchanged at 3 of 15 runs per prompt. A test generator should check that its fixture can reach the implementation path behind the behavior it asserts. The record holds the paper and an archive with the run and test score files and the scripts that reproduce every table and check every number of the paper.
Authors
- Shirshak Jung Thapa
Institutions
- Florida Atlantic University (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-23
- DOI
- https://doi.org/10.5281/zenodo.24482951
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- preprint