Skip to end of metadata
Go to start of metadata

The ever more popular test-first approach.

A widely popular programming rythm where you write failing tests before implementing/changing the functionality of functional code.


(as roughly gathered from Uncle Bob)

  1. Never write production code unless it is to make a failing test pass.
  2. Never write more tests than necessary to get one failing test.
  3. Only refactor when all tests are passing.

Some people (like Jim Coplient at JavaZone 2007) have observed that TDD has a detoriating effect on software. This notion is challenged by Robert "Uncle Bob" Martin and there is a debate between them available on InfoQ portraying this.

There are many good pointers on this wiki on how to avoid the pitfalls of TDD. See Test and JigZaw in particular.

TDD as if you meant it

A TDD style which emphasizes writing production code within the test before gradually moving it out as needed.



glossary glossary Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 24, 2008

    TDD and Test-First Development should perhaps be compared?

    1. Nov 24, 2008

      I believe it is discussed in the debate between Martin and Coplien.