SlideShare a Scribd company logo
1 of 40
Download to read offline
Don’t you trust me?
Seb Rose
@sebrose
www.claysnow.co.uk
Business Driven
Development
Beard Driven
Development
Behaviour Driven
Development
What’s
the difference
between TDD,
ATDD, BDD
and SbE?

They’re
called
different
things
http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/
Easy transport of groceries
In order to get groceries home easily
Matt & Anna want
a way to transport them
Scenario: A month of groceries
Given I have opened the trunk
When I load a month of groceries
Then the suspension will cope
Scenario: A month of groceries
Given I have opened the trunk
When I load a month of groceries
Then the suspension will cope
Scenario: A year of groceries
Given I have opened the trunk
When I load a year of groceries
Then the suspension will cope
expected: "Within tolerance",
got: "OVERLOADED"
Given I have opened the trunk

@Given(“^I have opened the trunk$”)
public void i_have_opened_the_trunk() {
myCar.openTrunk();
}
So, what exactly IS the problem?
Feature: GPS usage
Scenario: Start navigation to new destination
Given I enter a new destination
When I start navigation
Then I should be given first direction
@Given("I enter a new destination")
public void I_enter_a_new_destination() {
// Do whatever it takes to enter new destination
}
•

What if there is no GPS signal?

•

What if the destination provided is unknown?

•

How will errors be communicated to the user?
Scenario: No GPS signal
Given I enter a new destination
And it there is no GPS signal
When I start navigation
Then I should see the correct error message
Scenario: Unknown destination
Given I enter a new destination
And the destination is unknown
When I start navigation
Then I should see the correct error message
Scenario Outline: Display correct error message
When the navigation component returns an <error>
Then the correct <message> should be returned
Examples:
| error
| message
| no-gps-signal
| "No GPS signal"
| unknown-destination
| "Unknown destination"

|
|
|
Scenario: No GPS signal
Given I enter a new destination
And it there is no GPS signal
When I start navigation
Then I should see the no-gps-signal message
Scenario: Unknown destination
Given I enter a new destination
And the destination is unknown
When I start navigation
Then I should see the unknown-destination message
Scenario: No GPS signal
Given I enter a new destination
And it there is no GPS signal
When I start navigation
Then I should see “No GPS signal”
Scenario: Unknown destination
Given I enter a new destination
And the destination is unknown
When I start navigation
Then I should see “Unknown destination”
@without_ui
Scenario: No GPS signal
Given I enter a new destination
And it there is no GPS signal
When I start navigation
Then I should see “No GPS signal”
private boolean without_ui = false;
@Before("@without_ui")
public void beforeScenario() {
without_ui = true;
}
@Given("^I enter a new destination$")
public void I_enter_a_new_destination() {
if (without_ui){
// Call navigation component directly
} else {
// Drive UI directly using Selenium or similar.
}
}
Service manual

•Exercise full application stack to
build trust

•Reduce thickness as trust grows
•A few end-to-end scenarios is
often all you need

•Keep living documentation
comprehensive
Please evaluate my presentation at:
www.touchmyconference.com/ATD2013

Seb	
  Rose
Twi$er:	
  	
   @sebrose
Blog:	
  	
   	
   www.claysnow.co.uk
E-­‐mail:	
   	
   seb@claysnow.co.uk

-JVM

14
20
le y)
ab ll
il fu
va pe
A
ho
(
Seb Rose,

More Related Content

More from Seb Rose

Software testing - learning to walk again (expoQA22)
Software testing - learning to walk again (expoQA22)Software testing - learning to walk again (expoQA22)
Software testing - learning to walk again (expoQA22)
Seb Rose
 
Software contracts or: how I learned to stop worrying and love releasing. Agi...
Software contracts or: how I learned to stop worrying and love releasing. Agi...Software contracts or: how I learned to stop worrying and love releasing. Agi...
Software contracts or: how I learned to stop worrying and love releasing. Agi...
Seb Rose
 

More from Seb Rose (20)

Software contracts - Global Enterprise Agile 2023.pdf
Software contracts - Global Enterprise Agile 2023.pdfSoftware contracts - Global Enterprise Agile 2023.pdf
Software contracts - Global Enterprise Agile 2023.pdf
 
Micro-service delivery - without the pitfalls
Micro-service delivery - without the pitfallsMicro-service delivery - without the pitfalls
Micro-service delivery - without the pitfalls
 
DevSecOps - Agile Get-Together 2022.pdf
DevSecOps - Agile Get-Together 2022.pdfDevSecOps - Agile Get-Together 2022.pdf
DevSecOps - Agile Get-Together 2022.pdf
 
Contract testing - Sealights 2022.pdf
Contract testing - Sealights 2022.pdfContract testing - Sealights 2022.pdf
Contract testing - Sealights 2022.pdf
 
Example mapping - slice any story into testable examples - SoCraTes 2022.pdf
Example mapping - slice any story into testable examples - SoCraTes 2022.pdfExample mapping - slice any story into testable examples - SoCraTes 2022.pdf
Example mapping - slice any story into testable examples - SoCraTes 2022.pdf
 
Software testing - learning to walk again (expoQA22)
Software testing - learning to walk again (expoQA22)Software testing - learning to walk again (expoQA22)
Software testing - learning to walk again (expoQA22)
 
DevSecOps - Unicom Agile and DevOps Expo (Adaptive Challenges) 2021
DevSecOps - Unicom Agile and DevOps Expo (Adaptive Challenges) 2021DevSecOps - Unicom Agile and DevOps Expo (Adaptive Challenges) 2021
DevSecOps - Unicom Agile and DevOps Expo (Adaptive Challenges) 2021
 
A brief history of requirements - Unicom 2022
A brief history of requirements  - Unicom 2022A brief history of requirements  - Unicom 2022
A brief history of requirements - Unicom 2022
 
Example mapping (with builds) - ProductWorld 2022
Example mapping (with builds)  - ProductWorld 2022Example mapping (with builds)  - ProductWorld 2022
Example mapping (with builds) - ProductWorld 2022
 
Example mapping - ProductWorld 2022
Example mapping - ProductWorld 2022Example mapping - ProductWorld 2022
Example mapping - ProductWorld 2022
 
No code, low code, machine code QA ATL 2021
No code, low code, machine code   QA ATL 2021No code, low code, machine code   QA ATL 2021
No code, low code, machine code QA ATL 2021
 
No code, low code, machine code QA ATL 2021
No code, low code, machine code   QA ATL 2021No code, low code, machine code   QA ATL 2021
No code, low code, machine code QA ATL 2021
 
No code, low code, machine code - Unicom 2021
No code, low code, machine code -  Unicom 2021No code, low code, machine code -  Unicom 2021
No code, low code, machine code - Unicom 2021
 
BDD: from soup to nuts - The Future of Work Scotland 2021
BDD: from soup to nuts  - The Future of Work Scotland 2021BDD: from soup to nuts  - The Future of Work Scotland 2021
BDD: from soup to nuts - The Future of Work Scotland 2021
 
Contrasting test automation and BDD - 2020
Contrasting test automation and BDD - 2020Contrasting test automation and BDD - 2020
Contrasting test automation and BDD - 2020
 
Are BDD and test automation the same thing? Automation Guild 2021
Are BDD and test automation the same thing?   Automation Guild 2021Are BDD and test automation the same thing?   Automation Guild 2021
Are BDD and test automation the same thing? Automation Guild 2021
 
"Our BDDs are broken!" Lean Agile Exchange 2020
"Our BDDs are broken!"   Lean Agile Exchange 2020"Our BDDs are broken!"   Lean Agile Exchange 2020
"Our BDDs are broken!" Lean Agile Exchange 2020
 
User stories: from good intentions to bad advice - Agile Scotland 2019
User stories: from good intentions to bad advice - Agile Scotland 2019User stories: from good intentions to bad advice - Agile Scotland 2019
User stories: from good intentions to bad advice - Agile Scotland 2019
 
User stories: from good intentions to bad advice - Lean Agile Scotland 2019
User stories: from good intentions to bad advice - Lean Agile Scotland 2019User stories: from good intentions to bad advice - Lean Agile Scotland 2019
User stories: from good intentions to bad advice - Lean Agile Scotland 2019
 
Software contracts or: how I learned to stop worrying and love releasing. Agi...
Software contracts or: how I learned to stop worrying and love releasing. Agi...Software contracts or: how I learned to stop worrying and love releasing. Agi...
Software contracts or: how I learned to stop worrying and love releasing. Agi...
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Don't you trust me?

  • 1. Don’t you trust me? Seb Rose @sebrose www.claysnow.co.uk
  • 5. What’s the difference between TDD, ATDD, BDD and SbE? They’re called different things http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/
  • 6. Easy transport of groceries In order to get groceries home easily Matt & Anna want a way to transport them
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Scenario: A month of groceries Given I have opened the trunk When I load a month of groceries Then the suspension will cope
  • 14. Scenario: A month of groceries Given I have opened the trunk When I load a month of groceries Then the suspension will cope
  • 15. Scenario: A year of groceries Given I have opened the trunk When I load a year of groceries Then the suspension will cope expected: "Within tolerance", got: "OVERLOADED"
  • 16. Given I have opened the trunk @Given(“^I have opened the trunk$”) public void i_have_opened_the_trunk() { myCar.openTrunk(); }
  • 17. So, what exactly IS the problem?
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Feature: GPS usage Scenario: Start navigation to new destination Given I enter a new destination When I start navigation Then I should be given first direction
  • 27. @Given("I enter a new destination") public void I_enter_a_new_destination() { // Do whatever it takes to enter new destination }
  • 28. • What if there is no GPS signal? • What if the destination provided is unknown? • How will errors be communicated to the user?
  • 29. Scenario: No GPS signal Given I enter a new destination And it there is no GPS signal When I start navigation Then I should see the correct error message Scenario: Unknown destination Given I enter a new destination And the destination is unknown When I start navigation Then I should see the correct error message
  • 30. Scenario Outline: Display correct error message When the navigation component returns an <error> Then the correct <message> should be returned Examples: | error | message | no-gps-signal | "No GPS signal" | unknown-destination | "Unknown destination" | | |
  • 31. Scenario: No GPS signal Given I enter a new destination And it there is no GPS signal When I start navigation Then I should see the no-gps-signal message Scenario: Unknown destination Given I enter a new destination And the destination is unknown When I start navigation Then I should see the unknown-destination message
  • 32. Scenario: No GPS signal Given I enter a new destination And it there is no GPS signal When I start navigation Then I should see “No GPS signal” Scenario: Unknown destination Given I enter a new destination And the destination is unknown When I start navigation Then I should see “Unknown destination”
  • 33. @without_ui Scenario: No GPS signal Given I enter a new destination And it there is no GPS signal When I start navigation Then I should see “No GPS signal”
  • 34. private boolean without_ui = false; @Before("@without_ui") public void beforeScenario() { without_ui = true; }
  • 35. @Given("^I enter a new destination$") public void I_enter_a_new_destination() { if (without_ui){ // Call navigation component directly } else { // Drive UI directly using Selenium or similar. } }
  • 36.
  • 37.
  • 38.
  • 39. Service manual •Exercise full application stack to build trust •Reduce thickness as trust grows •A few end-to-end scenarios is often all you need •Keep living documentation comprehensive
  • 40. Please evaluate my presentation at: www.touchmyconference.com/ATD2013 Seb  Rose Twi$er:     @sebrose Blog:       www.claysnow.co.uk E-­‐mail:     seb@claysnow.co.uk -JVM 14 20 le y) ab ll il fu va pe A ho ( Seb Rose,