Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 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-03-18
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 143 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: Best PracticesTable 13: Common Anti-PatternsTable 14: BDD vs TDDTable 15: Advanced Features & TechniquesTable 16: Collaboration & Communication Patterns

Table 1: Core BDD Concepts

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.
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.
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.
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.
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.

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