Is BDD kinkier than TDD? 12
If you’re in need of a compelling reason to switch from Test-Driven Development to Behavior-Driven Development... consider this.
“BDD sounds kinkier.” -Michael K. Loukides, Book Editor for O’Reilly
...on that bombshell... I am going to suggest that this be used as the official BDD logo.

There you have it. Deep down… the biggest reason that I switched from Test::Unit to RSpec... was the sex appeal. ;-)
What was your reason?
Enjoying the content? Be sure to subscribe to my RSS feed.





BDD helped save my marriage…
TDD has lead me to testing dysfunctional syndrome.
I reviewed the BDD site and I don’t understand what the major difference is behind it. Could someone please explain what the difference is?
Douglas, lots of people feel the need to invent their own stuff, even if it’s the same thing. The BDD folks spend more time trying to justify its difference from TDD than they do actually explaining BDD itself. It’s nothing.
Stephen,
Thanks for the providing (yet another) great comment on my blog. :-p
Douglas,
One important difference between TDD and BDD is that BDD is (in my opinion) a far better communication tool between stakeholders in a project. The same specifications that I create with a client can be added to our spec files and organized into different contexts. When working with method names that are in simple… plain text… the communication between developers is much easier to understand.
It’s not uncommon for me to work out a specification with a client that looks like the following.
A new subscriber should have their first invoice set to be emailed in thirty days.
...which translates to a RSpec file like so:
Specs are so much nicer to work with and I am hearing that a lot of people new to the TDD/BDD world are having a much easier time getting into the spec-first mode than test-first.
kinkier?? And I used to argue when nongeeks say the internet is all porno, spam, and scams.
Robby, you’re welcome. Count on me to keep it real. I think your blog’s great when it doesn’t go into magical mythical stuff. Keep up the good work.
Stephen,
Define… “magical mythical stuff” for me. :-)
I would have liked to see more in the docs on a recommended practice how to do this for whole projects, as is easily done with Test::Unit. I think that creating say a “spec” directory and putting specs there and then running “spec spec” or better, making such a rake task, would be the right thing here… but the docs don’t cover it.
I’d suggest a new name… “Behavior Driven Specification Mechanism”, or…
wait for it…
BDSM.
Stoffe,
The RSpec for Rails plugin includes rake tasks for this.
For example:...and many more! :-)
@Stephen:
On a technical level, BDD and TDD aren’t that different.
HOWEVER, The focus on behaviour in BDD changes the way you think. You get to put your API designer hat back on and think to yourself, “My code should look like this; calling this method should do that; etc. etc.”
And you take those thoughts, and translate them directly into a specification. And with something like RSpec, the translation from thought to code goes very smoothly.
It’s so readable and so beautiful relative to what we’ve had to work with so far.