This is a question asked many times: What is the difference between Test-Driven Development (TDD) and Behavior-Driven Development (BDD).

In my mind, I’ve accepted the following explanation:

Doing TDD, I write the code I want to have;
Doing BDD: I describe the behavior I need to have

I use both approches together: I start writing my tests in terms of GWT (Given-When-Then), describing
the behavior I need to have, and as I implement those individual steps I write the code I want to have.

This is the simplified explanation that works in my own mind, and it has taken many years for it to take that shape. It may not work to others, but I’m sticking with it for the time being, at least until I find a better way to explain it.

I sense there’ll be more posts coming up expending on this subject. 🙂

One response to “What is the Difference Between TDD and BDD?”

  1. […] the different between Test-Driven Development (TDD) and Behavior-Driven Development (BDD)? I’ve written about that before, but I think that post lacks something more illustrative.For one thing, I forgot to mention: […]

Leave a Reply

Trending

Discover more from Claudio Lassala's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading