Behavior Driven Development


Description

Behavior-Driven Development is about implementing an application by describing its behavior from the perspectives of its stakeholders.

Definition

BDD is a 2nd generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, Agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.
- Dan North, 2009

Wikipedia

Practices:

  • Establishing the goals of different stakeholders required for a vision to be implemented
  • Develop features which will achieve those goals
  • Outside-In software development involving stakeholders in the implementation process
  • Using examples to describe the behavior of the application and code
  • Automating those examples to provide quick feedback and regression testing
  • Using 'should' when describing the behavior of software to help clarify responsibility and allow the software's functionality to be questioned
  • Using 'ensure' when describing responsibilities of software to differentiate outcomes in the scope of the code in question from side-effects of other elements of code
  • Using mocks to stand-in for collaborating modules of code which have not yet been written

Feature injection

A company may have several visions which will deliver value to the business. The primary stakeholders who identified the vision bring in the incidental stakeholders. Each stakeholder defines the goals they need to achieve in order for the vision to be successful. From these goals, broad themes or feature sets are defined which will achieve them.

Outside-in

BDD is driven by business value. The first piece of production code that BDD developers implement is the UI.
High level scenarios drive the low level TDD code examples.

BDD Wiki

This doesn't seem to be maintained anymore. You can still access the introduction through the web archive.
Behavior-Driven Development (BDD) is an evolution in the thinking behind Test-Driven Development and Acceptance Test-Driven Planning.

Core Principles:

  • It's all Behavior
    • Business and Technology should refer to the same system in the same way (and describe its behavior at different levels)
  • Business Value
    • Any system should have an identified, verifiable value to the business (deliver stakeholder value)
  • Enough is Enough
    • Up-front analysis, design and planning all have a diminishing return, so let pull (demand) dictate the flow
BDD is very much focused on “Getting the words right” and this focus is intended to produce a vocabulary that is accurate, accessible, descriptive and consistent.

Google Groups



More Details

Overview
Testing
Automated Acceptance Tests ensure high code quality
Software Craftsmanship
Tools for .NET
Tools for JavaScript
MoreTools