, ,

Test and Behaviour Driven Development

Someone from my client’s team asked me the difference between TDD and BDD yesterday so I thought it would be a good idea to research and summarise it in simple words. According to Agile Alliances

Test Driven Development is a style of programming in which three activities are tightly interwoven: coding, testing (in the form of writing unit tests) and design (in the form of refactoring).

It can be succinctly described by the following set of rules:
1. write a “single” unit test describing an aspect of the program
2. run the test, which should fail because the program lacks that feature
3. write “just enough” code, the simplest possible, to make the test pass
4. “refactor” the code until it conforms to the simplicity criteria
5. repeat, “accumulating” unit tests over time


Behaviour Driven Development is a synthesis and refinement of practices stemming from TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development).

BDD augments TDD and ATDD with the following tactics:
1. apply the “Five Why’s” principle to each proposed User Story, so that its purpose is clearly related to business outcomes
2. thinking “from the outside in”, in other words implement only those behaviors which contribute most directly to these business outcomes, so as to minimize waste
3. describe behaviors in a single notation which is directly accessible to domain experts, testers and developers, so as to improve communication
4. apply these techniques all the way down to the lowest levels of abstraction of the software, paying particular attention to the distribution of behavior, so that evolution remains cheap

Thanks to my friend Liz for translating test driven development to behaviour driven development.

[ws_table id=”9″]

I think this is one of the most powerful tools Business Analysts can put in their tool belt. Why don’t look at our user story writing workshop using BDD.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 1 =