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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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,