views:

336

answers:

3

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?

+3  A: 

A couple blog posts I found helpful:

Frank Pape
+7  A: 

BDD is similar to TDD but with a different mindset. In BDD you're trying to create executable specifications instead of tests. This is mostly accomplished by using a different vocabulary but similar mechanics as TDD.

BDD seems to be a reaction to a lot of cases where people claimed to be doing TDD but were writing integration tests instead of unit tests. BDD people thought talking about tests was misleading and so tests became specifications. This seems a bit metaphysical but there are some good ideas behind it.

Mendelt
+6  A: 

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.

adrianh