Dear Deadline

English

English: the full tool.

Español: una página en español con lo más importante

An independent guide to benefit letters and bills: Social Security, Medicare, SNAP, Medicaid and housing. Not a government website.

Why AI-written tests miss bugs that need two conditions at once

Paper: Combined but Not Reached: AI-Generated Tests for Requirement Interactions

Preprint. It has not yet been peer reviewed.

The short version

Some bugs appear only when two requirements hold at the same time. I gave an AI coding agent the requirements and the code before the fix for eight real bugs from five open-source projects, and asked it to write tests, with and without an instruction to exercise the requirements together. Many tests (40 of 102) combined the two requirements, but only 7 reached the faulty code. That gap appeared for every bug that went undetected, and the extra instruction did not improve detection in these runs.

What I found

Why it matters

A test that sets up the right situation can still pass over the code that fails. When reviewing tests written by AI, check that each test actually runs the code it is meant to check, not only that it names the right conditions.

How the study was done

For each of 8 historical bugs, the agent got neutral requirements and the code before the fix, and wrote tests three times with a plain prompt and three times with an added instruction. Each test was run against the code before and after the fix; the agent could not run its own tests. The data, scores and scripts that reproduce the tables are on Zenodo.

Read the paper (PDF) Data and code on Zenodo

How to cite

Thapa, S. J. (2026). Combined but Not Reached: AI-Generated Tests for Requirement Interactions [Preprint]. Zenodo. https://doi.org/10.5281/zenodo.24482952

All research · Go to the tool