A scenario has three When steps joined by And — what is wrong, and how do you fix it?
answer
- A red scenario should name one suspect
- Ask what each event promises
- Setup wearing an event's clothes
- Two promises means two scenarios
- Bundled facts fail as a lump
basics
~20 sThree When steps mean three events, so a failure no longer says which one broke and the scenario documents a flow, not a rule. Demote the earlier events to Given facts and keep one event as the When.
solid answer
~50 sThe When is the event whose effect the scenario is about; everything before it is context and everything after it is consequence. With three of them the scenario has three candidate causes for one red result, and a reader cannot tell which rule is being specified. The fix has two shapes. If the earlier events only exist to reach a state, restate them as facts in the Given — "a shared playlist holds 14 tracks and Nina is an editor" instead of narrating the creation and the invitation. If each event genuinely has its own promised outcome, split into separate scenarios, each with its own single When and its own Then. Apply the same treatment inside a step: a conjunction step such as "Given the playlist is shared and public and holds 14 tracks" fails as a lump, so split it into separate lines joined by And.
code
pseudocode · 6 linesScenario: Collaboration
Given Nina is signed in
When Nina creates a playlist "Late Shift"
And Nina invites Ravi as an editor
And Ravi moves the ninth track to first position
Then the playlist order starts with that trackgo deeper
Be able to count the When steps in a scenario and rewrite the surplus ones as Given facts. Knowing that one scenario tests one event, and showing the rewrite, is what is expected of you here.
Explain why the single-event rule aids diagnosis and reuse, and apply the same reasoning to conjunction steps inside Given and Then. Expect to be handed a bloated scenario and asked to restructure it on the spot.
Show judgement on the split-versus-demote decision and on the sequence-is-the-rule exception. Be ready to describe how you would clean up a suite of long journey scenarios without losing coverage in the process.
Own the policy and its enforcement: what you require in review, how you stop journey scenarios from re-accumulating, and how you weigh the extra scenarios that splitting produces against the run time they add.
### What the single-When rule is actually protecting The rule is not aesthetic. A scenario is a claim of the form *in this situation, when this happens, this must be true*. One event keeps the claim falsifiable in a useful way: a red scenario names one suspect. Add a second event and the claim becomes *in this situation, after this sequence, this must be true*, which is still testable but no longer diagnostic. In a playlist service, a scenario that signs a listener in, creates a playlist, invites a collaborator and then reorders it will go red for four unrelated reasons, and three of them have nothing to do with the rule the author cared about. There is a second cost, subtler and worse. Multi-event scenarios drift into being narratives of a user journey, and journeys tend to accumulate. Once a scenario is a story, every new requirement looks like another paragraph in the same story rather than a new rule that deserves its own example. Suites that grow this way end up with a handful of very long scenarios that nobody can review and that must run to completion to tell you anything. ### Fix one: demote events to facts Most extra Whens are setup wearing an event's clothes. The question to ask of each is: does the scenario promise anything about this event's outcome? If not, it is context, and context belongs in the Given as a fact. "When Nina creates a playlist and invites Ravi" becomes "Given a shared playlist that Nina owns and Ravi may edit". The scenario keeps the same preconditions, loses two failure causes, and gains a Given that other scenarios can reuse verbatim. This demotion is also what makes a scenario readable. Facts can be scanned; narrated actions have to be simulated in the reader's head to work out what state they leave behind. ### Fix two: split into scenarios When the intermediate events do have promised outcomes, the scenario is covering more than one rule and should become several. Inviting a collaborator promises something — the invitee gains editing rights — and reordering promises something else. Two rules, two scenarios, two Whens, two independent red or green results. Each starts from the state the previous rule leaves behind, stated as a Given rather than inherited by running the other scenario first, so that either can be run alone. A scenario that depends on another scenario having run is a distinct and more serious defect than a multi-event When, because ordering dependence makes results meaningless when the suite is filtered or run in a different order. ### The genuine exception Sometimes the *sequence* is the rule: a promise about repeated or rapid actions, such as two reorders in quick succession settling on the last one, or a duplicate submission that must not take effect twice. Here the repetition is the event under test, not incidental setup, and the right move is to phrase it as one step — "When the editor reorders the playlist twice within a second" — rather than as two Whens. The rule survives, the single-suspect property survives, and the sequence is visible in the text. ### Conjunction steps, the same defect one level down The same reasoning applies inside a single step. "Given the playlist is shared and public and holds 14 tracks" bundles three facts into one sentence. When it fails you learn only that the bundle could not be established. Split it into three lines and a failure names the exact fact. Splitting also makes each fact reusable and makes it obvious when a fact is incidental — three separate lines invite the question "does the rule turn on this one?" in a way a run-on sentence never does. The same goes for a conjunction in the Then: "Then the order is updated and collaborators are notified and the change is logged" hides two failures behind the first one, because a scenario stops at its first failed assertion. Three lines, three independent assertions, and you learn everything the run could have told you. ### What good looks like in review A quick review pass: count the Whens — one; read the Given aloud — every line a fact the rule turns on; read the Then — one promise per line, each observable. When a scenario resists this, it is usually because it is two rules in a trench coat, and splitting it is the answer rather than more careful punctuation.
- How do you decide whether an extra event is context or a second rule?Ask whether the scenario promises anything about that event's outcome. If nothing in the Then depends on it, it is context and belongs in the Given as a fact. If it has its own promise — an invited collaborator gains editing rights — it is a rule of its own and deserves its own scenario, with the resulting state stated as a Given in the next one rather than produced by running the first.
- Is there a case where two events genuinely belong in one When?Yes, when the sequence itself is the rule: a repeated or rapid action whose combined effect is what the product promises, such as two reorders within a second settling on the last one. Even then, write it as a single step that names the repetition rather than as two When lines, so the scenario keeps one event under test and one suspect when it goes red.
- Why split a conjunction inside a single Then rather than leaving it as one sentence?A scenario stops at its first failed assertion, so a bundled Then hides everything after the first failure. Split into separate lines, one run tells you which promises held and which did not. Separate lines also expose assertions that were never really about this rule, which is usually how the conjunction got there in the first place.
saying these in an interview costs you the question
- Keeps several Whens because the flow is realistic
- Says extra events are fine if the scenario still passes
- Narrates setup as actions instead of stating facts
- Lets one scenario depend on an earlier one having run
- Bundles three facts into one Given sentence
- Splits a genuine repeated-action rule into two When lines