%%
date:: [[2021-02-11]], [[2022-10-21]]
%%
# [[Behavior-Driven Development]]
Behavior-Driven Development is a type of [[Agile]] [[Work Methodologies|methodology]] that emphasizes the creation of concrete user stories to understand how real users would use an application. User stories must define specific actions that a typical application user might take. BDD stresses the importance of developing and testing with the end user in mind.
BDD is also known as *Specification by Example*. [^agilealliance] It emerged as a combination of [[Test-Driven Development]], [[Acceptance Test Driven Development]], and [[Domain-driven design]]. [^wiki]
Each user story is called a behavioral specification and is written from a user's perspective to encourage the team to build features from that point of view.
## Benefits of BDD
## Format for behavioral specification
### Title
Specific title for a certain behavior.
### Narrative
```
As a <role or type of user>,
I want to <action>
so that <reasoning>.
```
### Acceptance criteria
Given the narrative, a test case is then formed with the following format:
```
Given <setting or scenario>
When <event happens>
Then <user's expectation>
```
[^agilealliance]: Agile Alliance. _Behavior Driven Development (BDD)_. Retrieved from https://www.agilealliance.org/glossary/bdd/
[^wiki]: Wikipedia. *Behavior-driven development*. Retrieved from https://en.wikipedia.org/wiki/Behavior-driven_development