-
Website
http://www.chrisdpratt.com -
Original page
http://www.chrisdpratt.com/2007/09/03/an-introduction-to-behavior-driven-development/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Shane Sponagle
1 comment · 3 points
-
Chris Pratt
22 comments · 1 points
-
ibrahimahmed
1 comment · 1 points
-
robbykeller
1 comment · 1 points
-
FOXEO
1 comment · 1 points
-
-
Popular Threads
Great post!
I would like to see something in real code, ideally compared side by side with a TDD approach - in order to be convinced that this is just not yet another "snake oil" concept.
Dave Astels, the front-runner advocate of BDD, explains the difference between TDD and BDD thus: "BDD is what you're doing if you're doing TDD really well."
I think I made too much out of the differences between the two methodologies, but they are really quite similar. The chief and primary difference between BDD and TDD is that of semantics.
The goal in both methodologies is to test behavior rather than state. By that, I mean that we want our tests to be implementation independent. All my test should care about is that the functionality is there, not how that functionality works.
And that is where the chief problem with TDD comes. Because of its test-based nomenclature, it's more tempting for people to test the bits and pieces of the application rather than the central functionality. BDD is a reformulation of TDD, using more behavior-specific nomenclature, based on the Sapir-Whorf theory that language influences behavior.
In other words, all BDD does is remove the word 'test' from the playing field, so that it's easier to focus on the true purpose of TDD: specifying behavior.