views:

110

answers:

2

What is test-first development and how does it corelate to TDD? Is test-first development a general name for things like TDD? If yes, what other test-first practices do exist?

+5  A: 

Test-First Development == Test-Driven Development.

Two different words for the same thing.

Other alternatives to TDD include the increasingly popular BDD (Behaviour Driven Development).

Which method you choose greatly depends both on your application (web, console, windows, etc) as well as your project methodology (Agile, Waterfall, etc).

RPM1984
If TDD and TFD are the same, is it incorrect to call BDD as test-first development approach?
Idsa
RPM1984
Okay, that's what I expected. Thank you!
Idsa
I generally agree, but it is not true that it depends on the project methodology. TDD is just a programming style, BDD a testing style, which is both completely independent from a software development process.
Stefan Steinegger
@Stefan - agreed, although i have yet to see a Waterfall-style project that uses TDD. Most of these projects use actual test case documents (created in parallel to the actual coding by test analysts). But that's just from my experience (which is < 5 years in this industry), so i could be wrong.
RPM1984
+2  A: 

Test First Development is slightly broader, slightly less specific, than TDD. You can write an acceptance test before coding, then code to make it pass; that's TFD but not TDD. TDD is more specifically about unit tests - so there is a tighter implied granularity - and includes the red-green-refactor cycle: write your failing (unit) test; demonstrate that it fails; make it pass; demonstrate that it passes; look for opportunities to refactor. TFD doesn't preclude any of those things, but it also doesn't require them.

Carl Manaster