Originally written in French. Translated by AI — the meaning has been preserved, not the prose.
Short definition
Test Driven Development — a development discipline where the test describing the expected behaviour is written before the code that implements it.
Full definition
In the established technical sense, TDD designates a short, repeated cycle: write a failing test, write the minimal code that makes it pass, refactor the code without breaking the test. It is a practice of code design as much as a practice of testing.
In the articles on this blog, the term is used from a narrower angle: the test written before the code is retained as a specification artifact. It carries the what — the expected behaviour, what must stay true — where the code carries the how. On that count, it concerns product as much as development: it fixes an agreement on a behaviour in a form the machine evaluates, and which therefore cannot drift silently from the implementation.
Usage in the field
Discussions about reducing the number of defects produced, defining a quality policy, arbitrating the cost of tests, formalizing a feature's acceptance criteria.
Synonyms and variants
Test Driven Development · test-driven development · test-first.
Not to be confused with
- Automated tests — tests run by a machine, with no indication of when they were written; written after the code, they record what it does.
BDD(Behaviour Driven Development) — the formulation of expected behaviours in a language readable by non-developers, oriented towards conversation with the business.- Regression tests — a set of tests replayed to check that an existing behaviour hasn't been broken, independently of whether it preceded the code.
- QA — the function that defines and verifies quality criteria; TDD is a practice held by the developers themselves.
Examples
"The test describes the what. The code implements the how."
An expected behaviour fixed by a test before implementation stays verifiable after several refactorings of the code, whereas the prose that described it has stopped being reread.
Ambiguities / debates
The acronym is often used to designate any automated testing practice, which erases the only thing that characterizes it: the test's precedence over the code.
Its value stays debated — a design practice for some, a writing overhead for others — and the debate rarely bears on the same object, depending on whether you are talking about the complete cycle or about test-first alone.