Is there a difference between TDD and Test First Development (or Test First Programming)?

There’s a difference in terms of what the driving factor is.

Do you have a vague idea of what the class (or system – this can happen at different scales, of course) should look like, then think up tests which give it the actual shape? That’s TDD.

Do you know exactly what the public API of the class should be, and just write the tests before the implementation? That’s test-first development.

My style tends to be a mixture of the two. Sometimes it’s obvious what the API should be before writing any tests – in other cases testability really drives the design.

To put it another way, TDD starts with “What questions do I want to ask?” whereas non-TDD (whether test first or not) starts with “What answer do I want to give?”

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)