Skip to content
Tech

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

83

기회

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.

μ™œ μ€‘μš”ν•œκ°€

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.

기회 평가 방식

기회 μ μˆ˜λŠ” 츑정값이 μ•„λ‹Œ 제 주관적 ν‰κ°€μž…λ‹ˆλ‹€. μ–Όλ§ˆλ‚˜ λΆˆνŽΈν•œμ§€, μ–Όλ§ˆλ‚˜ 자주 λ°œμƒν•˜λŠ”μ§€, ν˜„μž¬ 해결책이 μ–Όλ§ˆλ‚˜ λΆ€μ‘±ν•œμ§€λ₯Ό λ°˜μ˜ν•©λ‹ˆλ‹€. μ μˆ˜κ°€ λ†’μ„μˆ˜λ‘ λ§Œλ“€ κ°€μΉ˜κ°€ 더 λ†’λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€.

심각도8/10

λ°œμƒν–ˆμ„ λ•Œ μ–Όλ§ˆλ‚˜ 큰 λΆˆνŽΈμ„ μ΄ˆλž˜ν•˜λŠ”μ§€.

λΉˆλ„9/10

μ‹€μ œλ‘œ μ–Όλ§ˆλ‚˜ 자주 μ ‘ν•˜κ²Œ λ˜λŠ”μ§€.

곡백 μ˜μ—­8/10

ν˜„μž¬ 이λ₯Ό ν•΄κ²°ν•  λ§Œν•œ 도ꡬ가 μ–Όλ§ˆλ‚˜ λΆ€μ‘±ν•œμ§€.

ν•΄κ²°ν•  κ°€μΉ˜ μžˆλŠ” 더 λ§Žμ€ λ¬Έμ œλ“€