Skip to content
Tech

Why do my AI-generated tests pass on the bugs they were meant to catch?

83

Opportunité

AI coding assistants generate unit tests by reading the implementation, so assertions reflect what the code currently does rather than what it should do. A test written against a buggy function learns the bug as a fixture, not a violation. Developers shipping with 90% AI-generated coverage see mutation scores stay flat and real regressions slip through unchanged. The core issue is the oracle problem: there is no ground truth for correct behavior unless you supply it, and AI assistants have no access to the requirements or intent behind the code. Research from July 2025 confirms that LLM-generated tests frequently pass on the exact buggy code they were written against, failing only when the bug is fixed.

Pourquoi c'est important

A test suite that passes on broken code is worse than no test suite, because it turns the primary quality signal into a false guarantee.

Comment j'évalue l'opportunité

Le Score d'Opportunité est mon évaluation personnelle, pas une mesure : l'intensité de la douleur, sa fréquence et le peu de solutions qui existent aujourd'hui. Plus il est élevé, plus je pense que le problème vaut la peine d'être résolu.

Gravité8/10

L'intensité de la douleur qu'il provoque lorsqu'il se manifeste.

Fréquence9/10

La fréquence à laquelle les gens y sont réellement confrontés.

Espace libre8/10

Le peu de bons outils qui existent pour y remédier aujourd'hui.

D'autres problèmes qui méritent d'être résolus