Test with confidence, code with clarity

Your home for mastering Test-Driven Development through real-world katas and expert guidance.

TDD Buddy Logo
Latest Over-Mocking Is a Governance Problem, Not a Review Smell

Kata Catalog

Practice TDD with a curated set of real-world katas, each with clear requirements and test cases.

Browse Katas

Guides & References

Learn best practices, naming conventions, and advanced TDD techniques from industry experts.

Explore Guides

Interactive Learning

Discover the TDD Gears model and learn how to apply TDD principles in real-world scenarios.

Learn More

Why TDD Matters More in the AI Era

The bar for "good tests" just moved. Agents made it non-optional.

  • The numbers landed on a governance question. 1.2M commits, 48,563 from coding agents. Agent test commits add mocks 36% of the time versus 26% for humans. Single test-double concentration. Brittleness up on the agent-generated portion.
  • Agents sample the mock precedent they find. The precedent is load-bearing. A codebase with a mocking convention produces mock-heavy tests at generation throughput. The reviewer will not outrun it PR by PR.
  • No mocks without an allowlist entry. Flip the default. Named seams keep their mocks and gain an attached contract test. Builders and real domain objects become the composition primitive everywhere else.
  • Governance is a test-design property, not a policy document. An unstructured directive the writer-agent can see and reinterpret is theatre. A lint rule the sampler cannot bypass is design. The convention layer is where the fix sits.

Read the argument: Over-Mocking Is a Governance Problem, Not a Review Smell

The Bar Moved

Old bar

Tests exist and pass. Good enough for humans with context.

New bar

Scenario names · builders · domain types · ubiquitous language. The test suite is the interface agents operate against.

TDD Gears

Shift gears based on context, not habit

TDD Gears model showing Low, Medium, High, and Reverse gears for test-driven development

Low Gear

New territory. Build context. Small steps. Learn the shape of the problem before solving it.

Medium Gear

Patterns emerge. Apply design principles. Let the tests guide you toward better abstractions.

High Gear

Known patterns. Follow existing architecture. Move fast because the structure is already proven.

Reverse Gear

Wrong direction. Back up. Delete the test. Try a different approach. This isn't failure — it's steering.