12
behaviour-driven development
also Given-When-Then
Specify with scenarios: given, when, then. A human can read them. A test can run them.
What is behaviour-driven development?
BDD writes requirements as examples. Given is setup, When is the action, Then is an observable result. Behaviour, not implementation.
Why does behaviour-driven development matter when vibe coding?
“Make checkout nice” cannot land. Three Given-When-Then rows can. Outsiders can write scenarios. That is the format to use when you cannot name the class.
How do you do behaviour-driven development?
Three scenarios per feature, including one failure. The model turns them into tests. You confirm red, then implement.
How do you ask a model for behaviour-driven development?
Write three Given-When-Then scenarios for (feature), one of them a failure path. Turn them into tests. No implementation yet.
What goes wrong with behaviour-driven development?
A Then that says “the user feels delighted.” That is not an observation. Then has to be readable on a screen or in a response.