SlideShare a Scribd company logo
1 of 35
Download to read offline
Given/When/Then-ready
sprint planning
Gáspár Nagy
coach • trainer • bdd addict • creator of specflow
@gasparnagy • gaspar@specsolutions.eu
What is BDD?
behavior driven development
desarrollo impulsado por el
comportamiento
development driven by behavior
[HttpPost]
public ActionResult Add(int bookId)
{
BookShopEntities db = new BookShopEntities();
var shoppingCart = GetShoppingCart();
var existingLine = shoppingCart.Lines.SingleOrDefault(l =>
l.Book.Id == bookId);
if (existingLine != null)
{
existingLine.Quantity++;
}
else
{
var book = db.Books.First(b => b.Id == bookId);
OrderLine newOrderLine = new OrderLine();
newOrderLine.Book = book;
newOrderLine.Quantity = 1;
shoppingCart.AddLineItem(newOrderLine);
}
ViewData.Model = shoppingCart;
return RedirectToAction("Index");
}
An Oversimplified BDD Process
implement
feedback
An Oversimplified BDD Process
Scenario: Books can be added to the shopping basket
Given the following books
| Author | Title |
| Martin Fowler | Analysis Patterns |
| Gojko Adzic | Bridging the Communication Gap |
And my shopping basket is empty
When I add the book “Analysis Patterns” to my shopping basket
Then my shopping basket should contain 1 copy of “Analysis Patterns”
The Feature File
Scenario: Books can be added to the shopping basket
Given the following books
| Author | Title |
| Martin Fowler | Analysis Patterns |
| Gojko Adzic | Bridging the Communication Gap |
And my shopping basket is empty
When I add the book “Analysis Patterns” to my shopping basket
Then my shopping basket should contain 1 copy of “Analysis Patterns”
The Feature File
Escenario: Los libros se pueden añadir a la cesta de la compra
Dadas los siguientes libros
| Author | Title |
| Martin Fowler | Analysis Patterns |
| Gojko Adzic | Bridging the Communication Gap |
Y mi cesta está vacía
Cuando agrego el libro "Analysis Patterns" a mi cesta
Entonces mi cesta debe contener 1 copia de “Analysis Patterns”
Who writes the
scenarios?
How do you set
the title of the
scenario?
Can I have multiple
when/then steps?
If you have these questions you are probably on
the wrong track…
THE SPRINT PLANNING
Demo: Planning the Pizza
Selection Story
Explain the story as a PO!
Let’s write a Gherkin from the result
Scenario: ...
Given ...
When ...
Then ...
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?
An efficient meeting…
Demo: Planning the Pizza
Selection Story
Participate in the facilitated
discussion as PO!
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?
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
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 | - |
HOW IT'S MADE
Collaborate on requirements!
Well guided planning meeting can improve
the “BDD-efficiency” quite much
Example Mapping
http://bit.ly/examplemapping (Matt Wynne)
#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…
#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
#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
#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?
#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
#5 – Split the story if necessary
• The map can help you to feel if the topics
we have discussed are too much
+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
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)
What about my answers?
Scenario: Books can be added to the shopping basket
Given the following books
| Author | Title |
| Martin Fowler | Analysis Patterns |
| Gojko Adzic | Bridging the Communication Gap |
And my shopping basket is empty
When I add the book “Analysis Patterns” to my shopping basket
Then my shopping basket should contain 1 copy of “Analysis Patterns”
Who writes the
scenarios? How do you set
the title of the
scenario?
Can I have multiple
when/then steps?
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.
Try it at home!
Thank you!
Gáspár Nagy
@gasparnagy
gaspar@specsolutions.eu
http://specsolutions.eu
More information on BDD at
http://bddaddict.com

More Related Content

Viewers also liked

Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Gáspár Nagy
 
The Power of Visuals
The Power of VisualsThe Power of Visuals
The Power of VisualsÁdám Nagy
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Gáspár Nagy
 
Introduction to the Improvement Kata
Introduction to the Improvement KataIntroduction to the Improvement Kata
Introduction to the Improvement KataMike Rother
 

Viewers also liked (6)

Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
 
The Power of Visuals
The Power of VisualsThe Power of Visuals
The Power of Visuals
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
 
Introduction to the Improvement Kata
Introduction to the Improvement KataIntroduction to the Improvement Kata
Introduction to the Improvement Kata
 
The Executives Guide
The Executives GuideThe Executives Guide
The Executives Guide
 

More from Gáspár Nagy

BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyGáspár Nagy
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Gáspár Nagy
 
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)Gáspár Nagy
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Gáspár Nagy
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Gáspár Nagy
 
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Gáspár Nagy
 
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)Gáspár Nagy
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Gáspár Nagy
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Gáspár Nagy
 
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Gáspár Nagy
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Gáspár Nagy
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...Gáspár Nagy
 

More from Gáspár Nagy (12)

BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing Strategy
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023
 
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
 
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
 
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
 
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
 

Recently uploaded

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 

Recently uploaded (20)

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 

Given/When/Then-ready sprint planning (expo:QA'16)

  • 1. Given/When/Then-ready sprint planning Gáspár Nagy coach • trainer • bdd addict • creator of specflow @gasparnagy • gaspar@specsolutions.eu
  • 2.
  • 4. behavior driven development desarrollo impulsado por el comportamiento development driven by behavior
  • 5. [HttpPost] public ActionResult Add(int bookId) { BookShopEntities db = new BookShopEntities(); var shoppingCart = GetShoppingCart(); var existingLine = shoppingCart.Lines.SingleOrDefault(l => l.Book.Id == bookId); if (existingLine != null) { existingLine.Quantity++; } else { var book = db.Books.First(b => b.Id == bookId); OrderLine newOrderLine = new OrderLine(); newOrderLine.Book = book; newOrderLine.Quantity = 1; shoppingCart.AddLineItem(newOrderLine); } ViewData.Model = shoppingCart; return RedirectToAction("Index"); } An Oversimplified BDD Process implement feedback
  • 6. An Oversimplified BDD Process Scenario: Books can be added to the shopping basket Given the following books | Author | Title | | Martin Fowler | Analysis Patterns | | Gojko Adzic | Bridging the Communication Gap | And my shopping basket is empty When I add the book “Analysis Patterns” to my shopping basket Then my shopping basket should contain 1 copy of “Analysis Patterns”
  • 7. The Feature File Scenario: Books can be added to the shopping basket Given the following books | Author | Title | | Martin Fowler | Analysis Patterns | | Gojko Adzic | Bridging the Communication Gap | And my shopping basket is empty When I add the book “Analysis Patterns” to my shopping basket Then my shopping basket should contain 1 copy of “Analysis Patterns”
  • 8. The Feature File Escenario: Los libros se pueden añadir a la cesta de la compra Dadas los siguientes libros | Author | Title | | Martin Fowler | Analysis Patterns | | Gojko Adzic | Bridging the Communication Gap | Y mi cesta está vacía Cuando agrego el libro "Analysis Patterns" a mi cesta Entonces mi cesta debe contener 1 copia de “Analysis Patterns” Who writes the scenarios? How do you set the title of the scenario? Can I have multiple when/then steps?
  • 9. If you have these questions you are probably on the wrong track…
  • 11. Demo: Planning the Pizza Selection Story
  • 12. Explain the story as a PO!
  • 13. Let’s write a Gherkin from the result Scenario: ... Given ... When ... Then ...
  • 14. 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?
  • 16. Demo: Planning the Pizza Selection Story
  • 17. Participate in the facilitated discussion as PO!
  • 18. 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?
  • 19. 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
  • 20. 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 | - |
  • 22. Collaborate on requirements! Well guided planning meeting can improve the “BDD-efficiency” quite much
  • 24. #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…
  • 25. #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
  • 26. #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
  • 27. #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?
  • 28. #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
  • 29. #5 – Split the story if necessary • The map can help you to feel if the topics we have discussed are too much
  • 30. +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
  • 31. 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)
  • 32. What about my answers? Scenario: Books can be added to the shopping basket Given the following books | Author | Title | | Martin Fowler | Analysis Patterns | | Gojko Adzic | Bridging the Communication Gap | And my shopping basket is empty When I add the book “Analysis Patterns” to my shopping basket Then my shopping basket should contain 1 copy of “Analysis Patterns” Who writes the scenarios? How do you set the title of the scenario? Can I have multiple when/then steps?
  • 33. 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.
  • 34. Try it at home!