Summary

BDD, in its essence, is a flavor of TDD. It follows the same basic principle of writing tests (scenarios) before the implementation code. It drives the development and helps us better understand what should be done.

One of the major differences is the life cycle duration. While with TDD, which is based on unit tests, we're moving from red to green very fast (in minutes if not seconds); BDD often takes a higher-level approach that might require hours or days until we get from the red to the green state. Another important difference is the audience. While unit tests-based TDD is done by developers for developers, BDD intends to involve everyone through its ubiquitous language.

While a whole book can be written on this subject, our intention ...

Get Test-Driven Java Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.