SlideShare ist ein Scribd-Unternehmen logo
1 von 31
The BDD Way
Speculate1
Testers
Developers
Business
Illustrate2
Product Backlog,
Goals, Capabilities and Features
Formulate3
User Stories with acceptance criteria
Automate4
Implement
and verify
Developers
and Testers
Executable Specifications
Demonstrate5
Testers
Developers
Business
Passing Automated
Acceptance Tests
Validate6
Customers
or Users
Potentially shippable
product increment
Learning
and Feedback
Documentation
Automated
Tests
Business
Readable
Specification
Gherkin
3 Artefacts in 1
Documentation
Automated
Tests
Business
Readable
Specification
Gherkin
Heuristics for great “Reading
Specs”
Asserts the
behaviour,
doesn’t list
instructions to
the reader.
Uses domain
concepts and
language, not
technical
implementation.
Every reader
should easily
understand its
purpose and
dialogue.
When it fails,
you quickly
know why and
trust the
outcome.
Concise,
focused with no
unnecessary
verbiage.
Declarative,
not imperative
Business
behaviour,
not
implementati
on
Easy to
understand
Fails
purposefully
and
informatively
Essential and
concise, not
incidental and
verbose
A selection of our
favorites
Gherkin
Refactoring
Patterns
Distilling
Descripting
De-UI-ication
De-UI-ication
1. Identify the business intent
behind the clicks and selects
2. Group UI interactions into
business tasks
3. Replace references to the
user interface by descriptions of
the user’s intent
Descripting
1. Clarify vague or imprecise
checks
2. Articulate the real scenario
goals in the form of clear and
testable outcomes
3. Focus each scenario on a
single rule
Distilling
1. Remove irrelevant detail
2. Highlight the essential
information
3. Connect the outcomes directly to
the inputs and actions
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they navigate to the Tickets tab
And they click “New”
And they select “New Ticket”
And they fill in the mandatory fields
And they click on “Create”
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they navigate to the Tickets tab
And they click “New”
And they select “New Ticket”
And they fill in the mandatory fields
And they click on “Create”
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
De-UI-ication
1. Identify the business intent behind the clicks and selects
2. Group UI interactions into business tasks
3. Replace references to the user interface by descriptions of the user’s intent
Descripting
1. Clarify vague or imprecise checks
2. Articulate the real scenario goals in the form of clear and testable
outcomes
3. Focus each scenario on a single rule
Distilling
1. Remove irrelevant detail
2. Highlight the essential information
3. Connect the outcomes directly to the inputs and actions
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they navigate to the Tickets tab
And they click “New”
And they select “New Ticket”
And they fill in the mandatory fields
And they click on “Create”
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
De-UI-ication
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they navigate to the Tickets tab
And they click “New”
And they select “New Ticket”
And they fill in the mandatory fields
And they click on “Create”
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
De-UI-ication
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
De-UI-ication
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then check that the ticket is correctly displayed
And the ticket status dropdown should show “Open”
And then they click Logout
And the window closes
De-UI-ication
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then check that the ticket is correctly displayed
And the ticket should be “Open”
De-UI-ication
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then check that the ticket is correctly displayed
And the ticket should be “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then check that the ticket is correctly displayed
And the ticket should be “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then a new ticket should be raised
And the ticket should be “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given a User Logs in as “SupportUser123”
And a password of “Passw0rd”
And verify they are a Support User
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha the Support User logs in as “SupportUser123”
And a password of “Passw0rd”
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Descripting
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha the Support User logs in as “SupportUser123”
And a password of “Passw0rd”
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Distilling
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha the Support User logs in as “SupportUser123”
And a password of “Passw0rd”
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Distilling
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha the Support User is logged in
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Distilling
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha the Support User is logged in
When they create a new ticket with valid details
Then a new ticket should be raised with status “Open”
Distilling
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha makes a new ticket request with valid details
| User Name | Nature of Problem |
| Forgetful Fred | Account locked |
When she creates a new ticket
Then a new ticket should be raised with status “Open”
Distilling
Gherkin Refactoring in Action
Scenario: Creating a new help desk ticket
Given Sasha makes a new ticket request with valid details
| User Name | Nature of Problem |
| Forgetful Fred | Account locked |
When she creates a new ticket
Then a new ticket should be raised with status “Open”
Distilling
Feature: Expense Claims End to End Test
New expense claims should be created in the Submitted state and be appear in the "New
Claims" screen.
Scenario: Submitting an expense claim
Given I log in as: sam.user@db.com
And I click on the "My Expenses " tab
When I click on "New Claim"
And I enter the description ‘Hotel expenses’
And I enter "25-04-2019" in the Date field
And I enter "153587-ZX" in the Project Code
And I enter "53" in the Expense Category Code
And I upload a PDF receipt for the hotel
And I enter 3 in the nights field
And I enter $600 in the accommodation field
And I enter $120 in the food field
And I upload a PDF receipt for the taxi
And I enter $45 in the transport field
And I click on ‘Submit’
Then verify that the expense claim is created correctly with the correct totals
And verify that the appropriate users can see the new claim
And verify that the approver can see whether the claim exceeds daily thresholds
De-UI-ication
Descripting
Distilling
Feature: Submitting expense claims
Scenario: A valid expense claim needs a valid date, project code and positive amount
Given Tasha the Traveller submits a claim for the following expenses
| Expense Type | Expense Date | Project Code | Amount |
| Accommodation | 25-09-2019 | Apollo-57 | $600 |
| Food | 25-09-2019 | Apollo-57 | $120 |
| Transport | 25-09-2019 | Apollo-57 | $45 |
When Tasha submits the claim
Then it should be successfully submitted with a total of $765
And a it should have status of “submitted”
De-UI-ication
Descripting
Distilling
John Ferguson Smart
@wakaleo
johnfergusonsmart.com
Tom Roden
@tommroden
neuri.com
Our Reading Specs

Weitere ähnliche Inhalte

Ähnlich wie My Reading Specs - Refactoring Patterns for Gherkin Scenarios

Paper design final
Paper design finalPaper design final
Paper design finalmir00
 
Write a banking program that simulates the operation of your local ba.docx
 Write a banking program that simulates the operation of your local ba.docx Write a banking program that simulates the operation of your local ba.docx
Write a banking program that simulates the operation of your local ba.docxajoy21
 
Income expense application in iOS
Income expense application in iOSIncome expense application in iOS
Income expense application in iOSmayur patel
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iiiG Madhusudhan
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iiiabhilashseelam
 
Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010Social Gold
 
Social Gold In-Flash Payments Webinar
Social Gold In-Flash Payments WebinarSocial Gold In-Flash Payments Webinar
Social Gold In-Flash Payments WebinarSocial Gold
 
Authorization objects a simple guide.doc (1)
Authorization objects   a simple guide.doc (1)Authorization objects   a simple guide.doc (1)
Authorization objects a simple guide.doc (1)Vikram Polinati
 
Give1Get2 User's Guide English
Give1Get2 User's Guide EnglishGive1Get2 User's Guide English
Give1Get2 User's Guide EnglishYann GEFFROTIN
 
Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsKonstantin Kudryashov
 
Css eng r1
Css eng r1Css eng r1
Css eng r1sbe37
 
java and javascript api dev guide
java and javascript api dev guidejava and javascript api dev guide
java and javascript api dev guideZenita Smythe
 
Architecting Value Using an Intelligent Payments Platform
Architecting Value Using an Intelligent Payments PlatformArchitecting Value Using an Intelligent Payments Platform
Architecting Value Using an Intelligent Payments PlatformXTRMAccount
 
POS Layaway by Amber
POS Layaway by AmberPOS Layaway by Amber
POS Layaway by Amberrcountry
 

Ähnlich wie My Reading Specs - Refactoring Patterns for Gherkin Scenarios (20)

Paper design final
Paper design finalPaper design final
Paper design final
 
Paper design final
Paper design finalPaper design final
Paper design final
 
171846965 projects
171846965 projects171846965 projects
171846965 projects
 
Write a banking program that simulates the operation of your local ba.docx
 Write a banking program that simulates the operation of your local ba.docx Write a banking program that simulates the operation of your local ba.docx
Write a banking program that simulates the operation of your local ba.docx
 
Income expense application in iOS
Income expense application in iOSIncome expense application in iOS
Income expense application in iOS
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
 
Accounting software
Accounting softwareAccounting software
Accounting software
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
 
Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010Social Gold in-Flash Webinar Jan 2010
Social Gold in-Flash Webinar Jan 2010
 
Social Gold In-Flash Payments Webinar
Social Gold In-Flash Payments WebinarSocial Gold In-Flash Payments Webinar
Social Gold In-Flash Payments Webinar
 
Authorization objects a simple guide.doc (1)
Authorization objects   a simple guide.doc (1)Authorization objects   a simple guide.doc (1)
Authorization objects a simple guide.doc (1)
 
Give1Get2 User's Guide English
Give1Get2 User's Guide EnglishGive1Get2 User's Guide English
Give1Get2 User's Guide English
 
Enabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projectsEnabling agile devliery through enabling BDD in PHP projects
Enabling agile devliery through enabling BDD in PHP projects
 
Css eng r1
Css eng r1Css eng r1
Css eng r1
 
java and javascript api dev guide
java and javascript api dev guidejava and javascript api dev guide
java and javascript api dev guide
 
Guided Assistance
Guided Assistance Guided Assistance
Guided Assistance
 
Architecting Value Using an Intelligent Payments Platform
Architecting Value Using an Intelligent Payments PlatformArchitecting Value Using an Intelligent Payments Platform
Architecting Value Using an Intelligent Payments Platform
 
Vouchers
VouchersVouchers
Vouchers
 
POS Layaway by Amber
POS Layaway by AmberPOS Layaway by Amber
POS Layaway by Amber
 

Mehr von John Ferguson Smart Limited

Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...John Ferguson Smart Limited
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceJohn Ferguson Smart Limited
 
Sustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplaySustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplayJohn Ferguson Smart Limited
 
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...John Ferguson Smart Limited
 
Screenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingScreenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingJohn Ferguson Smart Limited
 
All the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesAll the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesJohn Ferguson Smart Limited
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityJohn Ferguson Smart Limited
 
BDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareBDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareJohn Ferguson Smart Limited
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationJohn Ferguson Smart Limited
 

Mehr von John Ferguson Smart Limited (20)

Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a difference
 
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANTBE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
 
Sustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplaySustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and Screenplay
 
Feature Mapping Workshop
Feature Mapping WorkshopFeature Mapping Workshop
Feature Mapping Workshop
 
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
 
Shift left-devoxx-pl
Shift left-devoxx-plShift left-devoxx-pl
Shift left-devoxx-pl
 
Screenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingScreenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testing
 
Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
 
All the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesAll the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practices
 
Serenity and the Journey Pattern
Serenity and the Journey PatternSerenity and the Journey Pattern
Serenity and the Journey Pattern
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
BDD Anti-patterns
BDD Anti-patternsBDD Anti-patterns
BDD Anti-patterns
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and Serenity
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
 
BDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareBDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right Software
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
 
BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
BDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world applicationBDD in Action – principles, practices and real-world application
BDD in Action – principles, practices and real-world application
 
TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?
 

Kürzlich hochgeladen

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
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
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
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
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
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
 

Kürzlich hochgeladen (20)

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
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
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
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
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
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
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 

My Reading Specs - Refactoring Patterns for Gherkin Scenarios

  • 1. The BDD Way Speculate1 Testers Developers Business Illustrate2 Product Backlog, Goals, Capabilities and Features Formulate3 User Stories with acceptance criteria Automate4 Implement and verify Developers and Testers Executable Specifications Demonstrate5 Testers Developers Business Passing Automated Acceptance Tests Validate6 Customers or Users Potentially shippable product increment Learning and Feedback Documentation Automated Tests Business Readable Specification Gherkin
  • 2. 3 Artefacts in 1 Documentation Automated Tests Business Readable Specification Gherkin
  • 3. Heuristics for great “Reading Specs” Asserts the behaviour, doesn’t list instructions to the reader. Uses domain concepts and language, not technical implementation. Every reader should easily understand its purpose and dialogue. When it fails, you quickly know why and trust the outcome. Concise, focused with no unnecessary verbiage. Declarative, not imperative Business behaviour, not implementati on Easy to understand Fails purposefully and informatively Essential and concise, not incidental and verbose
  • 4. A selection of our favorites Gherkin Refactoring Patterns
  • 6. De-UI-ication 1. Identify the business intent behind the clicks and selects 2. Group UI interactions into business tasks 3. Replace references to the user interface by descriptions of the user’s intent
  • 7. Descripting 1. Clarify vague or imprecise checks 2. Articulate the real scenario goals in the form of clear and testable outcomes 3. Focus each scenario on a single rule
  • 8. Distilling 1. Remove irrelevant detail 2. Highlight the essential information 3. Connect the outcomes directly to the inputs and actions
  • 9. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they navigate to the Tickets tab And they click “New” And they select “New Ticket” And they fill in the mandatory fields And they click on “Create” Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes
  • 10. Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they navigate to the Tickets tab And they click “New” And they select “New Ticket” And they fill in the mandatory fields And they click on “Create” Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes De-UI-ication 1. Identify the business intent behind the clicks and selects 2. Group UI interactions into business tasks 3. Replace references to the user interface by descriptions of the user’s intent Descripting 1. Clarify vague or imprecise checks 2. Articulate the real scenario goals in the form of clear and testable outcomes 3. Focus each scenario on a single rule Distilling 1. Remove irrelevant detail 2. Highlight the essential information 3. Connect the outcomes directly to the inputs and actions
  • 11. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they navigate to the Tickets tab And they click “New” And they select “New Ticket” And they fill in the mandatory fields And they click on “Create” Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes De-UI-ication
  • 12. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they navigate to the Tickets tab And they click “New” And they select “New Ticket” And they fill in the mandatory fields And they click on “Create” Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes De-UI-ication
  • 13. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes De-UI-ication
  • 14. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then check that the ticket is correctly displayed And the ticket status dropdown should show “Open” And then they click Logout And the window closes De-UI-ication
  • 15. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then check that the ticket is correctly displayed And the ticket should be “Open” De-UI-ication
  • 16. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then check that the ticket is correctly displayed And the ticket should be “Open” Descripting
  • 17. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then check that the ticket is correctly displayed And the ticket should be “Open” Descripting
  • 18. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then a new ticket should be raised And the ticket should be “Open” Descripting
  • 19. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Descripting
  • 20. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Descripting
  • 21. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given a User Logs in as “SupportUser123” And a password of “Passw0rd” And verify they are a Support User When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Descripting
  • 22. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha the Support User logs in as “SupportUser123” And a password of “Passw0rd” When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Descripting
  • 23. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha the Support User logs in as “SupportUser123” And a password of “Passw0rd” When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Distilling
  • 24. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha the Support User logs in as “SupportUser123” And a password of “Passw0rd” When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Distilling
  • 25. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha the Support User is logged in When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Distilling
  • 26. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha the Support User is logged in When they create a new ticket with valid details Then a new ticket should be raised with status “Open” Distilling
  • 27. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha makes a new ticket request with valid details | User Name | Nature of Problem | | Forgetful Fred | Account locked | When she creates a new ticket Then a new ticket should be raised with status “Open” Distilling
  • 28. Gherkin Refactoring in Action Scenario: Creating a new help desk ticket Given Sasha makes a new ticket request with valid details | User Name | Nature of Problem | | Forgetful Fred | Account locked | When she creates a new ticket Then a new ticket should be raised with status “Open” Distilling
  • 29. Feature: Expense Claims End to End Test New expense claims should be created in the Submitted state and be appear in the "New Claims" screen. Scenario: Submitting an expense claim Given I log in as: sam.user@db.com And I click on the "My Expenses " tab When I click on "New Claim" And I enter the description ‘Hotel expenses’ And I enter "25-04-2019" in the Date field And I enter "153587-ZX" in the Project Code And I enter "53" in the Expense Category Code And I upload a PDF receipt for the hotel And I enter 3 in the nights field And I enter $600 in the accommodation field And I enter $120 in the food field And I upload a PDF receipt for the taxi And I enter $45 in the transport field And I click on ‘Submit’ Then verify that the expense claim is created correctly with the correct totals And verify that the appropriate users can see the new claim And verify that the approver can see whether the claim exceeds daily thresholds De-UI-ication Descripting Distilling
  • 30. Feature: Submitting expense claims Scenario: A valid expense claim needs a valid date, project code and positive amount Given Tasha the Traveller submits a claim for the following expenses | Expense Type | Expense Date | Project Code | Amount | | Accommodation | 25-09-2019 | Apollo-57 | $600 | | Food | 25-09-2019 | Apollo-57 | $120 | | Transport | 25-09-2019 | Apollo-57 | $45 | When Tasha submits the claim Then it should be successfully submitted with a total of $765 And a it should have status of “submitted” De-UI-ication Descripting Distilling
  • 31. John Ferguson Smart @wakaleo johnfergusonsmart.com Tom Roden @tommroden neuri.com Our Reading Specs

Hinweis der Redaktion

  1. Effectiveness: To apply the minimal effort necessary to achieve the desired result Autonomous kindergarteners and Lord of the Flies - Is effectiveness alone enough to make a high performance team?
  2. Effectiveness: To apply the minimal effort necessary to achieve the desired result Autonomous kindergarteners and Lord of the Flies - Is effectiveness alone enough to make a high performance team?