---
title: 'BDD Testing Starts Before the Code: Three Amigos'
description: The most valuable part of BDD happens before a single step definition
  exists. Teams that skip it and go straight to &quot;write Cucumber tests&quot; usually…
source_url:
  html: https://testingbot.com/resources/courses/cucumber-bdd/bdd-collaboration
  md: https://testingbot.com/resources/courses/cucumber-bdd/bdd-collaboration.md
---

Course

[BDD with Cucumber: Gherkin to CI](https://testingbot.com/resources/courses/cucumber-bdd)

Chapter 2 of 12

1. [1 Cucumber BDD Tutorial: From Gherkin to CI](https://testingbot.com/resources/courses/cucumber-bdd)
2. [2 BDD Testing Starts Before the Code: Three Amigos](https://testingbot.com/resources/courses/cucumber-bdd/bdd-collaboration)
3. [3 Writing Good Gherkin: Declarative Scenarios](https://testingbot.com/resources/courses/cucumber-bdd/writing-good-gherkin)
4. [4 Cucumber with Java and Selenium: First Scenario](https://testingbot.com/resources/courses/cucumber-bdd/cucumber-java-selenium)
5. [5 Step Definitions, Cucumber Expressions, Parameter Types](https://testingbot.com/resources/courses/cucumber-bdd/step-definitions)
6. [6 Hooks and Sharing State with PicoContainer](https://testingbot.com/resources/courses/cucumber-bdd/hooks-and-shared-state)
7. [7 Scenario Outlines, Tags and Background](https://testingbot.com/resources/courses/cucumber-bdd/outlines-tags-background)
8. [8 Cucumber-JS with Playwright](https://testingbot.com/resources/courses/cucumber-bdd/cucumber-js-playwright)
9. [9 Parallel Runs, Reports and CI on TestingBot](https://testingbot.com/resources/courses/cucumber-bdd/parallel-reports-ci)
10. [10 Other BDD Frameworks: Behave and Reqnroll](https://testingbot.com/resources/courses/cucumber-bdd/behave-and-reqnroll)
11. [11 BDD Anti-Patterns and How to Fix Them](https://testingbot.com/resources/courses/cucumber-bdd/bdd-anti-patterns)
12. [12 Knowledge check](https://testingbot.com/resources/courses/cucumber-bdd/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 2 of 12 Intermediate 6 min read 2 quick checks Updated Nov 2026 

# BDD Testing Starts Before the Code: Three Amigos
On this page
1. [Discovery, formulation, automation](https://testingbot.com#discovery-formulation-automation)
2. [The three amigos](https://testingbot.com#the-three-amigos)
3. [Example mapping](https://testingbot.com#example-mapping)
4. [From examples to scenarios](https://testingbot.com#from-examples-to-scenarios)
5. [When the conversation is enough](https://testingbot.com#when-the-conversation-is-enough)

The most valuable part of BDD happens before a single step definition exists. Teams that skip it and go straight to "write Cucumber tests" usually end up with feature files that read like test scripts and that nobody outside QA ever opens. This chapter covers the conversation that produces good examples, and how those examples become Gherkin.

## Discovery, formulation, automation[#](https://testingbot.com#discovery-formulation-automation)

A useful way to think about BDD is as three activities, a split popularised by Seb Rose and Gáspár Nagy in their _BDD Books_ series:

1. **Discovery** : the team explores a piece of work through concrete examples and agrees on what it should do. Output: a shared understanding, rules and examples, and a list of open questions.
2. **Formulation** : the agreed examples are written down as Gherkin scenarios, in the language of the business.
3. **Automation** : developers and testers write step definitions so the scenarios run against the system, and keep them passing.

Most teams that "do BDD" only do the third step. The feature files then document whatever the automation engineer thought the feature was, which defeats the purpose. Discovery is cheap (a 25-minute conversation) and finds the misunderstandings that would otherwise turn up as bugs or rework.

## The three amigos[#](https://testingbot.com#the-three-amigos)

Discovery works best with at least three perspectives in the room, which is why the meeting is often called **three amigos** :

- **Business** (product owner, analyst, domain expert): what problem are we solving, which rules matter?
- **Development** : how could this work, what is hard, what already exists?
- **Testing** : what could go wrong, what edge cases are missing, how will we know it works?

It is a set of perspectives, not a fixed headcount. A designer, a support engineer or a security specialist joins when the story needs them. One person can bring two perspectives, but it is rare that the person who wrote the requirement also spots its gaps.

A team's testers write all the feature files after the developers finish each story. The product owner has never opened one. What is missing?

 A better Cucumber reporting plugin, so the product owner can read the results More scenarios per feature Discovery: agreeing on examples together before the code is written Nothing; this is how BDD is meant to work

Writing Gherkin after the fact is automation without discovery. The examples never helped anyone agree on behaviour, so they are just UI tests with an extra layer. A nicer report does not fix that.

## Example mapping[#](https://testingbot.com#example-mapping)

Example mapping, introduced by Matt Wynne of the Cucumber team, is a simple format for a discovery session. You need four colours of index cards (or a virtual board) and about 25 minutes per story:

| Card | Colour | Holds |
| --- | --- | --- |
| Story | Yellow | The user story being discussed, at the top |
| Rule | Blue | An acceptance criterion or business rule |
| Example | Green | A concrete example that illustrates a rule, placed under it |
| Question | Red | Anything nobody in the room can answer yet |

Here is what a map for the sign-in story used in this course might look like after a session:

```
STORY A member signs in to reach the secure area

RULE Correct username and password open the secure area
  EX Tom signs in with his own password -> secure area, "You logged into a secure area!"

RULE A wrong password is rejected and says the password was wrong
  EX Tom with "not-his-password" -> stays on the login page, "Your password is invalid!"

RULE An unknown username is rejected and says the username was wrong
  EX "tomjones" (no such account) with Tom's password -> "Your username is invalid!"

QUESTION Is it OK to reveal whether a username exists? (security)
QUESTION Do we lock the account after N failed attempts?
```

Notice what the map tells you:

- **Many red cards** mean the story is not ready. Get answers before estimating it.
- **A rule with many examples** is complex, and may be a story of its own.
- **A rule with no examples** is not understood yet. "Wrong credentials are rejected" sounds clear until someone asks "rejected how?"

The red card about revealing whether a username exists is a real issue: messages that differ for "unknown user" and "wrong password" let an attacker find valid usernames. The demo site does it anyway, so the course keeps those rules, but in your product this is exactly the conversation that should happen before the code exists.

After 25 minutes of example mapping a story has two rules, three examples and six red question cards. What should the team do?

 Start development and write the Gherkin for the three examples Hold the story back until the questions are answered Turn each question into a scenario tagged `@wip`

Lots of open questions mean the team does not yet understand the story. Building it now means guessing, and the guesses become bugs or rework. Questions are not scenarios; they need answers first.

## From examples to scenarios[#](https://testingbot.com#from-examples-to-scenarios)

Formulation turns each green card into a scenario. The rule usually becomes the scenario title or a comment, and the example becomes the Given/When/Then. The first rule above becomes:

```gherkin
Scenario: Tom signs in with his own password
  Given Tom has an account
  When Tom signs in with his password
  Then he is in the secure area
```

Two things are worth noticing. First, the scenario uses a **persona** ("Tom") instead of a username and password: the details live in the step definitions, where they can change without touching the scenario. Second, it talks about **what** happens ("signs in", "is in the secure area"), not **how** ("types into the username field", "clicks the submit button"). Chapter 2 explains why that matters so much.

Formulation is best done by a pair (often a developer and a tester) right after the session, with the product owner reviewing the result. If the product owner cannot read a scenario and say whether it is right, rewrite it.

## When the conversation is enough[#](https://testingbot.com#when-the-conversation-is-enough)

Not every example needs to become an automated Cucumber scenario. Some are better checked by a unit test (for example, the exact rules of a password policy), and some only needed to be discussed. A good rule of thumb: automate as a scenario what the business would want to read as documentation, and test the rest at the cheapest level that catches the bug.

[Previous · Chapter 1 Cucumber BDD Tutorial: From Gherkin to CI](https://testingbot.com/resources/courses/cucumber-bdd) [Next · Chapter 3 Writing Good Gherkin: Declarative Scenarios](https://testingbot.com/resources/courses/cucumber-bdd/writing-good-gherkin)

On this page

1. [Discovery, formulation, automation](https://testingbot.com#discovery-formulation-automation)
2. [The three amigos](https://testingbot.com#the-three-amigos)
3. [Example mapping](https://testingbot.com#example-mapping)
4. [From examples to scenarios](https://testingbot.com#from-examples-to-scenarios)
5. [When the conversation is enough](https://testingbot.com#when-the-conversation-is-enough)

Certification

Earn the free, resume-worthy TestingBot Cucumber BDD Certification for this course.

[How it works](https://testingbot.com/resources/courses/cucumber-bdd/certification)
