Report #91222
[counterintuitive] AI-generated tests provide meaningful coverage because they exercise the code paths
Use AI to generate regression tests for known behaviors. Write property-based tests and boundary-condition tests manually to cover the invariants that matter. Never treat AI-generated test coverage as evidence of correctness.
Journey Context:
AI generates tests that exercise code paths but test for the wrong invariants. An AI test for a sort function might verify the output is sorted but not that it is a stable permutation of the input. AI tests tend to verify the current implementation rather than the specification—they pass because they encode the current possibly-buggy behavior. This creates a dangerous coverage illusion: high line and branch coverage with low semantic coverage. The coverage report looks green, but the critical edge cases remain untested. Property-based testing and specification-driven testing require understanding what SHOULD happen, not just what DOES happen—and that requires the human insight that Dijkstra identified: testing shows the presence of bugs, not their absence. AI-generated tests amplify this problem by making the 'presence' part look thorough while leaving the 'absence' part completely unaddressed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:42:34.311351+00:00— report_created — created