SlideShare a Scribd company logo
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

More Related Content

Similar to My Reading Specs - Refactoring Patterns for Gherkin Scenarios

Paper design final
Paper design finalPaper design final
Paper design final
mir00
 
Paper design final
Paper design finalPaper design final
Paper design final
Mathijs van Meerkerk
 
171846965 projects
171846965 projects171846965 projects
171846965 projects
homeworkping8
 
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
ajoy21
 
Income expense application in iOS
Income expense application in iOSIncome expense application in iOS
Income expense application in iOS
mayur patel
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
satish Lingaraju
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
G Madhusudhan
 
Accounting software
Accounting softwareAccounting software
Accounting software
Ajeet Singh Mandloi
 
Order to cash_cycle_iii
Order to cash_cycle_iiiOrder to cash_cycle_iii
Order to cash_cycle_iii
abhilashseelam
 
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
 
Social Gold In-Flash Payments Webinar
Social Gold In-Flash Payments WebinarSocial Gold In-Flash Payments Webinar
Social Gold In-Flash Payments Webinar
Social 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 English
Yann 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 projects
Konstantin Kudryashov
 
Css eng r1
Css eng r1Css eng r1
Css eng r1
sbe37
 
java and javascript api dev guide
java and javascript api dev guidejava and javascript api dev guide
java and javascript api dev guide
Zenita Smythe
 
Guided Assistance
Guided Assistance Guided Assistance
Guided Assistance
SellOnFlipkart
 
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
XTRMAccount
 
Vouchers
VouchersVouchers
POS Layaway by Amber
POS Layaway by AmberPOS Layaway by Amber
POS Layaway by Amber
rcountry
 

Similar to 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
 

More from 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 difference
John Ferguson Smart Limited
 
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
John 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 Screenplay
John Ferguson Smart Limited
 
Feature Mapping Workshop
Feature Mapping WorkshopFeature Mapping Workshop
Feature Mapping Workshop
John 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
 
Shift left-devoxx-pl
Shift left-devoxx-plShift left-devoxx-pl
Shift left-devoxx-pl
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 testing
John Ferguson Smart Limited
 
Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
John 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 practices
John Ferguson Smart Limited
 
Serenity and the Journey Pattern
Serenity and the Journey PatternSerenity and the Journey Pattern
Serenity and the Journey Pattern
John Ferguson Smart Limited
 
BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
John Ferguson Smart Limited
 
BDD Anti-patterns
BDD Anti-patternsBDD Anti-patterns
BDD Anti-patterns
John 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 Serenity
John Ferguson Smart Limited
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
John 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 Software
John Ferguson Smart Limited
 
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
John Ferguson Smart Limited
 
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
John 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 application
John Ferguson Smart Limited
 
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?
John Ferguson Smart Limited
 

More from 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?
 

Recently uploaded

OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
Shane Coughlan
 
Empowering Businesses with Intelligent Software Solutions - Grawlix
Empowering Businesses with Intelligent Software Solutions - GrawlixEmpowering Businesses with Intelligent Software Solutions - Grawlix
Empowering Businesses with Intelligent Software Solutions - Grawlix
Aarisha Shaikh
 
How to Secure Your Kubernetes Software Supply Chain at Scale
How to Secure Your Kubernetes Software Supply Chain at ScaleHow to Secure Your Kubernetes Software Supply Chain at Scale
How to Secure Your Kubernetes Software Supply Chain at Scale
Anchore
 
BitLocker Data Recovery | BLR Tools Data Recovery Solutions
BitLocker Data Recovery | BLR Tools Data Recovery SolutionsBitLocker Data Recovery | BLR Tools Data Recovery Solutions
BitLocker Data Recovery | BLR Tools Data Recovery Solutions
Alina Tait
 
09. Ruby Object Oriented Programming - Ruby Core Teaching
09. Ruby Object Oriented Programming - Ruby Core Teaching09. Ruby Object Oriented Programming - Ruby Core Teaching
09. Ruby Object Oriented Programming - Ruby Core Teaching
quanhoangd129
 
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
andrehoraa
 
Three available editions of Windows Servers crucial to your organization’s op...
Three available editions of Windows Servers crucial to your organization’s op...Three available editions of Windows Servers crucial to your organization’s op...
Three available editions of Windows Servers crucial to your organization’s op...
Q-Advise
 
Crowd Strike\Windows Update Issue: Overview and Current Status
Crowd Strike\Windows Update Issue: Overview and Current StatusCrowd Strike\Windows Update Issue: Overview and Current Status
Crowd Strike\Windows Update Issue: Overview and Current Status
ramaganesan0504
 
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
LETSCMS Private Limited
 
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
andrehoraa
 
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdfApplitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools
 
01. Ruby Introduction - Ruby Core Teaching
01. Ruby Introduction - Ruby Core Teaching01. Ruby Introduction - Ruby Core Teaching
01. Ruby Introduction - Ruby Core Teaching
quanhoangd129
 
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdfAI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
Daniel Zivkovic
 
AI-driven Automation_ Transforming DevOps Practices.docx
AI-driven Automation_ Transforming DevOps Practices.docxAI-driven Automation_ Transforming DevOps Practices.docx
AI-driven Automation_ Transforming DevOps Practices.docx
zoondiacom
 
08. Ruby Enumerable - Ruby Core Teaching
08. Ruby Enumerable - Ruby Core Teaching08. Ruby Enumerable - Ruby Core Teaching
08. Ruby Enumerable - Ruby Core Teaching
quanhoangd129
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech
 
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
vijayatibirds
 
SAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple SoftwareSAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple Software
Zyple Software
 
CrushFTP 10.4.0.29 PC Software - WhizNews
CrushFTP 10.4.0.29 PC Software - WhizNewsCrushFTP 10.4.0.29 PC Software - WhizNews
CrushFTP 10.4.0.29 PC Software - WhizNews
Eman Nisar
 
Fantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdfFantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdf
6m9p7qnjj8
 

Recently uploaded (20)

OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
OpenChain Webinar: IAV, TimeToAct and ISO/IEC 5230 - Third-Party Certificatio...
 
Empowering Businesses with Intelligent Software Solutions - Grawlix
Empowering Businesses with Intelligent Software Solutions - GrawlixEmpowering Businesses with Intelligent Software Solutions - Grawlix
Empowering Businesses with Intelligent Software Solutions - Grawlix
 
How to Secure Your Kubernetes Software Supply Chain at Scale
How to Secure Your Kubernetes Software Supply Chain at ScaleHow to Secure Your Kubernetes Software Supply Chain at Scale
How to Secure Your Kubernetes Software Supply Chain at Scale
 
BitLocker Data Recovery | BLR Tools Data Recovery Solutions
BitLocker Data Recovery | BLR Tools Data Recovery SolutionsBitLocker Data Recovery | BLR Tools Data Recovery Solutions
BitLocker Data Recovery | BLR Tools Data Recovery Solutions
 
09. Ruby Object Oriented Programming - Ruby Core Teaching
09. Ruby Object Oriented Programming - Ruby Core Teaching09. Ruby Object Oriented Programming - Ruby Core Teaching
09. Ruby Object Oriented Programming - Ruby Core Teaching
 
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
Monitoring the Execution of 14K Tests: Methods Tend to Have One Path that Is ...
 
Three available editions of Windows Servers crucial to your organization’s op...
Three available editions of Windows Servers crucial to your organization’s op...Three available editions of Windows Servers crucial to your organization’s op...
Three available editions of Windows Servers crucial to your organization’s op...
 
Crowd Strike\Windows Update Issue: Overview and Current Status
Crowd Strike\Windows Update Issue: Overview and Current StatusCrowd Strike\Windows Update Issue: Overview and Current Status
Crowd Strike\Windows Update Issue: Overview and Current Status
 
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
Mlm software - Binary, Board, Matrix, Monoline, Unilevel MLM Ecommerce or E-p...
 
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
PathSpotter: Exploring Tested Paths to Discover Missing Tests (FSE 2024)
 
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdfApplitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdf
 
01. Ruby Introduction - Ruby Core Teaching
01. Ruby Introduction - Ruby Core Teaching01. Ruby Introduction - Ruby Core Teaching
01. Ruby Introduction - Ruby Core Teaching
 
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdfAI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
AI - Your Startup Sidekick (Leveraging AI to Bootstrap a Lean Startup).pdf
 
AI-driven Automation_ Transforming DevOps Practices.docx
AI-driven Automation_ Transforming DevOps Practices.docxAI-driven Automation_ Transforming DevOps Practices.docx
AI-driven Automation_ Transforming DevOps Practices.docx
 
08. Ruby Enumerable - Ruby Core Teaching
08. Ruby Enumerable - Ruby Core Teaching08. Ruby Enumerable - Ruby Core Teaching
08. Ruby Enumerable - Ruby Core Teaching
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
 
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
iBirds Services - Comprehensive Salesforce CRM and Software Development Solut...
 
SAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple SoftwareSAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple Software
 
CrushFTP 10.4.0.29 PC Software - WhizNews
CrushFTP 10.4.0.29 PC Software - WhizNewsCrushFTP 10.4.0.29 PC Software - WhizNews
CrushFTP 10.4.0.29 PC Software - WhizNews
 
Fantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdfFantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdf
 

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

Editor's Notes

  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?