The Agile software development track during the Ørdev conference in Malmö last week included several sessions on Behavior Driven Development (BDD). This development methodology is one of the latest of the "driven development" paradigms and is positioned by its proponents as the evolution of Test Driven Development (TDD).

Like TDD, BDD permits developers to focus on what the code should do, rather than on the technical details of the implementation. And like TDD, BDD retains the process of first writing code that encapsulates "stories" used to validate the system under development before writing the code for the system itself. Code for the system is then written such that the executable validation stories pass. The development rhythm consists of alternating between adding validation stories and writing the code to support those stories.

BDD asserts that the activity of writing the validation first has very little to do with testing and thus it is unfortunate that TDD semantically places such emphasis on "test" (North 2006). The focus in BDD is on describing how the system should behave in a language (either native language or a ubiquitous domain-specific language) that is easily shared with, and understood by, the stakeholders, rather than being semantically bound by the language of "testing."

One of the more interesting presentations, which ironically was part of the Test track, was by Aslak Hellesøy, the creator of Cucumber (, a tool for combining plain text descriptions of how a system should behave with step definitions written in Ruby (or a number of other languages, including .NET languages). The presentation was a combination of an introduction to BDD, some coding using Cucumber and Ruby, and a live cooking show. How many software development presentations have you been to that included a cucumber, ginger, a little basil, and a blender?  I left hungry for test code that is an easily readable description of the intent of the test rather than a reflection of the implementation details of the application or semantics of the test frameworks that were used.

Recomended Reading

Astels, D.  2009.  Introduction to BDD with Cucumber.  Engine Yard (23 June 2009).

North, D. 2006.  Introducinng BDD.