BDD
BDD
ELI5 — The Vibe Check
BDD is like writing your tests in plain English so your non-coder boss can also understand them. Instead of code, you write 'Given the user is logged in, When they click logout, Then they should see the login page'. Everyone gets it!
Real Talk
Behavior-Driven Development extends TDD by writing test specifications in a human-readable format using Given/When/Then syntax. Tests describe system behavior from the user's perspective and serve as both documentation and executable specifications.
Show Me The Code
Feature: User Logout
Scenario: Logged in user logs out
Given the user is logged in
When they click the logout button
Then they should be redirected to /login
And they should see 'You have been logged out'
When You'll Hear This
"We write BDD specs with the product team so everyone agrees on behavior." / "BDD bridges the gap between devs and non-technical stakeholders."
Related Terms
Behavior-Driven Development (BDD)
Behavior-Driven Development is about describing HOW your app should behave before you build it — using language that makes sense to everybody, not just cod...
Given When Then
Given When Then is AAA's cousin from the BDD world. Given = the setup situation. When = what the user/system does. Then = what should happen as a result.
TDD (TDD)
TDD means you write the test BEFORE you write the code.
Test Case
A test case is one specific scenario you want to check. 'Does the login work with a correct password?' — that's a test case.