Zum Inhalt springen

root / tags / test-driven-development

#Test-Driven Development

5 Fiches

Qualität & Sicherheit Automatisch geprüfte Übersetzung

TDD is dead. Long live testing. (Une contre-argumentation point à point à l'article phare de David Heinemeier Hansson, détracteur du Test-driven development)

**Mathieu Eveillard** publishes on his personal blog on **December 7, 2022** (last updated March 17, 2025) a **point-by-point counter-argument** to the famous essay by **David Heinemeier Hansson (DHH)** *"TDD is dead. Long live testing."* (RailsConf 2014). Article categorized **craft / best-of**, a **software craftsman** stance that defends **Test-Driven Development** without dogmatism. **Pivotal distinction** that DHH misses according to Eveillard: ***"Test-first"*** (writing all the tests before any code) vs ***"Test-Driven Development"*** (tests **guide** me in writing code, so each time I write a bit of code *"in reaction"* to a new test). DHH actually criticizes *Test-first* while calling it TDD — a confusion that **hides an entirely different way of programming**. **Point-by-point responses**: (1) *"TDD as hammer to beat down the nonbelievers"* — Eveillard concedes the deontological point but redefines *"good code"*: not just the absence of bugs but **fine-grained unit tests** documenting behavior at the lowest level, co-located with the code, a **safety net**; (2) *"Rebalance from unit to system"* — TDD **says nothing** about system tests and **does not say** there is nothing outside TDD; system tests do **not replace** unit tests (an income tax return tested end-to-end makes no sense); **test pyramid** — each type contributes its share, unit tests for **millisecond** feedback + early bug detection; (3) *"Horrendous monstrosities of architecture (service objects, command patterns)"* — Eveillard responds that he **does not see these effects in functional programming**, so the effect is likely due to **OOP**, not TDD; but concedes that excessive dependency injection can couple test and implementation. **Balanced conclusion**: *"TDD is not a religion, it's a tool"*. TDD is particularly well suited to **domain code** (the functional core of a *bounded context*, the *core of the hexagon*) — calculation engines, fine-grained business rules, edge cases galore — ***"30% of the codebase at most"***. Mentions the **Law of the Instrument** (if the tool doesn't help, it's because you've fallen into it). **Relevance to the corpus**: a **craft article outside the AI corpus** but worth archiving to position current debates on coding agents (Beck's *Augmented Coding Beyond Vibes*, 2025-06-25, Vibe Coding vs TDD, Frizzo's *writing muscle atrophy*) within the historical lineage of craft debates around TDD. To be used as a **library foundation** for training sessions.

#Mathieu Eveillard#TDD#Test-driven development

**Mathieu Eveillard** — développeur / coach craft / formateur (blog personnel mathieueveillard.com, services *Accompagnement* et *Office hours*). Identité publique : *artisan logiciel* avec une pratique pédagogique autour du TDD · du DDD et du craft. Newsletter hebdomadaire (*"Chaque mercredi, une idée pour démarrer la journée"*).