BDD (Behaviour-Driven Development)
// Definition
Collaborative specification writing using human-readable scenarios (Given/When/Then) shared across product, dev, and QA. Often automated with Cucumber, SpecFlow, or similar tools.
// Code Example
Feature: User login
Users sign in to access their account
Scenario: Successful login with valid credentials
Given I am on the login page
When I enter "user@example.com" and "secret123"
And I click "Sign in"
Then I should land on the dashboard// Related terms
TDD (Test-Driven Development)
Write a failing test first, write the minimum code to make it pass, refactor. Drives design through tests rather than testing afterward — and produces a thorough unit test suite as a byproduct.
ATDD (Acceptance Test-Driven Development)
Extends TDD by writing acceptance tests collaboratively with the customer or product team before implementation begins. Aligns the team on what 'done' looks like in concrete, testable terms.
Test Pyramid
A model for balancing test types: a wide base of fast unit tests, a smaller layer of integration tests, and a thin layer of slow end-to-end tests. Counters the inverted 'ice-cream cone' anti-pattern of UI-heavy suites.
Learn more · Cucumber BDD Framework
Chapter 1 · Lesson 1: What Is BDD and How It Differs from TDD