Q20 of 21 · BDD / Cucumber
What is Example Mapping and how does it improve the BDD process?
BDD / CucumberSeniorbddexample-mappingcollaboration3-amigosrequirements
Short answer
Short answer: Example Mapping is a structured 3-amigos conversation technique (30-60 min) that uses colour-coded index cards to explore a user story: yellow for rules, blue for examples, green for questions. It surfaces ambiguity before development starts and produces scenarios that become feature files.
Detail
Invented by Matt Wynne (Cucumber creator), Example Mapping runs before a story enters a sprint. The goal is not to write Gherkin — it's to reach a shared understanding.
The four card colours:
| Colour | Represents | Example |
|---|---|---|
| 🟡 Yellow | The Story (one per session) | "User places an order" |
| 🔵 Blue | Rules — the business rules governing the story | "Orders over £50 get free shipping" |
| 🟢 Green | Examples — concrete scenarios illustrating a rule | "Order total £51 → shipping fee £0" |
| 🔴 Red | Questions — unknowns the team can't answer yet | "What about gift cards — do they count toward the £50?" |
Running the session:
- Start with the story card.
- PO/BA reads the story and adds rule cards.
- For each rule, QA and devs add example cards (specific, concrete inputs and expected outputs).
- Red cards capture open questions — stop and answer them before the session continues.
- After 25–30 minutes, if there are many red cards, the story is not ready for the sprint.
Output → Gherkin: Each green card becomes a Scenario (or a row in a Scenario Outline). The yellow rule cards become Background or the Feature description.
Why it improves BDD:
- Surfaces edge cases before coding starts, not during QA
- Business, dev, and QA build shared mental models of the feature
- Red cards become acceptance criteria clarifications in the ticket
- Limits scope: if it's hard to write an example for a rule, the rule may be too vague
// WHAT INTERVIEWERS LOOK FOR
The four card types. The 'many red cards = not sprint-ready' signal. That the output becomes Gherkin scenarios. Framing it as a discovery tool, not a writing tool.