Behavioral Testing
ELI5 — The Vibe Check
Behavioral testing focuses on WHAT the system does, not HOW it does it. You describe scenarios like 'when a user logs in with valid credentials, they should see the dashboard.' You test behavior, not implementation. Refactor the internals? Tests still pass.
Real Talk
A testing approach that verifies system behavior through observable outcomes rather than implementation details. Tests describe what the system should do in response to inputs, making them resilient to refactoring. BDD (Behavior-Driven Development) formalizes this with Given/When/Then syntax and natural language specifications.
When You'll Hear This
"Test the behavior: 'should add item to cart', not the implementation: 'should call insertIntoArray'." / "Behavioral tests survive refactoring because they don't depend on internal structure."
Related Terms
Acceptance Testing
Acceptance Testing verifies that the software does what the business asked for.
BDD (BDD)
BDD is like writing your tests in plain English so your non-coder boss can also understand them.
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.