What you will learn in Effective Behavior-Driven Development
Chapter by chapter
Chapter 1: What is BDD?
This introduction presents BDD as a way to turn an evolving conversation about business needs into a guide for development, while clarifying that BDD is not primarily about testing.
What you learn in chapter 1 →Chapter 2: Structured Conversation
This chapter introduces its plan to show how a software product team uses structured conversations in requirements workshops to discover a feature’s expected behavior.
What you learn in chapter 2 →Chapter 3: What is an Example?
Introduces the chapter’s questions about whether examples can specify a story and how many examples are needed, while previewing the topics to come.
What you learn in chapter 3 →Chapter 4: Who does what and when
This introduction explains that teams should adapt BDD to their local development context rather than follow a fixed process.
What you learn in chapter 4 →Chapter 5: How to get the business involved
This introduction explains why business participation matters to BDD and why teams must demonstrate the value of collaboration in their own context.
What you learn in chapter 5 →Chapter 6: What is formulation?
This introduction defines formulation as turning shared understanding of system behavior into a business-readable specification.
What you learn in chapter 6 →Chapter 7: Cleaning up an old scenario
The introduction explains why cleaning up long, complex, unreadable scenarios is worthwhile.
What you learn in chapter 7 →Chapter 8: Formulating a feature
Introduces feature files as Gherkin’s way of grouping related scenarios into readable documentation.
What you learn in chapter 8 →Chapter 9: A new user story
The chapter introduces a pay-on-collection requirement that the team will use as it formulates examples into scenarios.
What you learn in chapter 9 →Chapter 10: Organizing the documentation
The introduction explains why long-lived Gherkin feature files should stay focused and be organized before a growing collection becomes difficult to maintain.
What you learn in chapter 10 →Chapter 11: Coping with legacy
Introduces why adopting BDD while working with existing code matters, using the WIMP team as an example.
What you learn in chapter 11 →Chapter 12: Getting ready for scenario automation
This introduction explains why scenario automation can be risky and clarifies how the book’s tool-specific examples relate to its largely language-independent patterns.
What you learn in chapter 12 →Chapter 13: Spotlight patterns for automating narrative flow
This introduction explains why automated scenario steps should work together to preserve a focused business narrative.
What you learn in chapter 13 →Chapter 14: Prop cupboard patterns for managing input test data
This introduction explains why scenario automation needs ways to supply input test data without cluttering scenarios with incidental details.
What you learn in chapter 14 →Chapter 15: Mise-en-scène patterns for layering the automation codebase
The introduction explains why a growing scenario-automation codebase needs clear responsibilities and why the WIMP team adds some REST API scenarios to its direct-code tests.
What you learn in chapter 15 →Chapter 16: Outline patterns that support higher-level steps
The introduction explains the tension between keeping scenarios concise and automating the mechanical details needed for complex behavior.
What you learn in chapter 16 →Chapter 17: Dramatis personae patterns for clear naming of concepts
The introduction explains why clear, domain-based names for business concepts make scenarios easier to read and discuss.
What you learn in chapter 17 →Chapter 18: Dress rehearsal patterns for building confidence
The introduction explains why teams should regularly run scenarios against real services as well as stubs, while recognizing the feedback and reliability challenges this creates.
What you learn in chapter 18 →Chapter 19: Technical note patterns for quick error recovery
The introduction explains why failing BDD scenarios need early, context-rich error reporting to make failures in a CI/CD pipeline quicker to diagnose.
What you learn in chapter 19 →Chapter 20: Staging patterns for adapting test execution
The chapter introduction explains why scenario execution must accommodate the different external services and customized deployments a system supports.
What you learn in chapter 20 →Chapter 21: Stagecraft patterns for interacting with external resources
This introduction explains why costly external resources can slow scenario tests and why sharing them complicates parallel execution.
What you learn in chapter 21 →Concepts explained in this book
- exampleA concrete instance illustrating an expected behavior or a possible outcome of a rule.
- scenarioA business-readable description of an example system behavior and its expected outcome.
- behavior-driven developmentAn activity that applies behavior-driven development principles during software development.
- formulationThe behavior-driven development practice of expressing understood behavior as precise scenarios.
- business ruleA business constraint governing payment when a customer collects an order.
- living documentationLiving documentation is documentation kept aligned with the current behavior of a software system through executable or continuously validated specifications.
- clean start patternA pattern in which each scenario starts with an empty service or database and creates the data it needs.
- Example MappingExample Mapping is a collaborative technique for clarifying a requirement by organizing its rules, examples, and open questions.
- feature fileA feature file is a structured text file that expresses a software feature and its behavior scenarios in a format interpretable by BDD tools.
- test driver patternA pattern that provides an outcome-oriented interface to test automation while encapsulating the technical details of interacting with an application component.
- test data managementThe practice of defining and maintaining the data provided to the system under test in software testing.
- automationAutomation is the behavior-driven development practice of making specified scenarios executable so that software behavior can be checked automatically.
- test log patternA test-automation pattern that records structured execution details across automation layers to support failure diagnosis.
- context shortcut patternA testing pattern that establishes a scenario's required context directly, without repeating business workflows that are not under test.
- restore before patternA pattern that resets state to a known baseline before each scenario, regardless of how the previous scenario ended.
- object motherA test-data construction pattern that provides methods for creating default objects or object hierarchies customized for particular tests.
- scenario resource patternThe Scenario Resource pattern manages resources that must be initialized for an individual scenario while preserving independent execution and efficient feedback.
- polymorphic driver patternA BDD automation pattern that runs the same scenarios against different application interfaces by selecting interchangeable test-driver implementations.
- stub dependency patternA testing pattern that replaces a slow or hard-to-control dependency with a controllable test substitute.
- stubA test double that substitutes for a real dependency and provides predetermined behavior or responses.
- in-place persona patternA persona pattern in which a scenario refers directly to a named representation of a domain or interface concept at the point where it appears.
- tagAn @-prefixed metadata label that annotates and categorizes Gherkin elements.
- parameter typeA user-defined parameter type that matches captured text and converts it into a value for a step definition.
- embedded application log patternA logging pattern that includes selected application log messages within a test log to provide a single source of diagnostic information.
- journey scenarioA scenario that describes a complete user journey and the end-to-end flow through which a system delivers useful outcomes.
- test personaA description of a named business concept or entity used to illustrate expected system behavior.
- discovery workshopA collaborative session for exploring and refining software requirements through structured conversation.
- example mapAn example map is a visual arrangement of examples and their associated rules for examining how a system should behave in different situations.
- skippable reset patternA pattern that skips a reset when the preceding scenario made no changes requiring one.
- attempt action patternA testing pattern that separates initiating an action from verifying its expected outcome, including an expected failure.
- templated data persona patternA pattern that creates persona definitions from reusable templates with scenario-specific changes.
- resource poolingA pattern that assigns reusable instances of a shared resource for exclusive use while work executes.
- external data persona patternA pattern that stores persona definitions outside feature files so they can be managed separately and reused.
- scenario reviewA collaborative examination of behavior scenarios to identify ambiguity, omissions, or errors and establish agreement before implementation.
- test strategyA planned approach defining the testing activities, scope, and coverage needed to evaluate a software product.
- seeded data patternA pattern that starts scenarios with a selected initial dataset to simplify setup or improve execution speed.
- documentationDocumentation is recorded information describing a system and its behavior for reference and maintenance.
- infrastructure layerThe automation-solution layer containing helper methods for interacting with underlying software infrastructure.
- test resourceA test resource is an infrastructure component or other resource whose lifetime and availability are managed for test execution.
- descriptive assertionA pattern that includes diagnostic context in assertion failure messages.
- data table accessor patternThe Data Table Accessor pattern separates conversion of data table values into typed data structures from the step definitions that consume them.
- domain default patternA pattern for defining default test data in a shared location to promote consistency and avoid maintenance issues from scattered hard-coded constants.
- execution contextScenario-scoped state and information available to steps during one scenario execution.
- local scenario contextA scenario-execution pattern that stores information in the local context so later steps can share it without repeating it.
- supplementary attachment patternA scenario-automation pattern that attaches relevant context to an assertion error message when it cannot be included in the message itself.
- corroboration check patternA scenario-automation pattern that checks application logs for entries indicating potential issues, including issues that have not yet caused behavioral failures.
- layered automation code architectureAn architecture that separates the testing concern from the automation concern into distinct layers.
- illustrative scenarioA concrete narrative describing a representative situation, context, and expected behavior for a business requirement.
- approved outcome patternThe Approved Outcome pattern represents a complicated expected result through an approved reference result that can be compared during testing.
- introduce and refer patternA narrative pattern that distinguishes introducing a new entity from referring to an existing entity through specific natural-language phrases.
- validation tester patternA pattern that clarifies the specification and testing of complex data validations by separating validation-rule aspects into scenarios.
- readabilityThe ease with which written scenario text can be read and understood.
- test file systemA pattern that centralizes file paths and abstracts file-system interactions for test input, output, and temporary files.
- ubiquitous languageA shared vocabulary used by domain experts and software practitioners to describe business concepts and system behavior consistently.
- structured loggingLogging that organizes entries to convey meaningful structure, such as relationships between nested execution steps.
- sanity checkA pattern that verifies setup preconditions immediately, before later steps depend on them.
- parameterized executionA pattern in which automation code uses test parameters to vary execution choices and extend scenario coverage.
- test action patternA pattern in which test-action infrastructure interacts with an application and captures functional failures and health incidents.
- parameterized scenario patternA scenario pattern that uses configurable values or notation to specify and verify behavior across different deployment configurations.
- A Pattern LanguageA structured collection of interrelated patterns that helps identify an appropriate pattern for a specific context.
- shared understandingA common interpretation of requirements and expected behavior held by the members of a team.
- collaborationCollaboration is a cooperative working relationship in which relevant participants jointly discover, formulate, and refine software behavior.
- user storyA user story is a concise requirement description expressing desired software behavior from a user's perspective.
- data table assertion patternA pattern for comparing tabular actual and expected outcomes while providing complete diagnostics across the comparison.
- default instance patternA test-data pattern that provides factory methods for creating default objects or object hierarchies that can be customized for a scenario.
- driver interfaceA contract defining the actions and data exchange that automation code expects from a test driver, independently of the application interface used to perform them.
- test-driven developmentA software development technique in which automated tests are written before implementation code and guide the design of the code.
- test environment initializationA pattern for efficiently initializing external resources shared by tests and cleaning them up when needed.
- ensure patternA code-structuring pattern that lets a step definition create an implicit functional prerequisite only when no explicit prerequisite exists.
- external infrastructureProduction dependencies outside an application, such as databases, external services, file systems, or system time.
- snapshot comparisonApproval testing verifies structured results by comparing them with a previously approved result and reporting detected differences.
- design patternA reusable description of a solution to a recurring software design problem.
- shareable scenario context patternA scenario-execution pattern for sharing information between steps during a scenario.
- entity finder patternA pattern that finds entities in existing data that satisfy a scenario’s prerequisites instead of creating them.
- test actionA unit of automation logic that performs an operation against the system under test as part of a behavioral test.
- contextThe state or conditions established before an action takes place in an example.
- exclusive data partitionA partitioning strategy that prevents changes made by one scenario from being visible to other running scenarios.
- insert approachA test data management approach in which automation code creates the entities a scenario needs on demand.
- query approachA test data management approach that queries existing data to find suitable entities for tests.
- seeded baselineA test data management approach in which every scenario starts with a standard set of data in the database.
- sequential processingExecuting scenarios sequentially rather than concurrently against a service.
- test isolationThe principle that each scenario should run independently, without interference from other scenarios or shared state.
- undo changes patternA pattern that records changes made during a scenario and reverses them to restore the baseline.
- resultAn outcome is a description of the system state after the behavior of interest has taken place in an example.
- requirementsA requirement is a statement of a stakeholder need, constraint, or expected system behavior that guides solution development.
- automated testingThe execution of software tests by programmed tools or scripts rather than manually.
- StepArgumentTransformation attributeA Reqnroll attribute that registers a method to transform captured text into a value for a step definition.
- BRIEFA mnemonic framework of principles for writing clear, maintainable behavior scenarios.
- scenario outlineA Gherkin construct that defines a parameterized scenario expanded into multiple examples.
- supplementary testingTesting activities that complement scenario-based automated checks, including manual and other specialized forms of evaluation.
- terminology promotion patternA behavioral-test automation pattern that uses centralized custom parameter conversions to represent domain-specific terminology in specifications.
- test configuration provider patternA pattern that centralizes how test configuration settings are loaded and made available.
- busy-waiting loopA pattern for handling an asynchronous result by repeatedly checking for completion until the result appears or a timeout occurs.
- GherkinA domain-specific language for writing human-readable behavior specifications using constructs such as Given, When, and Then.
- context classA simple injectable class that groups and stores data belonging to a scenario's execution context.
- step definitionAutomation code associated with a behavior-specification step that performs or checks the step’s behavior.
- glossaryAn alphabetical list of terms relating to a subject, accompanied by explanations of their meanings.
- specificationA sufficiently complete description of a solution's required behavior and characteristics for a delivery team to design and implement it.
- essential principleA scenario-writing principle that removes details that do not contribute directly to illustrating the behavior of a rule.
- manual test scriptA written sequence of instructions for a person to execute a software test manually.
- capabilityThe set of capabilities and behaviors that a software system provides.
- WhenA Gherkin step keyword that introduces the stimulus or event causing the behavior under specification.
- message persona patternA pattern that gives user-visible messages descriptive names so scenarios can refer to them without specifying their literal, potentially localized text.
- screenplay patternThe Screenplay pattern is a test-automation design pattern that models actors, abilities, tasks, and questions to express interactions with a system.
- synchronous testingA testing pattern that runs an asynchronous operation synchronously when asynchrony is not the behavior under test.
- entity selector patternA pattern that uses business-readable phrases to invoke automation code applying domain logic to select an appropriate entity.
- hexagonal architectureHexagonal architecture is a software architecture pattern that isolates core application logic from external systems through ports and adapters.
- cross-cutting concernA concern, such as logging or timing, that affects multiple parts of a software system rather than one isolated operation.
- developer-only BDDDeveloper-only BDD is a BDD practice in which developers create and apply behavior specifications without business participation.
- default instanceAn object created with agreed default values that can be customized for a scenario.
- built-in parameter conversionBuilt-in parameter conversion is automatic conversion from a matched Cucumber expression value to the declared type of a step definition method parameter.
- domain-specific dataDomain-specific data is information represented using terminology and value forms meaningful within a particular business domain.
- seed dataCarefully selected data pre-populated in a database before scenarios execute.
- examples tableA Gherkin block containing the example data used to generate scenarios from a scenario outline.
- personaA representative user profile or named representation of a situation used to discuss expected behavior.
- completed event patternA pattern for waiting for an asynchronous operation to finish by receiving a completion event instead of repeatedly checking its status.
- test result attachmentA file or other item registered with a test result so it can be inspected alongside the test outcome.
- SUITABLEA mnemonic organizing eight principles for designing effective scenario automation.
- concrete dataConcrete values representing the entities, states, or inputs involved in a scenario rather than abstract placeholders or general description.
- scenario automation toolSoftware that supports automating scenarios by connecting human-readable behavior descriptions to executable automation.
- background blockA Gherkin section whose steps establish context shared by scenarios in a feature file.
- fluent interfaceAn API design style in which chained calls or expressions read as a sequence of operations.
- maintainabilityMaintainability is the ease with which software can be understood, modified, corrected, or enhanced.
- cucumber expressionA Cucumber pattern syntax for matching Gherkin step text to a step definition and extracting parameter values.
- asteriskA Gherkin step marker that can introduce a step without explicitly stating Given, When, or Then semantics.
- taskA work unit representing work required to complete a user story, often recording a team's design or implementation decisions.
- printerA method or class that converts a result into a format that is easier to compare and approve.
- incidental detailInformation in a scenario that is unnecessary to convey the behavior or rule being illustrated.
- CompareToSetA Reqnroll method that compares data-table rows with a collection of objects and reports differences.
- data personaA named data set representing a particular situation, with a description of data attributes for key inputs, preconditions, and outputs referenced by scenarios.
- incremental developmentA software delivery approach in which functionality is delivered in small, planned increments.
- structured conversationA structured conversation is a deliberately organized discussion that guides participants through clarifying expected software behavior.
- test stepAn individual action or instruction within a software test procedure.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
