In this chapter, the team takes a new story from requirements discovery into formulation, showing how concrete examples become readable scenarios. The story concerns restricting customers who have ordered pay-on-collection but never collected and paid, and the team works through a set of example cards to shape scenarios that capture the intended behavior. The chapter emphasizes that formulation is usually best done by a small subset of the delivery team, while the rest of the team reviews the result to confirm shared understanding and business accuracy.
As the scenarios are refined, the team explores several readability techniques. They start by writing from the outcome backward to remove unnecessary context, then improve wording by avoiding quotation marks, replacing first-person phrasing with clearer third-person roles, and using pronouns only when they do not create ambiguity. The chapter also warns against overusing backgrounds, because they can hide important context, complicate maintenance, and reduce readability; instead, common or implicit context should simply be omitted when it is obvious to readers.
The team then broadens the discussion to other Gherkin features and scenario-shaping decisions. They show how to merge examples when differences are incidental, how to add comments when a temporary explanation is needed, how to use tags such as @manual when a scenario will not be automated, and how to keep scenarios focused on one rule at a time. By the end, the team has a concise, precise, and reviewable set of scenarios, and the chapter reinforces the larger BDD principle that readability, shared understanding, and incremental specification matter more than rigid reuse or automation convenience.
Restricting customers using a blocklist
Restricted customer - unauthenticated
E-mail or phone match examples
Question cards
Restrictions are independent of authentication status examples
Upload replacement blocklist
Summary
Start writing a scenario from the expected outcome and work your way back to the essential context.
Don’t involve the whole team in formulating scenarios, but ensure that the whole team reviews every scenario formulated.
Scenarios need to be unambiguous, so be specific about every actor’s role.
Scenarios need to be readable, so use idiomatic natural language avoiding things like unnecessary repetition and technical details.
The Gherkin Background keyword should usually be avoided.
Try to write your scenarios so that you don’t need Gherkin line comments or text descriptions.
Honor the intention of the examples uncovered during discovery, but refine them during formulation to be idiomatic natural language, adhering to the BRIEF principles.
As new requirements are uncovered, some existing scenarios may need to change. Incremental specifications allow us to iteratively and incrementally deliver the system.
Gherkin tags are very flexible and should be used to capture information that doesn’t fit into the main flow of a feature file’s natural language documentation.
Most scenarios should be automated. Those that have not been automated need to be manually reviewed regularly for continued correctness.
FAQ
What is the main goal of formulating scenarios for a new user story?The main goal is to turn concrete examples from discovery into clear, business-readable scenarios that capture the team’s shared understanding of the system’s behavior.Why does the chapter recommend “writing it upwards” when creating a scenario?It means starting from the expected outcome and working backward to the context, which helps ensure each part of the scenario has a clear causal connection and avoids unnecessary setup.Should the whole delivery team formulate scenarios together?Usually no. The chapter recommends that a smaller subset of the team do the formulation for efficiency, while the rest of the team reviews the scenarios and gives feedback.Why shouldn’t formulation happen during the discovery session?Discovery should stay fast and focused on uncovering assumptions and misunderstandings. Formulation is slower and more reflective, so combining the two can reduce engagement and slow communication.Why does the chapter discourage using quotation marks in step text?Because quotes can suggest a value is variable and often do not improve readability. The chapter suggests removing them unless they serve a clear purpose.Why is using “I” in scenarios discouraged?Because it can be ambiguous and let readers interpret the scenario as referring to themselves. The chapter recommends using clear third-person roles or personas instead.When should a Background be used in a feature file?A Background should only be used when all scenarios in a feature file truly share the same context. Even then, the chapter warns that backgrounds can hurt readability and maintenance.Can concrete examples be changed or merged during formulation?Yes. The chapter says formulation is the right time to judge whether examples should be merged, simplified, or even left unformulated if they are incidental or not valuable as scenarios.What is the purpose of the @manual tag?It marks a scenario that will not be automated. This documents the status clearly for the team and signals that the scenario should be treated differently from automated ones.Who should review formulated scenarios before implementation begins?At minimum, the product owner should review them, and ideally all team members should review and accept them before work starts on implementation.
pro $24.99 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!