Definition

behavior-driven development (BDD)

Contributor(s): Laura Fitzgibbons

Behavior-driven development (BDD) is an Agile software development methodology in which an application is documented and designed around the behavior a user expects to experience when interacting with it. By encouraging developers to focus only on the requested behaviors of an app or program, BDD helps to avoid bloat, excessive code, unnecessary features or lack of focus. This methodology combines, augments and refines the practices used in test-driven development (TDD) and acceptance testing.

A typical project using behavior-driven development would begin with a conversation between the developers, managers, and client to form an overall picture of how a product is intended to work. The expectations for the product's behavior are then set as goals for the developers, and once all of the behavior tests are passed the product has met its requirements and it ready for delivery to the customer. 

BDD offers the ability to enlarge the pool of input and feedback to include business stakeholders and end users who may have little software development knowledge. Due to this expanded feedback loop, BDD may more readily be used in continuous integration and continuous delivery environments.

How behavior-driven development works

Behavior-driven development revolves around conducting behavior-specific tests, or functional specifications that outline executable scenarios for the application. This includes:

  • Applying the 5 Whys principle or the if-then scenario to generate user stories and clearly relate application features to a business purpose.
  • Identifying a single outcome for every behavior.
  • Translating each scenario into domain specific language (DSL) to ensure accurate communication.
  • Gathering all behaviors into one set of documentation so it is accessible for all developers, testers and stakeholders.

Behavior-specific tests can be run when a project starts, while a product is in development and when a product is completed. At a minimum, BDD requires that the behavioral tests (similar to unit tests) are created before development starts. Before development begins, all of the behavioral tests will fail, but as development of the product progresses, the tests will begin to pass. Once all of the behavioral tests are considered passing, the product is ready.

This was last updated in March 2019

Continue Reading About behavior-driven development (BDD)

Dig Deeper on Test-Driven and Model-Driven Development

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

What does your organization see as the pros and cons for using behavior-driven development?
Cancel

-ADS BY GOOGLE

File Extensions and File Formats

Powered by:

SearchMicroservices

TheServerSide.com

SearchCloudApplications

SearchAWS

SearchBusinessAnalytics

SearchHRSoftware

SearchHealthIT

DevOpsAgenda

Close