The two major goals of Behavior-Driven Development are better collaboration and automation. Even when the Three Amigos actually get together, collaboration can be tough. Where do we start? What scenarios should we write? What examples should be included?
Well, the Cucumber folks have a practice called “Example Mapping” to make it easier. All you need is a pack of index cards and a big table!
- Write the story under discussion on a yellow at the top of the table.
- Write a rule for each known acceptance criteria on a blue card under the story.
- Write each example for a rule on a green card.
- Write each open question on a red card on the side to discuss later.
Keep writing cards until the team is satisfied with the story. This process provides clear, fast feedback for stories. It should take about 25 minutes per story. A team can quickly see if a story is too big or needs further refinement. Engineers can easily turn example cards into Gherkin scenarios. Remember to assign questions to owners to get answers.
Rather than duplicate documentation here, please read Matt Wynne’s seminal post on the practice, Introducing Example Mapping.
Also, watch this webinar recording from Cucumber about Example Mapping: