Chapter 6: What is formulation?
This introduction defines formulation as turning shared understanding of system behavior into a business-readable specification.
After this chapter you will be able to
- Purpose of formulation. Explain that formulation turns a shared understanding of how a system should behave into a business-readable specification, usually close to natural language.
- Collaborative understanding of behavior. Explain why formulation documents expected behavior collaboratively, with input from business and delivery representatives, so that scenarios mean the same thing to all stakeholders.
- Shared domain language. Describe how unambiguous, domain-appropriate terms and a ubiquitous language help team members communicate without translating between competing names for the same concepts.
- Two purposes of formulated scenarios. Explain that formulated scenarios document a shared understanding of system behavior and can automatically verify that behavior, provided they are machine readable.
- Gherkin and collaborative BDD. Distinguish using Gherkin from following BDD: explain that its Given/When/Then structure can be useful without automation, but neither requires nor proves a collaborative, behavior-driven process.
- Feature File Organization. Describe a Gherkin feature file and explain how its Feature, Rule, and Scenario keywords organize material from an example map.
- Scenario Step Keywords. Explain what Given, When, Then, and And do in a scenario, including how step text relates to automation.
- Living documentation feedback. Explain how discovery, formulation, and automation produce living documentation: running the scenarios alerts the team when the implementation and documentation diverge, so the team can investigate and keep them in sync.
- Causes of scenario divergence. Distinguish the three reasons documentation and implementation may diverge, and explain why a reported difference needs investigation before the team decides what to change.
- Illustrative Scenario Granularity. Explain why an illustrative scenario focuses on a single rule, while recognizing that a rule can be described at different levels of abstraction.
- Journey Scenario Purpose. Distinguish the broad view supplied by journey scenarios from the detailed behavior supplied by illustrative scenarios, and explain why journey scenarios should be fewer.
What it builds on
- How to establish structured conversations (chapter 2) · Assumes the idea of reaching shared understanding through structured conversations.
- Collaborative (chapter 2) · Collaboration during structured conversations.
- Formulation (chapter 1) · The place of formulation within the BDD approach.
- Example Mapping in a nutshell (chapter 2) · Introduces example maps that feature-file structure mirrors.
- Automation (chapter 1) · The introduction to automating BDD scenarios.
- Rules vs. examples (chapter 3) · The distinction between rules and examples.
Section by section
Introduction
This introduction defines formulation as turning shared understanding of system behavior into a business-readable specification.
- Purpose of formulation: Explain that formulation turns a shared understanding of how a system should behave into a business-readable specification, usually close to natural language.
Why it matters: This gives you the purpose of formulation before the chapter explores how to do it.
Key terms: formulation, shared understanding, business readable specification
6.1 Shared understanding
Formulation documents a shared understanding of expected behavior through collaboration and clear, domain-rooted language.
- Collaborative understanding of behavior: Explain why formulation documents expected behavior collaboratively, with input from business and delivery representatives, so that scenarios mean the same thing to all stakeholders.
Why it matters: A scenario is useful only if people can agree on what behavior it describes, even after the original discussion. - Shared domain language: Describe how unambiguous, domain-appropriate terms and a ubiquitous language help team members communicate without translating between competing names for the same concepts.
Why it matters: Consistent domain terms reduce misunderstandings when people discuss and document behavior.
Key terms: formulation, shared understanding, expected behavior, scenarios, business language, business domain, Ubiquitous Language
6.2 Many formats
This section compares formats for formulated scenarios, explains why automation needs machine-readable scenarios, and argues that collaboration matters more than the format chosen.
- Two purposes of formulated scenarios: Explain that formulated scenarios document a shared understanding of system behavior and can automatically verify that behavior, provided they are machine readable.
Why it matters: These two purposes explain why scenario wording needs to work for people and, when automated, for tools. - Choices of scenario format: Describe the different ways this section says teams express scenarios, including tabular specifications, keyword-based test cases, specifications embedded in code, and Gherkin feature files. Explain the participation trade-off noted for code-embedded specifications.
Why it matters: A format choice affects who can contribute to scenarios, not just which tool can run them. - Gherkin and collaborative BDD: Distinguish using Gherkin from following BDD: explain that its Given/When/Then structure can be useful without automation, but neither requires nor proves a collaborative, behavior-driven process.
Why it matters: It helps teams judge their BDD practice by collaboration rather than by whether they adopted a particular syntax. - Gherkin for AI agents: Explain why the section sees no current need to replace Gherkin with an AI-specific specification format.
Why it matters: It keeps attention on the quality of specifications rather than an unproven format change for AI.
Key terms: formulated scenarios, shared understanding, machine readable, FIT, FitNesse, Robot Framework, RSpec, Jasmine, Cypress, Gherkin
6.3 Gherkin overview
This section introduces Gherkin feature files and the keywords that organize features, rules, scenarios, and steps.
- Feature File Organization: Describe a Gherkin feature file and explain how its Feature, Rule, and Scenario keywords organize material from an example map.
Why it matters: This structure lets readers connect the examples found during discovery to the feature file that records them. - Scenario Step Keywords: Explain what Given, When, Then, and And do in a scenario, including how step text relates to automation.
Why it matters: Recognizing step keywords helps readers follow a scenario without needing to know its automation code. - Gherkin Accessibility: Describe why Gherkin is approachable for people without programming knowledge and usable across spoken languages.
Why it matters: The format is intended to be readable by collaborators with different technical and language backgrounds.
Key terms: Gherkin, feature file, Feature, Rule, Scenario, example map, Given, When, Then, And
6.4 Living documentation
This section explains how automated BDD scenarios help keep documentation aligned with software and how that documentation can support, but not replace judgment in, AI-assisted product questions.
- Living documentation feedback: Explain how discovery, formulation, and automation produce living documentation: running the scenarios alerts the team when the implementation and documentation diverge, so the team can investigate and keep them in sync.
Why it matters: The scenarios help the team notice when documentation may no longer describe the software accurately. - Causes of scenario divergence: Distinguish the three reasons documentation and implementation may diverge, and explain why a reported difference needs investigation before the team decides what to change.
Why it matters: Treating every mismatch as a software defect could lead the team to change the wrong thing. - AI answers and safeguards: Describe how an AI agent can use living documentation containing functional details and implementation status to answer product questions or summarize user journeys, and explain why its answers need checking before important decisions.
Why it matters: An AI answer can help explore product behavior, but it is not a reliable basis for an important decision without verification.
Key terms: living documentation, discovery, formulation, automation, divergence, specification, implementation, functional specification, implementation status, AI agent
6.5 Scenario granularity
This section distinguishes focused illustrative scenarios from broader journey scenarios and explains how their purposes affect detail and assertions.
- Illustrative Scenario Granularity: Explain why an illustrative scenario focuses on a single rule, while recognizing that a rule can be described at different levels of abstraction.
Why it matters: It helps you choose a level of detail that communicates the behavior to its readers. - Journey Scenario Purpose: Distinguish the broad view supplied by journey scenarios from the detailed behavior supplied by illustrative scenarios, and explain why journey scenarios should be fewer.
Why it matters: Both kinds of scenario are useful, but they answer different questions for a reader. - Scenario Assertion Styles: Distinguish the assertion precision appropriate to illustrative and journey scenarios according to what each is meant to show.
Why it matters: Matching assertions to a scenario’s purpose keeps the emphasis on either a specific result or the overall flow.
Key terms: concrete example, rule, illustrative scenarios, granular, journey scenarios, complete user journey, assertions
6.6 Summary
Where this is used later
- The goals (chapter 7) · The importance of shared understanding.
- Illustrative scenarios (chapter 7) · The role of shared understanding in formulation.
- Scenarios should read like a specification (chapter 7) · Writing scenarios as specifications relies on wording readers can interpret consistently.
- Gherkin basics (chapter 8) · Provides the reason for learning a tool-readable scenario syntax.
- A sample feature file (chapter 8) · Introduces the Gherkin feature-file format used in the following chapters.
- Communication, not testing (chapter 7) · Supports treating scenarios as communication, not merely test artifacts.
- The structure and syntax of a feature file (chapter 8) · Develops the structure and syntax of a feature file.
- The old scenario (chapter 7) · An overview of Gherkin scenario language.
Concepts explained in this chapter
- living documentationLiving documentation is documentation kept aligned with the current behavior of a software system through executable or continuously validated specifications.
- GherkinA domain-specific language for writing human-readable behavior specifications using constructs such as Given, When, and Then.
- ubiquitous languageA shared vocabulary used by domain experts and software practitioners to describe business concepts and system behavior consistently.
- formulationThe behavior-driven development practice of expressing understood behavior as precise scenarios.
- journey scenarioA scenario that describes a complete user journey and the end-to-end flow through which a system delivers useful outcomes.
- shared understandingA common interpretation of requirements and expected behavior held by the members of a team.
- documentationDocumentation is recorded information describing a system and its behavior for reference and maintenance.
- 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.
- illustrative scenarioA concrete narrative describing a representative situation, context, and expected behavior for a business requirement.
- scenarioA business-readable description of an example system behavior and its expected outcome.
- WhenA Gherkin step keyword that introduces the stimulus or event causing the behavior under specification.
- business ruleA business constraint governing payment when a customer collects an order.
- collaborationCollaboration is a cooperative working relationship in which relevant participants jointly discover, formulate, and refine software behavior.
- specificationA sufficiently complete description of a solution's required behavior and characteristics for a delivery team to design and implement it.
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.
