Hasty Briefsbeta

Bilingual

Turns out I was wrong about TDD

a day ago
  • Author previously relied on heavy end-to-end testing with Docker and TestContainers, which was slow and costly.
  • Author was skeptical of TDD, believing it led to code optimized for testability rather than product outcomes.
  • Coding agents (LLMs) changed the economics: waiting for slow e2e tests became a bottleneck, and agents struggled with failure output.
  • New approach: agents propose a testing plan before implementation; emphasis on unit and integration tests with faster local runs, while e2e tests run in CI.
  • When bugs are found, agents explain why the test missed it and add targeted edge case tests.
  • Benefits: tests codify behavior, PR review is easier by checking test files first, and agent laziness is caught quickly.
  • Conclusion: TDD was correct all along, but required cheap, abundant labor from AI agents to become practical.