SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
FROM STAKEHOLDER EXAMPLES TO LIVING DOCUMENTATION
Specification-By-Example
with Gherkin
Christian Hassa - ch@techtalk.ch - Twitter: @chrishassa
Swiss Requirements Day 2013, June 19th 2013
TechTalk Team
5
• Describe user needs or features
• Unit of planning/prioritization
Help to say “Not now” – instead of “No”
• Future options for evolving the system
• Reminder for a conversation
• Deferring detail to the
last responsible moment
What makes user stories agile?
6
Refining
User Stories
7
Impact Mapping
Story Mapping
Specification-By-Example
Establishing a shared understanding
Why?
How?
Code
Epics
Deliverables, Outputs
Impacts, Outcomes
Easier to define upfront Harder to define upfront
User Activities
User Stories
Goals
Acceptance
Criteria
Bug
reports
Isolated,
formalized
examples
Examples
Reminder
for a
conversation
8
Collecting Acceptance Criteria
“I would try to put a book into the
shopping cart …”
“I would try to remove a book
from the shopping cart…”
“I’d check whether the shopping cart
is empty, when I enter the shop …”
Books can be added to
shopping cart.
Books can be removed from
shopping cart.
Shopping cart should be empty
when entering the shop.
... ? …
As a potential customer
I want to collect books in a shopping cart
So that I can order several books at once.
“Imagine this story is
already implemented:
how would you verify it?”
“I would try to add 1000 books to
the shopping cart …”
9
Using
examples
11
UI wire frames,
existing UI
rules, key examples
existing artifacts,
samples
Different models of examples
12
Discussing examples …
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder = new Order(newCustomer);
newOrder.AddBook(
Catalog.Find(“ISBN-0955683610”)
);
Assert.Equals(33.75,
newOrder.Subtotal);
}
Register as “bart_bookworm”
Go to “/catalog/search”
Enter “ISBN-0955683610”
Click “Search”
Click “Add to Cart”
Click “View Cart”
Verify “Subtotal” is “$33.75”
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
13
Specification-by-Example
Examples …
• make abstract descriptions
better understandable
However …
• examples are usually not formally
exchanged or documented
Brian Marick
Examples Tests
Requirements
consist of
describe verify
fulfillment of
14
Exploring a user need with examples
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping Gojko Adzic
Explore It! Elisabeth Hendrickson
Competitive Engineering Tom Gilb
… I want to find books in the catalogue by author and title
Search for … Books found …
Spec Specification-By-Example
Hend Explore It!
et Explore It!, Competitive Engineering
Context
Action
Assertion
15
Key examples: Breaking the model
Books in catalogue:
Title Author
Specification-By-Example Gojko Adzic
Impact Mapping Gojko Adzic
Explore It! Elisabeth Hendrickson
Competitive Engineering Tom Gilb
… I want to find books in the catalogue by author and title
Search for … Books found …
Spec Specification-By-Example
Hend Explore It!
et Explore It!, Competitive Engineering
What happens, if I search for
“Explore Specification”?
Can I search for single
characters, e.g. “e”?
Is the number of search results
limited, or paged?
Is the search also performed in the
sub-title of a book?
16
Discussion of acceptance criteria
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder = new Order(newCustomer);
newOrder.AddBook(
Catalog.Find(“ISBN-0955683610”)
);
Assert.Equals(33.75,
newOrder.Subtotal);
}
Register as “bart_bookworm”
Go to “/catalog/search”
Enter “ISBN-0955683610”
Click “Search”
Click “Add to Cart”
Click “View Cart”
Verify “Subtotal” is “$33.75”
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
17
… illustrated with formalized examples
Given the user has not ordered yet
When the user adds a book with the price of EUR 37.5
into the shopping cart
Then the shopping cart sub-total is EUR 33.75.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
18
Discover hidden assumptions
Actually, this is not quite right:
Books on sale should be excluded.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
19
Collaboration: 3 amigos
“Happy
Path”
Technical
feasability
Exceptions,
border cases
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
20
Abstract acceptance criteria
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Books can be removed from the shopping basket
Shopping basket is initially empty
The same book can be added multiple times to the shopping
basket
21
Examples in Gherkin
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Given my shopping basket is empty
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 1 copy of “Harry Potter”
22
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Examples in Gherkin
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
The same book can be added multiple times to the shopping basket
23
The same book can be added multiple times to the shopping basket
Structure of examples
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
Title: Describes intention/abstract acceptance criterion
Arrange: Context, initial state of the system
Act: Execution of the feature
Assert: Assertion of observable behaviour
And I should see the warning: “Book already existed in basket”
Triple-A
constraint
“Checks”
Chaining
up steps
24
Life time of
examples
25
Purpose of the examples
• Shared understanding:
acceptance criteria
• Documentation:
system details
• Regression-tests:
violated assumptions
26
Continuous validation with automation
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
System
„Step Definitions“ are binding individual steps
to an automatable interface of the application.
Automatable
interface
UI
Automation
Automation does not necessarily have to bind to the UI.
Automatability of system is supported/evolving with development.
27
Demo
http://www.specflow.org
Gherkin automation for .NET
• Visual Studio plugin (VS-Gallery)
• NuGet Package
32
Living
documentation
33
Living documentation
Drill into Details
(Gherkin scenarios)
Overview
(Story Map)
42
Summary
43
Conclusions
• Examples
• Illustrate abstract requirements
• Trigger new questions: collaborative discovery
• Shared understanding
• Living documentation
• Automatically validated examples
• Business readable regression tests
• Reliable source of truth
• Gherkin based automated examples
• Open source, cross-platform
• Requirement details versioned with source code
• Similar tools: Fit/Fitnesse, Robot Framework, JBehave
44
Gherkin based automation tools
www.cukes.info
www.behat.org
Ruby, Java, JavaScript, C++
www.specflow.org
.NET, Mono, Silverlight, WP7
PHP
45
Books
Gojko Adzic
Bridiging the
Communication Gap
Gojko Adzic
Specification by
Example
Elisabeth Hendrickson
Explore IT!
46
47
Christian Hassa: ch@techtalk.ch - @chrishassa

Contenu connexe

Tendances

How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User StoriesShriKant Vashishtha
 
Startup DNA: the formula behind successful startups in Silicon Valley (update...
Startup DNA: the formula behind successful startups in Silicon Valley (update...Startup DNA: the formula behind successful startups in Silicon Valley (update...
Startup DNA: the formula behind successful startups in Silicon Valley (update...Yevgeniy Brikman
 
Scaling Scrum using Lean/Kanban in Amdocs
Scaling Scrum using Lean/Kanban in AmdocsScaling Scrum using Lean/Kanban in Amdocs
Scaling Scrum using Lean/Kanban in AmdocsYuval Yeret
 
Ten Concrete Techniques to Split User Stories
Ten Concrete Techniques to Split User StoriesTen Concrete Techniques to Split User Stories
Ten Concrete Techniques to Split User StoriesNight Wolf
 
Elevator Pitch
Elevator PitchElevator Pitch
Elevator Pitchfadey
 
How to create your Minimum Viable Product - Raff Paquin
How to create your Minimum Viable Product - Raff PaquinHow to create your Minimum Viable Product - Raff Paquin
How to create your Minimum Viable Product - Raff PaquinRaff Paquin
 
Maturing Agile SDLC & workflow improvements
Maturing Agile SDLC & workflow improvementsMaturing Agile SDLC & workflow improvements
Maturing Agile SDLC & workflow improvementsMichael J Geiser
 
User story and splitting workshop
User story and splitting workshopUser story and splitting workshop
User story and splitting workshopBrian Sjoberg
 
Cloud foundry: The Platform for Forging Cloud Native Applications
Cloud foundry: The Platform for Forging Cloud Native ApplicationsCloud foundry: The Platform for Forging Cloud Native Applications
Cloud foundry: The Platform for Forging Cloud Native ApplicationsChip Childers
 
Tech Lead Skills for Developers
Tech Lead Skills for DevelopersTech Lead Skills for Developers
Tech Lead Skills for DevelopersThoughtworks
 
Summary of 'The Mom Test' (v2 2013-11-05)
Summary of 'The Mom Test' (v2 2013-11-05)Summary of 'The Mom Test' (v2 2013-11-05)
Summary of 'The Mom Test' (v2 2013-11-05)Max Völkel
 
Product Discovery Canvas
Product Discovery CanvasProduct Discovery Canvas
Product Discovery CanvasAkili King
 
Agile and Lean Software Development
Agile and Lean Software DevelopmentAgile and Lean Software Development
Agile and Lean Software DevelopmentTathagat Varma
 
Testing Business Ideas by David Bland & Alex Osterwalder
Testing Business Ideas by David Bland & Alex Osterwalder Testing Business Ideas by David Bland & Alex Osterwalder
Testing Business Ideas by David Bland & Alex Osterwalder Peerasak C.
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
How to survive the zombie scrum apocalypse
How to survive the zombie scrum apocalypse How to survive the zombie scrum apocalypse
How to survive the zombie scrum apocalypse Mia Horrigan
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Ricard Clau
 
The Science of Story: How Brands Can Use Storytelling To Get More Customers
The Science of Story: How Brands Can Use Storytelling To Get More CustomersThe Science of Story: How Brands Can Use Storytelling To Get More Customers
The Science of Story: How Brands Can Use Storytelling To Get More CustomersDigital Surgeons
 

Tendances (20)

How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User Stories
 
Startup DNA: the formula behind successful startups in Silicon Valley (update...
Startup DNA: the formula behind successful startups in Silicon Valley (update...Startup DNA: the formula behind successful startups in Silicon Valley (update...
Startup DNA: the formula behind successful startups in Silicon Valley (update...
 
Scaling Scrum using Lean/Kanban in Amdocs
Scaling Scrum using Lean/Kanban in AmdocsScaling Scrum using Lean/Kanban in Amdocs
Scaling Scrum using Lean/Kanban in Amdocs
 
Ten Concrete Techniques to Split User Stories
Ten Concrete Techniques to Split User StoriesTen Concrete Techniques to Split User Stories
Ten Concrete Techniques to Split User Stories
 
Elevator Pitch
Elevator PitchElevator Pitch
Elevator Pitch
 
Lean startup 101
Lean startup 101Lean startup 101
Lean startup 101
 
Lean Startup 101
Lean Startup 101Lean Startup 101
Lean Startup 101
 
How to create your Minimum Viable Product - Raff Paquin
How to create your Minimum Viable Product - Raff PaquinHow to create your Minimum Viable Product - Raff Paquin
How to create your Minimum Viable Product - Raff Paquin
 
Maturing Agile SDLC & workflow improvements
Maturing Agile SDLC & workflow improvementsMaturing Agile SDLC & workflow improvements
Maturing Agile SDLC & workflow improvements
 
User story and splitting workshop
User story and splitting workshopUser story and splitting workshop
User story and splitting workshop
 
Cloud foundry: The Platform for Forging Cloud Native Applications
Cloud foundry: The Platform for Forging Cloud Native ApplicationsCloud foundry: The Platform for Forging Cloud Native Applications
Cloud foundry: The Platform for Forging Cloud Native Applications
 
Tech Lead Skills for Developers
Tech Lead Skills for DevelopersTech Lead Skills for Developers
Tech Lead Skills for Developers
 
Summary of 'The Mom Test' (v2 2013-11-05)
Summary of 'The Mom Test' (v2 2013-11-05)Summary of 'The Mom Test' (v2 2013-11-05)
Summary of 'The Mom Test' (v2 2013-11-05)
 
Product Discovery Canvas
Product Discovery CanvasProduct Discovery Canvas
Product Discovery Canvas
 
Agile and Lean Software Development
Agile and Lean Software DevelopmentAgile and Lean Software Development
Agile and Lean Software Development
 
Testing Business Ideas by David Bland & Alex Osterwalder
Testing Business Ideas by David Bland & Alex Osterwalder Testing Business Ideas by David Bland & Alex Osterwalder
Testing Business Ideas by David Bland & Alex Osterwalder
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
How to survive the zombie scrum apocalypse
How to survive the zombie scrum apocalypse How to survive the zombie scrum apocalypse
How to survive the zombie scrum apocalypse
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
The Science of Story: How Brands Can Use Storytelling To Get More Customers
The Science of Story: How Brands Can Use Storytelling To Get More CustomersThe Science of Story: How Brands Can Use Storytelling To Get More Customers
The Science of Story: How Brands Can Use Storytelling To Get More Customers
 

En vedette

Tutorial: Story Maps in practice: enable early feedback to build what really ...
Tutorial: Story Maps in practice: enable early feedback to build what really ...Tutorial: Story Maps in practice: enable early feedback to build what really ...
Tutorial: Story Maps in practice: enable early feedback to build what really ...Christian Hassa
 
The Gherkin: Case Study
The Gherkin: Case StudyThe Gherkin: Case Study
The Gherkin: Case StudyVikram Bengani
 
So What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With TestingSo What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With Testingsjmarsh
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testingnyccamp
 
How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.Christian Hassa
 
Build-Measure-Learn: Was macht agile Methoden erfolgreich?
Build-Measure-Learn: Was macht agile Methoden erfolgreich?Build-Measure-Learn: Was macht agile Methoden erfolgreich?
Build-Measure-Learn: Was macht agile Methoden erfolgreich?Christian Hassa
 
From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...Christian Hassa
 
Impact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltImpact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltChristian Hassa
 
Story Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernStory Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernChristian Hassa
 
Live it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileLive it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileChristian Hassa
 
Web Acceptance Testing with Behat
Web Acceptance Testing with BehatWeb Acceptance Testing with Behat
Web Acceptance Testing with BehatFabian Kiss
 
Impact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltImpact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltChristian Hassa
 
Story Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltStory Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltChristian Hassa
 
Tutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinTutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinChristian Hassa
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowChristian Hassa
 
User Story Mapping (2008)
User Story Mapping (2008)User Story Mapping (2008)
User Story Mapping (2008)Jeff Patton
 

En vedette (20)

Tutorial: Story Maps in practice: enable early feedback to build what really ...
Tutorial: Story Maps in practice: enable early feedback to build what really ...Tutorial: Story Maps in practice: enable early feedback to build what really ...
Tutorial: Story Maps in practice: enable early feedback to build what really ...
 
The Gherkin: Case Study
The Gherkin: Case StudyThe Gherkin: Case Study
The Gherkin: Case Study
 
So What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With TestingSo What Do Cucumbers Have To Do With Testing
So What Do Cucumbers Have To Do With Testing
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testing
 
BDD in PHP - Behat
BDD in PHP - BehatBDD in PHP - Behat
BDD in PHP - Behat
 
How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.
 
Build-Measure-Learn: Was macht agile Methoden erfolgreich?
Build-Measure-Learn: Was macht agile Methoden erfolgreich?Build-Measure-Learn: Was macht agile Methoden erfolgreich?
Build-Measure-Learn: Was macht agile Methoden erfolgreich?
 
BDD with Behat
BDD with BehatBDD with Behat
BDD with Behat
 
From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...
 
Impact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltImpact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zählt
 
Story Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernStory Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG Bern
 
Live it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileLive it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into Agile
 
Web Acceptance Testing with Behat
Web Acceptance Testing with BehatWeb Acceptance Testing with Behat
Web Acceptance Testing with Behat
 
Impact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltImpact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zählt
 
Upcoming events 2017
Upcoming events 2017Upcoming events 2017
Upcoming events 2017
 
Story Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltStory Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zählt
 
Tutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinTutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with Gherkin
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlow
 
Agile Requirements
Agile RequirementsAgile Requirements
Agile Requirements
 
User Story Mapping (2008)
User Story Mapping (2008)User Story Mapping (2008)
User Story Mapping (2008)
 

Similaire à Specification-By-Example with Gherkin

Agile requirements management
Agile requirements managementAgile requirements management
Agile requirements managementChristian Hassa
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with GherkinChristian Hassa
 
BDD, Gherkin, Cucumber and why we need it.
BDD, Gherkin, Cucumber and why we need it.BDD, Gherkin, Cucumber and why we need it.
BDD, Gherkin, Cucumber and why we need it.AlexOsadchyy
 
«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»Provectus
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with GherkinChristian Hassa
 
Presentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdPresentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdIdeaScale
 
How 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentHow 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentPhase2
 
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham IbrahimMahmoud Bahgat
 
Creative and Innovative Thinking Skills
Creative and Innovative Thinking SkillsCreative and Innovative Thinking Skills
Creative and Innovative Thinking SkillsISHTIYAQUE AHMED
 
QA Fest 2015. Gáspár Nagy. BDD Crash Course for Testers
QA Fest 2015. Gáspár Nagy. BDD Crash Course for TestersQA Fest 2015. Gáspár Nagy. BDD Crash Course for Testers
QA Fest 2015. Gáspár Nagy. BDD Crash Course for TestersQAFest
 
Making The Most of Social Media – Drew Spencer Blackbridge Communications
Making The Most of Social Media – Drew Spencer Blackbridge CommunicationsMaking The Most of Social Media – Drew Spencer Blackbridge Communications
Making The Most of Social Media – Drew Spencer Blackbridge CommunicationsBlackbridge Communications
 
Creating a Great Portfolio Site
Creating a Great Portfolio SiteCreating a Great Portfolio Site
Creating a Great Portfolio SiteMel Choyce
 
Same and different - architectures for mass-uniqueness
Same and different - architectures for mass-uniquenessSame and different - architectures for mass-uniqueness
Same and different - architectures for mass-uniquenessTetradian Consulting
 
The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...
 The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S... The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...
The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...Seattle Interactive Conference
 
Product Management - much more than coding and designing
Product Management - much more than coding and designingProduct Management - much more than coding and designing
Product Management - much more than coding and designingJusto Hidalgo
 
Agile and innovation (and tea)
Agile and innovation (and tea)Agile and innovation (and tea)
Agile and innovation (and tea)Kevin Foad
 
Ixd ab 73-dave_hora-research
Ixd ab 73-dave_hora-researchIxd ab 73-dave_hora-research
Ixd ab 73-dave_hora-researchDave Hora
 
A designers guide to research pres
A designers guide to research presA designers guide to research pres
A designers guide to research presVirtu Institute
 

Similaire à Specification-By-Example with Gherkin (20)

Agile requirements management
Agile requirements managementAgile requirements management
Agile requirements management
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with Gherkin
 
BDD, Gherkin, Cucumber and why we need it.
BDD, Gherkin, Cucumber and why we need it.BDD, Gherkin, Cucumber and why we need it.
BDD, Gherkin, Cucumber and why we need it.
 
«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with Gherkin
 
Presentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdPresentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the Crowd
 
Business Model Assumptions by Nick De Mey
Business Model Assumptions by Nick De MeyBusiness Model Assumptions by Nick De Mey
Business Model Assumptions by Nick De Mey
 
How 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentHow 'Open' Changes Product Development
How 'Open' Changes Product Development
 
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim
15th Jeddah Marketing Club (Lean Marketing Creativity) by Dr. Haytham Ibrahim
 
Creative and Innovative Thinking Skills
Creative and Innovative Thinking SkillsCreative and Innovative Thinking Skills
Creative and Innovative Thinking Skills
 
QA Fest 2015. Gáspár Nagy. BDD Crash Course for Testers
QA Fest 2015. Gáspár Nagy. BDD Crash Course for TestersQA Fest 2015. Gáspár Nagy. BDD Crash Course for Testers
QA Fest 2015. Gáspár Nagy. BDD Crash Course for Testers
 
Make Great Products
Make Great ProductsMake Great Products
Make Great Products
 
Making The Most of Social Media – Drew Spencer Blackbridge Communications
Making The Most of Social Media – Drew Spencer Blackbridge CommunicationsMaking The Most of Social Media – Drew Spencer Blackbridge Communications
Making The Most of Social Media – Drew Spencer Blackbridge Communications
 
Creating a Great Portfolio Site
Creating a Great Portfolio SiteCreating a Great Portfolio Site
Creating a Great Portfolio Site
 
Same and different - architectures for mass-uniqueness
Same and different - architectures for mass-uniquenessSame and different - architectures for mass-uniqueness
Same and different - architectures for mass-uniqueness
 
The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...
 The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S... The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...
The Magic Pitch: What You Can Learn From Crowdfunding to Tell Your Story | S...
 
Product Management - much more than coding and designing
Product Management - much more than coding and designingProduct Management - much more than coding and designing
Product Management - much more than coding and designing
 
Agile and innovation (and tea)
Agile and innovation (and tea)Agile and innovation (and tea)
Agile and innovation (and tea)
 
Ixd ab 73-dave_hora-research
Ixd ab 73-dave_hora-researchIxd ab 73-dave_hora-research
Ixd ab 73-dave_hora-research
 
A designers guide to research pres
A designers guide to research presA designers guide to research pres
A designers guide to research pres
 

Plus de Christian Hassa

Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Christian Hassa
 
Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Christian Hassa
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungChristian Hassa
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungChristian Hassa
 
Scrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingScrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingChristian Hassa
 
Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Christian Hassa
 
Impact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungImpact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungChristian Hassa
 
Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Christian Hassa
 
Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Christian Hassa
 
Impact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersImpact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersChristian Hassa
 
How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.Christian Hassa
 

Plus de Christian Hassa (14)

Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
 
Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler Entwicklung
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler Entwicklung
 
Scrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingScrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact Mapping
 
Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!
 
Impact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungImpact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile Entwicklung
 
Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)
 
Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)
 
Impact Map Your Project
Impact Map Your ProjectImpact Map Your Project
Impact Map Your Project
 
Impact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersImpact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really matters
 
How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.
 
Story Maps in practice
Story Maps in practiceStory Maps in practice
Story Maps in practice
 
Agiles Testen (German)
Agiles Testen (German)Agiles Testen (German)
Agiles Testen (German)
 

Dernier

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Specification-By-Example with Gherkin

  • 1. FROM STAKEHOLDER EXAMPLES TO LIVING DOCUMENTATION Specification-By-Example with Gherkin Christian Hassa - ch@techtalk.ch - Twitter: @chrishassa Swiss Requirements Day 2013, June 19th 2013
  • 3. 5 • Describe user needs or features • Unit of planning/prioritization Help to say “Not now” – instead of “No” • Future options for evolving the system • Reminder for a conversation • Deferring detail to the last responsible moment What makes user stories agile?
  • 5. 7 Impact Mapping Story Mapping Specification-By-Example Establishing a shared understanding Why? How? Code Epics Deliverables, Outputs Impacts, Outcomes Easier to define upfront Harder to define upfront User Activities User Stories Goals Acceptance Criteria Bug reports Isolated, formalized examples Examples Reminder for a conversation
  • 6. 8 Collecting Acceptance Criteria “I would try to put a book into the shopping cart …” “I would try to remove a book from the shopping cart…” “I’d check whether the shopping cart is empty, when I enter the shop …” Books can be added to shopping cart. Books can be removed from shopping cart. Shopping cart should be empty when entering the shop. ... ? … As a potential customer I want to collect books in a shopping cart So that I can order several books at once. “Imagine this story is already implemented: how would you verify it?” “I would try to add 1000 books to the shopping cart …”
  • 8. 11 UI wire frames, existing UI rules, key examples existing artifacts, samples Different models of examples
  • 9. 12 Discussing examples … public void TestInitialOrderDiscount() { Customer newCustomer = new Customer(); Order newOrder = new Order(newCustomer); newOrder.AddBook( Catalog.Find(“ISBN-0955683610”) ); Assert.Equals(33.75, newOrder.Subtotal); } Register as “bart_bookworm” Go to “/catalog/search” Enter “ISBN-0955683610” Click “Search” Click “Add to Cart” Click “View Cart” Verify “Subtotal” is “$33.75” We would like to encourage new users to buy in our shop. Therefore we offer 10% discount for their first order. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 10. 13 Specification-by-Example Examples … • make abstract descriptions better understandable However … • examples are usually not formally exchanged or documented Brian Marick Examples Tests Requirements consist of describe verify fulfillment of
  • 11. 14 Exploring a user need with examples Books in catalogue: Title Author Specification-By-Example Gojko Adzic Impact Mapping Gojko Adzic Explore It! Elisabeth Hendrickson Competitive Engineering Tom Gilb … I want to find books in the catalogue by author and title Search for … Books found … Spec Specification-By-Example Hend Explore It! et Explore It!, Competitive Engineering Context Action Assertion
  • 12. 15 Key examples: Breaking the model Books in catalogue: Title Author Specification-By-Example Gojko Adzic Impact Mapping Gojko Adzic Explore It! Elisabeth Hendrickson Competitive Engineering Tom Gilb … I want to find books in the catalogue by author and title Search for … Books found … Spec Specification-By-Example Hend Explore It! et Explore It!, Competitive Engineering What happens, if I search for “Explore Specification”? Can I search for single characters, e.g. “e”? Is the number of search results limited, or paged? Is the search also performed in the sub-title of a book?
  • 13. 16 Discussion of acceptance criteria public void TestInitialOrderDiscount() { Customer newCustomer = new Customer(); Order newOrder = new Order(newCustomer); newOrder.AddBook( Catalog.Find(“ISBN-0955683610”) ); Assert.Equals(33.75, newOrder.Subtotal); } Register as “bart_bookworm” Go to “/catalog/search” Enter “ISBN-0955683610” Click “Search” Click “Add to Cart” Click “View Cart” Verify “Subtotal” is “$33.75” We would like to encourage new users to buy in our shop. Therefore we offer 10% discount for their first order. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 14. 17 … illustrated with formalized examples Given the user has not ordered yet When the user adds a book with the price of EUR 37.5 into the shopping cart Then the shopping cart sub-total is EUR 33.75. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 15. 18 Discover hidden assumptions Actually, this is not quite right: Books on sale should be excluded. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 16. 19 Collaboration: 3 amigos “Happy Path” Technical feasability Exceptions, border cases Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 17. 20 Abstract acceptance criteria As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Books can be removed from the shopping basket Shopping basket is initially empty The same book can be added multiple times to the shopping basket
  • 18. 21 Examples in Gherkin As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Given my shopping basket is empty When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 1 copy of “Harry Potter”
  • 19. 22 As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Examples in Gherkin Given my shopping basket contains 1 copy of “Harry Potter” When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” The same book can be added multiple times to the shopping basket
  • 20. 23 The same book can be added multiple times to the shopping basket Structure of examples Given my shopping basket contains 1 copy of “Harry Potter” When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” Title: Describes intention/abstract acceptance criterion Arrange: Context, initial state of the system Act: Execution of the feature Assert: Assertion of observable behaviour And I should see the warning: “Book already existed in basket” Triple-A constraint “Checks” Chaining up steps
  • 22. 25 Purpose of the examples • Shared understanding: acceptance criteria • Documentation: system details • Regression-tests: violated assumptions
  • 23. 26 Continuous validation with automation Given my shopping basket contains 1 copy of “Harry Potter” When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” System „Step Definitions“ are binding individual steps to an automatable interface of the application. Automatable interface UI Automation Automation does not necessarily have to bind to the UI. Automatability of system is supported/evolving with development.
  • 24. 27 Demo http://www.specflow.org Gherkin automation for .NET • Visual Studio plugin (VS-Gallery) • NuGet Package
  • 26. 33 Living documentation Drill into Details (Gherkin scenarios) Overview (Story Map)
  • 28. 43 Conclusions • Examples • Illustrate abstract requirements • Trigger new questions: collaborative discovery • Shared understanding • Living documentation • Automatically validated examples • Business readable regression tests • Reliable source of truth • Gherkin based automated examples • Open source, cross-platform • Requirement details versioned with source code • Similar tools: Fit/Fitnesse, Robot Framework, JBehave
  • 29. 44 Gherkin based automation tools www.cukes.info www.behat.org Ruby, Java, JavaScript, C++ www.specflow.org .NET, Mono, Silverlight, WP7 PHP
  • 30. 45 Books Gojko Adzic Bridiging the Communication Gap Gojko Adzic Specification by Example Elisabeth Hendrickson Explore IT!
  • 31. 46