given/when/then -ready sprint planning - agilia conference€¦ · given/when/then-ready sprint...
TRANSCRIPT
![Page 1: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/1.jpg)
Given/When/Then-ready sprint planningwith Example Mapping
Agilia Budapest 201612/10/2016
Gáspár Nagycoach • trainer • bdd addict • creator of specflow
@gasparnagy • [email protected]
![Page 2: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/2.jpg)
Copyright © Gaspar Nagy
bdd addict
given.when.then
CAUTION!
bddaddict.com
on stage
![Page 3: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/3.jpg)
Copyright © Gaspar Nagy
This talk was inspired by…
![Page 4: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/4.jpg)
Copyright © Gaspar Nagy
What is BDD?
![Page 5: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/5.jpg)
Copyright © Gaspar Nagy
[HttpPost]public ActionResult Answer(int answer){
TriviaEntities db = new TriviaEntities();var question = db.FindQuestion(CurrentQuestion);
if (question.Type == QuestionType.Easy){
db.AddScore(question, user, 10);}else{
db.AddScore(question, user, 50);}
var model = new GameModel{ Score = db.GetScore(question, user) };
return View(model);}
implement
feedback
Classic model
![Page 6: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/6.jpg)
Copyright © Gaspar Nagy
Scenario: Correct easy answer scores 10
Given I register a team
When I submit a correct easy answer
Then my score should be 10
CollaborationAutomation with
Cucumber/SpecFlow
BDD Process
![Page 7: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/7.jpg)
Copyright © Gaspar Nagy
The Feature File
Scenario: Correct easy answer scores 10
Given I register a team
When I submit a correct easy answer
Then my score should be 10
Who writes
the scenarios?How do you
set the title of
the scenario?
Can I have
multiple when/then
steps?
![Page 8: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/8.jpg)
Copyright © Gaspar Nagy
If you have these questions you are probably on the wrong track…
![Page 9: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/9.jpg)
Copyright © Gaspar Nagy
The Sprint Planning
![Page 10: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/10.jpg)
Copyright © Gaspar Nagy
Demo: Planning the Pizza Selection Story
![Page 11: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/11.jpg)
Copyright © Gaspar Nagy
Explain the story as a PO
![Page 12: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/12.jpg)
Copyright © Gaspar Nagy
Let’s write a Gherkin from the result
Scenario: ...
Given ...
When ...
Then ...
![Page 13: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/13.jpg)
Copyright © Gaspar Nagy
De-briefing
• PO was unprepared
• We discussed the topics in a foreign language
• The domain was known, but not very exact
• Quality of notes?
• How easy it to write the first scenario?
• Quality of scenario?
![Page 14: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/14.jpg)
Copyright © Gaspar Nagy
An efficient collaboration…
![Page 15: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/15.jpg)
Copyright © Gaspar Nagy
Demo: Planning the Pizza Selection Story
![Page 16: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/16.jpg)
Copyright © Gaspar Nagy
Participate in the facilitated discussion as PO
![Page 17: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/17.jpg)
Copyright © Gaspar Nagy
Review
• What was different from the first time?
• Did we cover more or less functionality than the last time?
• What do you think the different coloured cards / stickies are supposed to represent?
• How did capturing each of those help to keep the discussions on track?
• Do you think the story is ready to implement now? Why?
![Page 18: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/18.jpg)
Copyright © Gaspar Nagy
Should be able to add a pizza to the basket
Scenario: Should be able to add a pizza to the basket
Given the following pizza menu
| name | ingredients |
| Aslak Hellesøy | Cucumber, Gherkin, Pickles |
| Uncle Bob | Chicken, Low cal cheese |
| Chris Matts | Garlic, Wasabi, Tomato |
And the shopping basket is empty
When I choose a “Chris Matts” pizza
Then my basket contains 1 “Chris Matts” pizza
![Page 19: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/19.jpg)
Copyright © Gaspar Nagy
Should be able to add extras to the chosen pizza
Scenario: Should be able to add extras to the chosen pizza
Given the following pizzas in the basket
| pizza | extras |
| Aslak Hellesøy | - |
| Chris Matts | - |
And the “Aslak Hellesøy” pizza is selected from the basket
When I add extra cheese
And I add extra cucumber
Then the basket should contain
| pizza | extras |
| Aslak Hellesøy | +cheese +cucumber |
| Chris Matts | - |
![Page 20: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/20.jpg)
Copyright © Gaspar Nagy
How It's Made
![Page 21: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/21.jpg)
Copyright © Gaspar Nagy
Collaborate on requirements!
Well guided planning meeting can improve the “BDD-efficiency” quite much
![Page 22: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/22.jpg)
Copyright © Gaspar Nagy
Example Mapping
http://bit.ly/examplemapping (Matt Wynne)
![Page 23: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/23.jpg)
Copyright © Gaspar Nagy
#0 – Choose a facilitator
• Someone needs to facilitate the discussion – not the PO
• The facilitation can be rotated so that everyone gets practice
• The facilitator can guide the discussion with• Asking questions
• Moderating (stopping?) discussions
• Everyone can ask of course…
![Page 24: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/24.jpg)
Copyright © Gaspar Nagy
#1 – Pick a guide line
• Choose a theme that you can use to order the questions
• The “sequence of actions” is usually good• ie. “What you do first?”
• If you use story mapping for planning the stories, this comes quite naturally
![Page 25: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/25.jpg)
Copyright © Gaspar Nagy
#2 – Keep collecting rules (acceptance criteria) and examples
• Once you hear an important rule/behavior/check, note it down as a rule and an illustrating example
• Don’t forget that an example is not necessarily text, but formulas, wireframes or anything that describes the required behavior
• Examples can help • understanding the topic
• discover misunderstandings
• keep the requirements real
![Page 26: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/26.jpg)
Copyright © Gaspar Nagy
#3 – Make notes visible to everyone
• Write them on index cards or stickies
• Using (and sharing on projector) a notepad, OneNote or SpecLog is also very good
• Pro: stored already in a searchable form, usually better visible (zoom), easy to go back to earlier notes
• Con: harder to get a full overview
• Stop the discussion while the rule/example is captured
• The team should have an agreement on the captured result
• Was this really what we were discussing about?
![Page 27: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/27.jpg)
Copyright © Gaspar Nagy
#4 – Collect questions
• If something cannot be answered or needs further research/investigation – capture it as a questions
• Captured questions can help • to avoid re-discussing the same topic again and again
• to have a clear list of topics we need to investigate
![Page 28: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/28.jpg)
Copyright © Gaspar Nagy
#5 – Split the story if necessary
• The map can help you to feel if the topics we have discussed are too much
![Page 29: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/29.jpg)
Copyright © Gaspar Nagy
+1 – Formulate the scenarios in Gherkin
• Not necessarily in the planning meeting
• Just before you start implementing the story works usually
• Don’t do it alone
• Try to find broader agreement especially for the first scenarios in a certain topic
• At this point, you are not discussing the behavior, but finalizing the ubiquitous language
• Discover more: Three Amigos
![Page 30: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/30.jpg)
Copyright © Gaspar Nagy
One page summary
#0 – Choose a facilitator
#1 – Pick a guide line
#2 – Keep collecting rules (acceptance criteria) and examples
#3 – Make notes visible to everyone
#4 – Collect questions
#5 – Split story if necessary
http://bit.ly/examplemapping(Matt Wynne)
![Page 31: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/31.jpg)
Copyright © Gaspar Nagy
What about my answers?
Scenario: Correct easy answer scores 10
Given I register a team
When I submit a correct easy answer
Then my score should be 10
Who writes
the scenarios?How do you
set the title of
the scenario?
Can I have
multiple when/then
steps?
![Page 32: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/32.jpg)
Copyright © Gaspar Nagy
The answers
• Who writes the scenarios?• It does not matter, because we are all on the same page
regarding the behavior. But it makes sense if a developer is typing it in with a tester or PO sitting next to him/her.
• How do you set the title of the scenario?• You never set it, you start from the acceptance criterion that
will be the title.
• Can I have multiple when/then steps?• The scenario is the formalization of an AC – a simple check.
For that you usually need only one when step and only one or two then steps.
![Page 33: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/33.jpg)
Copyright © Gaspar Nagy
Try is at home!
![Page 34: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/34.jpg)
Copyright © Gaspar Nagy
bdd addict
given.when.then
CAUTION!
bddaddict.com
newsletter
![Page 35: Given/When/Then -ready sprint planning - Agilia Conference€¦ · Given/When/Then-ready sprint planning with Example Mapping Agilia Budapest 2016 12/10/2016 Gáspár Nagy coach •](https://reader033.vdocuments.net/reader033/viewer/2022042315/5f03a7ba7e708231d40a1ed5/html5/thumbnails/35.jpg)
Gáspár Nagycoach • trainer • bdd addict • creator of specflow
@gasparnagy • [email protected]
Thank you!