Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Behavior-Driven Development (BDD) Cheat Sheet

Behavior-Driven Development (BDD) Cheat Sheet

Back to Software Engineering
Updated 2026-05-28
Next Topic: Clean Code Practices Cheat Sheet

Behavior-Driven Development (BDD) is an agile software development methodology that extends Test-Driven Development (TDD) by writing test cases in natural language that non-programmers can read. BDD emerged in 2003 when Dan North sought to bridge the gap between business stakeholders and technical teams, creating a shared understanding of requirements through concrete examples. The methodology uses Gherkin syntax—a domain-specific language with keywords like Given-When-Then—to describe system behavior in plain English, transforming these human-readable scenarios into executable specifications that serve as both tests and living documentation. A key insight: BDD is fundamentally a collaboration practice focused on discovering unknowns through conversation (the "Three Amigos" approach), not merely a testing technique, making early discovery workshops more valuable than the automation that follows.

What This Cheat Sheet Covers

This topic spans 16 focused tables and 158 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core BDD ConceptsTable 2: Gherkin KeywordsTable 3: Gherkin Structure ElementsTable 4: Step Definitions & ImplementationTable 5: Data Tables & Scenario OutlinesTable 6: BDD Workflow & CollaborationTable 7: BDD Tools & FrameworksTable 8: Tags & FilteringTable 9: Hooks & Setup/TeardownTable 10: Cucumber Expressions & ParametersTable 11: Reporting & Living DocumentationTable 12: BDD Best PracticesTable 13: BDD Anti-PatternsTable 14: BDD vs TDD vs ATDDTable 15: Advanced BDD FeaturesTable 16: Collaboration Patterns

Table 1: Core BDD Concepts

BDD is as much a communication framework as a testing approach — the shared vocabulary, discovery conversations, and collaboration structure are what make it effective. Understanding these core concepts helps teams avoid the common mistake of treating BDD as just "tests written in English."

ConceptExampleDescription
Behavior-Driven Development
Feature: User Login
Scenario: Valid credentials
Given user on login page
Agile methodology emphasizing collaboration between developers, testers, and business stakeholders using natural language to define system behavior before coding.
Given-When-Then
Given account has $100
When user withdraws $50
Then balance is $50
Structured pattern for representing tests where Given sets context, When describes action, Then specifies expected outcome.
Specification by Example
Example: Withdraw $50 when balance is $100
Result: Balance becomes $50
• Practice of illustrating requirements with concrete examples rather than abstract descriptions
• examples become executable tests.
Three Amigos
Product Owner + Developer + Tester
discuss "What if user has $0 balance?"
Collaboration session involving business, development, and testing perspectives to discover edge cases and clarify requirements through examples.
Example Mapping
Rule written on yellow card
Examples on blue cards
Questions on red cards
Workshop technique using colored index cards to organize rules, examples, and questions for a user story.
Ubiquitous Language
Business: "shopping cart"
Code: ShoppingCart class
Tests: "shopping cart"
Shared vocabulary used consistently across business conversations, code, and tests to eliminate translation errors.
Living Documentation
Feature files auto-generate
HTML reports showing
current system behavior
Test scenarios that serve as always up-to-date documentation because they're executed regularly and fail when behavior changes.

More in Software Engineering

  • API Design Principles and Best Practices Cheat Sheet
  • Clean Code Practices Cheat Sheet
  • _Dependency_Injection_Patterns
  • Distributed Systems Core Concepts Cheat Sheet
  • Modular Monolith Architecture Cheat Sheet
  • Software Engineering Cheat Sheet
View all 47 topics in Software Engineering