Both ideas sound very similar to me, but there might be subtle differences or the exact same thing, explained in different ways. What is the relationship between TDD and Test First Development/Programming?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?’