Behavior-driven development (BDD) focuses on testing software behavior and functionality through scenarios rather than just testing units of code. BDD uses a domain-specific language like Gherkin to describe scenarios in terms of given, when, and then statements to define preconditions, events, and expected outcomes. These scenarios act as acceptance criteria that are extracted from user stories and can be executed by a tool to automatically test that the program behaves as intended.
20. BEHAVIOR
constituted by scenarios (descriptions of them)
acceptance criteria
extract
User story
As a ...
I want …
So that ...
21. BEHAVIOR
constituted by scenarios (descriptions of them)
describe in DSL → executable
acceptance criteria
extract
User story
As a ...
I want …
So that ...
22. BEHAVIOR
constituted by scenarios (descriptions of them)
describe in DSL → executable
acceptance criteria
extract Gherkin:
Given a precondition
User story When an event occurred
Then an outcome is achieved
As a ...
I want …
So that ...
23. BEHAVIOR
constituted by scenarios (descriptions of them)
describe in DSL → executable
acceptance criteria
extract Gherkin:
Given a precondition
User story When an event occurred
Then an outcome is achieved
As a ...
I want …
So that ... execute
tool