Behavior-driven Development (BDD)

Behavior-Driven Development (BDD) is a software development approach that extends acceptance-test-driven development (ATDD) by focusing on the behavior of the software from the user's perspective.

In BDD, the development process typically starts with writing scenarios or examples that describe expected behaviors of the system from a users perspective, theses can be referred to as 'jobs to be done'. i.e. the end goals that the user is trying to do with your platform, not functionality of specific pages within it.

These scenarios serve as both documentation and automated tests. Developers then write the minimum code necessary to pass these scenarios, ensuring that the system behaves as expected.

BDD is usually implemented in conjunction with test-driven development (TDD) and acceptance-test-driven development (ATDD). These can be thought of as layers of an onion with the TDD happening at the code layer, ATDD at the individual page/functionality layer and BDD at the overall user behavior layer. When all layers are implemented the tests for BDD are written first, then ATDD tests, then TDD tests.

Overall, BDD enhances the quality and relevance of software by ensuring that it meets user expectations and business objectives, leading to more user-centric and maintainable products.

Resources

A BDD Practice Manager explains how BDD is a form of communication between the business and the developers, reducing the cost of translation and misunderstanding.