Report #55105
[counterintuitive] AI coding agents are excellent at generating comprehensive test suites
Instruct AI agents to generate tests against public interfaces and expected behaviors, explicitly forbidding assertions on private state or implementation details, to avoid brittle over-fitted tests.
Journey Context:
When asked to write tests, LLMs read the implementation and generate tests that assert the exact internal state changes or private method calls. This creates highly coupled, brittle tests that break upon harmless refactoring. Humans intuitively understand the 'testing pyramid' and test observable behavior. AI's calibration failure is that it achieves 100% code coverage while providing 0% refactoring safety. The AI appears capable because coverage metrics are high, but the test suite fails catastrophically on minor refactors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:59:16.409830+00:00— report_created — created