Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Discovery and Formulation: Story Mapping, Example Mapping and Scenario Writing

Discovery and Formulation: Story Mapping, Example Mapping and Scenario Writing

Slides from the two day / four half day training on Discovery and Formulation of requirements suitable for a BDD style process.

Wouter Lagerweij

December 01, 2020
Tweet

Other Decks in Programming

Transcript

  1. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Discovery

    and Formulation Story Mapping, Example Mapping and Scenario Writing
  2. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] “The

    hardest single part of building a software system is deciding precisely what to build” – Fred Brooks, The mythical man-month
  3. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Practices

    Story Mapping Example Mapping Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’ Scenario writing
  4. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Story

    Mapping To break a big feature/project into smaller parts while keeping the big picture in sight, and defining the slices in which we can split delivery.
  5. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Example

    Mapping To discover together, and agree unambiguously what the expected result will be when we've implemented a story by generating examples of how it will behave.
  6. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Scenario

    Writing To apply some rigour to our examples, to ensure we use the same language, and verify our understanding, while also allowing us to turn these specifications into executable tests. Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’
  7. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Training

    4 sessions, ½ day each 1. Thinking in examples 2. Story Mapping 3. Example Mapping 4. Scenario Writing Guided Coaching 5 sessions, ½ day each 1. Story Mapping 2. Example Mapping 3. Scenario Writing 4. Examples Feedback 5. Scenarios Feedback
  8. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] “XP

    is like Scrum, except that it works.” -- Ron Jeffries & Chet Hendrickson
  9. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Geek

    and Poke’s Agile Families– Licensed CC-BY 3.0 User Stories From Extreme Programming, Kent Beck
  10. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] CCC

    • Card • Conversation • Confirmation https://ronjeffries.com/xprog/articles/expcardconversationconfirmation/
  11. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Customer

    Tests or Acceptance Tests or Acceptance Test Driven Development or Behaviour Driven Development or Specification by Example...
  12. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Software

    development gone… less than perfect • Projects that fail • Stories unclear • Quality going down • Unexpected changes in requirements • Not delivered what was expected • Deadline pressures...
  13. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Geek

    and Poke’s Advanced Scrum – Licensed CC-BY 3.0
  14. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Story

    Mapping “The flat backlog is poor explanation of what a system does” - Jeff Patton https://www.jpattonassociates.com/the-new-backlog/ https://www.jpattonassociates.com/wp-content/uploads/2015/01/how_you_slice_it.pdf
  15. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Benefits

    of Story Mapping • Structured way of breaking down something big • Always clear how the parts fit into the whole • Always clear how what we do relates to the user’s needs • Done together, creates common understanding • Focused on creating small deliverable increments
  16. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Getting

    ready for work Write down everything you have/had to do to to get out the door on your way to work.... “Shut off alarm” “Get into the shower” “Wash hair” “Make coffee” ...
  17. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Customer

    Tests or Acceptance Tests or Acceptance Test Driven Development or Behaviour Driven Development or Specification by Example...
  18. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] having

    conversations is more important than capturing conversations is more important than automating conversations. https://lizkeogh.com/2014/01/22/using-bdd-with-legacy-systems/
  19. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] So

    what about Example Mapping? https://cucumber.io/blog/bdd/example-mapping-introduction/
  20. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Training

    4 sessions, ½ day each 1. Thinking in examples 2. Story Mapping 3. Example Mapping 4. Scenario Writing Guided Coaching 5 sessions, ½ day each 1. Story Mapping 2. Example Mapping 3. Scenario Writing 4. Examples Feedback 5. Scenarios Feedback
  21. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] What

    are we doing today? Story Mapping • Feature: ‘Publish a Recipe’ ◦ One group, prepare the map ◦ Split group, slice and prioritize ~ 1.5 hour, with a break • Feature: ‘Prepare a Recipe ◦ Split group, Map from the ground up ◦ Split group, slice and prioritize ~ 2 hours, with a break • Look forward to tomorrow • Example Mapping • Incident/Maintenance/Forced Update story. Worth a Map?
  22. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe Our mission is to make it easy for people to live a healthy life by helping them eat better! We do that by providing a recipe platform that makes it easy to prepare food that is healthy and low-carb! As our first feature we need to let users create recipes where they provide all the necessary information on ingredients, measurements, and nutritional contents. To make it easy for anyone to prepare recipes, they need to provide step-by-step instructions, enriched with photo and video materials, timing information and links to cooking-skill tips in our extensive database. Of course our culinary creators can share their work using all major social media platforms. Every day they get an overview of how many people viewed, prepared and upvoted their recipes. Any comments and questions left by their fans are of course immediately notified.
  23. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Prepare a Recipe Where our 'Publish a Recipe' feature is all about making it easy to make new recipes available, the 'Prepare Recipe' feature is all about making them easy to find and prepare! Recipe Preparers should be able to find our recipes easily, on the web, social media, as well as in-app. Recipe Preparers can find recipes based on ingredients, categories, time to prepare, or the Recipe Creator. They can quickly see any of those attributes when browsing and searching recipes, and when they choose a recipe, they get a clear overview of all necessary ingredients, with the amount of them easily updated based on the number of people served, see all the steps to make the recipe, and can get a timed, step-by-step 'live' guidance when making it, with explanatory video, timers and alerts for when to take the next step, etc. Of course, RPs can also leave questions, comments and rate a recipe. As well as share it on social media. Of course.
  24. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe 1 • I’m the PO, ask me anything! • Write User Tasks ◦ Pay attention to goals and breakdown (Activity vs. User Task vs. Story) • 15 minutes
  25. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe 2 • I’m the PO, ask me anything! • Add Activities • Add Stories ◦ Pay attention to goals and breakdown (Activity vs. User Task vs. Story) • 15 minutes
  26. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe 3 • Select your Product Owner • Prioritise Stories • Determine the ‘MVP’ slice. What is the goal of the first slice? • What will be your second slice? • 15 minutes • Return and compare!
  27. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Prepare a Recipe Where our 'Publish a Recipe' feature is all about making it easy to make new recipes available, the 'Prepare Recipe' feature is all about making them easy to find and prepare! Recipe Preparers should be able to find our recipes easily, on the web, social media, as well as in-app. Recipe Preparers can find recipes based on ingredients, categories, time to prepare, or the Recipe Creator. They can quickly see any of those attributes when browsing and searching recipes, and when they choose a recipe, they get a clear overview of all necessary ingredients, with the amount of them easily updated based on the number of people served, see all the steps to make the recipe, and can get a timed, step-by-step 'live' guidance when making it, with explanatory video, timers and alerts for when to take the next step, etc. Of course, RPs can also leave questions, comments and rate a recipe. As well as share it on social media. Of course.
  28. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe 1 • Select your Product Owner • Write User Tasks ◦ Pay attention to goals and breakdown (Activity vs. User Task vs. Story) • 15 minutes
  29. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Prepare a Recipe 2 • Same POs! • Add Activities • Add Stories ◦ Pay attention to goals and breakdown (Activity vs. User Task vs. Story) • 15 minutes
  30. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    Recipe App - Publish a Recipe 3 • Same POs! • Prioritise Stories • Determine the ‘MVP’ slice. What is the goal of the first slice? • What will be your second slice? • 15 minutes • Return and compare!
  31. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Slices

    and releases • First one complete? • First one roughly the right size? • Slice 2-5?
  32. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Training

    4 sessions, ½ day each 1. Thinking in examples 2. Story Mapping 3. Example Mapping 4. Scenario Writing Guided Coaching 5 sessions, ½ day each 1. Story Mapping 2. Example Mapping 3. Scenario Writing 4. Examples Feedback 5. Scenarios Feedback
  33. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Practices

    Story Mapping Example Mapping Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’ Scenario writing
  34. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] having

    conversations is more important than capturing conversations is more important than automating conversations. https://lizkeogh.com/2014/01/22/using-bdd-with-legacy-systems/
  35. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Why?

    • Communication, communication, communication, … • Ubiquitous Language • Structured conversations • Testing • Living Documentation
  36. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Example

    Mapping https://cucumber.io/blog/bdd/example-mapping-introduction/ “A simple, low-tech method for making conversations short and powerfully productive” -- Matt Wynn
  37. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Example

    Mapping https://cucumber.io/blog/bdd/example-mapping-introduction/ • Examples on GREEN cards “Illustrate concrete behaviour of the system” • Rules on BLUE cards “Logical groupings of examples around a particular condition” Often: acceptance criteria, business rules, requirements • Questions or Assumptions on RED cards “Topics that would block the discussion” • User Stories on YELLOW cards “We often split off separate stories to discuss at a later stage”
  38. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] How

    do we do Example Mapping? • Collaborative • Different perspectives • Short • Progressive focus • Consensus
  39. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] What’s

    a good example? • Concrete • All the necessary information • Illustrates the rule • Agreed
  40. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Add

    Recipe • What are our business rules? ◦ Validation ◦ State ◦ Logic • Let’s generate some examples...
  41. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Stories

    from Household View... • Generate download link • Sign up with invite code • Give access to account • Share account info / share balance • See balance • See overall income • Share/hide balance • Share future transactions • Share/hide future transactions
  42. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Add

    measurement to ingredient • Unit? • Amount? • Fractions? • No amount?
  43. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Add

    main recipe photos • Add one photo? Or More? • Which photo do we show? • How big can the photo be? • What formats do we support? • How do we determine format? • Watermarks? • How do we process the photos (bandwidth!) • Virus scan? • How do we store photos? (bandwidth, storage cost)
  44. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Get

    notified of comments / ratings • Mail? • Push? • Length of comment? • Show who rated? • How fast? • Can we lose a notification? • What if we can’t deliver a mail? • What if we can’t deliver 5 mails?
  45. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Calculate

    total preparation time • Each step has work time and wait time • Give total work time • Give total preparation time
  46. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Today

    • Example Map exercise • Formulation / Scenario writing overview • A first scenario together Break • Another scenario together • Breakout 1 Break • Breakout 2 & 3 Break • Open questions • Planning the follow-up
  47. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Practices

    Story Mapping Example Mapping Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’ Scenario writing
  48. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Examples

    can be formalised into Scenarios Scenario: Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ Scenario: Playlist without name gets next available slot Given existing Playlists | My Playlist #1 | | My Playlist #3 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #2’ 79
  49. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Scenario:

    Playlist without name is auto-numbered Given existing Playlists | My Playlist #1 | | My Playlist #2 | When a new playlist without name is added Then that new playlist is given the name ‘My Playlist #3’ function testPlaylistNameAutoNumber() { playlists.addAll(‘My Playlist #1’, ‘My Playlists #2’) playlists.add(‘’) expect(playlists.getAll()).toContain(‘My Playlist #3’) } pseudocode Scenarios are implemented at same level the functionality lives 80
  50. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] The

    anatomy of a Feature File Feature: <The name of a Feature> Some description of the feature that can be as long as you want… Rule: The Rule (from our example map), very new Scenario: <A descriptive of our scenario> Given: <a pre-existing state> When: <an action> Then: <an expected result>
  51. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios Business Language - Use terms from the business domain Real Data - Concrete, real data helps expose boundary conditions and assumptions Intention Revealing - Intent, not mechanics Essential - Do not include details that are incidental to this rule Focused - Only about one single rule, independent of others ‘Brief’ - short, five lines or fewer https://cucumber.io/blog/bdd/keep-your-scenarios-brief/
  52. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios Business Language - Use terms from the business domain Common anti-pattern: using terms that mean different things in different contexts (e.g. address, user, date, account)
  53. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Real

    Data - Concrete, real data helps expose boundary conditions and assumptions Common anti-pattern: scenario relies on the existence of specific production data (e.g. using an actual customer ID "1234", with the expectation that a customer with that ID will actually exist in the customer database). BRIEF Scenarios
  54. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios Intention Revealing - Intent, not mechanics Common anti-pattern: using UI terminology (e.g. click button, follow link).
  55. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios Essential - Do not include details that are incidental to this rule Common anti-pattern: including too much incidental detail (e.g. a rule that depends on the date should not be illustrated using date & time, unless the rule's behaviour may be affected by the time)
  56. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios Focused - Only about one single rule, independent of others Common anti-pattern: a scenario can start failing even if the rule that it illustrates has not changed (e.g. changing the interest rate of a loan causes a scenario that illustrates the day of the month that the interest payment will be taken to fail).
  57. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] BRIEF

    Scenarios ‘Brief’ - short, five lines or fewer Common anti-pattern: long scenarios that are never read by the product owner, because they can't understand them and see no value in them.
  58. Lagerweij Consultancy | Wouter Lagerweij | @wouterla | [email protected] Planning

    ahead • What feature will we Story Map together? • When? • Outcomes: ◦ Map ◦ Slices -> How small can we go? ◦ Stories ◦ Dependencies ◦ Plan: Example Mapping and Formulation sessions for stories in first slice