Search code examples
testingtddbddagile

Behaviour-Driven or Test-Driven Development?


I recently heard of BDD and found it very similar to TDD.

Which of these two do you use (if any)?

and which are the pros and cons of each?


Solution

  • I'm very much of the BDD = TDD done properly camp. If you're doing TDD as originally described by Beck - and practised by many - then there is essentially no difference.

    What BDD brings to the table is some interesting variants on the language used to describe the process. By using alternate terminology in the descriptions of the process and the tools BDD folk hope to encourage better practices - a laudable goal.

    I've been doing TDD for so long now it's hard for me to judge whether this actually helps. I think (hope :-) I've already learned many of the lessons that BDD tools/language encourage so that they don't seem to provide much extra value to me. Of course YMMV - and I've not done a whole "real world" project using BDD tools - so I might be taking my personal experiments and extrapolating too far.

    I'd guess that BDD tools/language may be more useful to folk being introduced to this way of approaching development - since they avoid the whole confusion with "test" being used in the more traditional sense. I've not done this myself yet - and would be interested if folk here have had any such experience.