SlideShare uma empresa Scribd logo
1 de 50
An Introduction to
   Behavior Driven Design
                       Shawn Wallace
                National Service Offering Lead
Application Development and Application Lifecycle Management
                      Senior Architect
                     Centric Consulting
I’m Shawn
I’m Shawn
Favorite Movie
I’m Shawn
Favorite Movie
My dog
I’m Shawn
Favorite Movie
My dog
My Son
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter

My Family
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter

My Family

I live here
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter

My Family

 I live here
I a Marine Vet
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter

My Family

 I live here
I a Marine Vet
My Favorite Team
I’m Shawn
Favorite Movie
My dog
My Son

My Daughter

My Family

 I live here
I a Marine Vet
My Favorite Team
Where I work
I’m not a BA
A programmer is going out for a stroll one
evening. His wife asks him to swing by the
store and pick up a gallon of milk, and if they
had eggs, to get a dozen. He returned with
twelve gallons of milk and said "They had
eggs."




                                                  4
5
Our existences are
  about precise
 communication
The Problem with Agility
We are trying to “productize”
  our approaches...again.
We are trying to “productize”
  our approaches...again.
Fundamentally agile
is about
approaching the
work in a different
way.




                 11
12
We need thinking
business analysts
14
15
We’re not building a
     house...
We’re cleaning the
     house...
It’s NOT easy


•   It is MUCH easier to slice up a backlog
    horizontally
•   Developers want to work horizontally
    (efficiency argument)




     http://simpleprogrammer.com/2011/11/21/understanding-the-vertical-slice/
http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
Why vertical slices?

It is about delivering working functionality as
               soon as possible.


                  Feedback.
http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-vertical-user-stories-slicing-the-cake
Behavior Driven
 Development
Why Behavior Driven Design
• Work is done from the perspective of the
  user
• Can slice vertically but narrowly
• Tests behavior of the system
• Executable requirements
• Need to move as fast
  as business
• Appropriate feedback loop
• Manual regression is
  EXPENSIVE
Acceptance Tests vs. Unit and
      Integration Tests
Acceptance Tests vs. Unit and
          Integration Tests
• Unit Tests confirm that you built it
  right (INSIDE OUT)
• Acceptance Tests confirm that you
  build the right thing (OUTSIDE IN)




                                        25
Benefits
•   Implementing changes more efficiently
•   Quick feedback
•   Higher product quality
•   Less rework
•   Better work alignment to priority

                  (not just for agile teams)

                                          26
• Describes how software should behave in plain text
• Gherkin
   – Usable in many different human languages
   – Features can be written and understood by both non/
     technical project members
• Not a replacement for unit testing; it’s not a low
  level testing/spec framework
• Easy to execute in Continuous Integration
  environment (except MS TFS)
Technology Stack
• Cucumber - Domain Specification
• Ruby, JRuby or .NET - map cukes to
  application
• UI testing framework - Watir, Watin,
  Selenium, Capybara (headless),
  anything that supports WebDriver
• Open source
• STRONG community support

                                         28
Features
Who’s Using the System




                         Features
Who’s Using the System

                         What are they doing?




                                Features
Who’s Using the System

                         What are they doing?




                          Why do they care?

                                Features
Scenarios
• Features are defined by one or more
  scenarios
• Sequence of steps thru the feature that
  exercises on path
• Use BDD style – given-when-then


 Scenario: <description>

 
 <step 1>

 
 …
Scenarios
• Given - Sets up preconditions, or context, for the
  scenario




                                         Scenarios
• Given - Sets up preconditions, or context, for the
  scenario
• When - The action, or behavior, that we’re focused on




                                       Scenarios
• Given - Sets up preconditions, or context, for the
  scenario
• When - The action, or behavior, that we’re focused on
• Then - Checks post-conditions and verifies that the
  right thing happened in the When stage




                                       Scenarios
Demonstration


                32
Q&A
                For more information...
•   This Presentation on GitHub - https://github.com/shawnewallace/intro-to-atdd.git
•   cukes.info
•   Gojko Adzic
     – cuke4ninja.com
     – Specification by Example
•   https://github.com/aslakhellesoy/cucumber/wiki
•   http://groups.google.com/group/cukes
•   http://www.cheezyworld.com
•   The Cucumber Book, Matt Wayne, Aslak Hellesøy: http://pragprog.com/book/
    hwcuc/the-cucumber-book
•   The Rspec Book, David Chelimsky: http://www.pragprog.com/titles/achbd/the-
    rspec-book
•   http://simpleprogrammer.com/2011/11/21/understanding-the-vertical-
    slice/
•   http://www.deltamatrix.com/2012-04-17-04-37-50/horizontal-and-
    vertical-user-stories-slicing-the-cake
Shawn Wallace
Work: shawn.wallace@centricconsulting.com
    Personal: shawn@the-wallaces.net
         Twitter: @ShawnWallace
       Blog: blog.shawnewallace.com
    http://www.about.me/shawnwallace
              Shirt size: XXL
              Shoe Size: 11.5
Introduction to atdd

Mais conteúdo relacionado

Mais procurados

Software operability and run book collaboration London Feb 2014
Software operability and run book collaboration London Feb 2014Software operability and run book collaboration London Feb 2014
Software operability and run book collaboration London Feb 2014
Matthew Skelton
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
Stephen Ritchie
 
Continuous integration meetup
Continuous integration meetupContinuous integration meetup
Continuous integration meetup
Drew Stephens
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
Stephen Ritchie
 
Feature vs component
Feature vs componentFeature vs component
Feature vs component
Chad Holdorf
 

Mais procurados (20)

Zeev Suraski "The PHP 7 Story, and beyond"
Zeev Suraski "The PHP 7 Story, and beyond"Zeev Suraski "The PHP 7 Story, and beyond"
Zeev Suraski "The PHP 7 Story, and beyond"
 
Introduction to kanban
Introduction to kanbanIntroduction to kanban
Introduction to kanban
 
Cloud tools
Cloud toolsCloud tools
Cloud tools
 
Software operability and run book collaboration London Feb 2014
Software operability and run book collaboration London Feb 2014Software operability and run book collaboration London Feb 2014
Software operability and run book collaboration London Feb 2014
 
Continuous Delivery for the Rest of Us
Continuous Delivery for the Rest of UsContinuous Delivery for the Rest of Us
Continuous Delivery for the Rest of Us
 
Path to agility
Path to agilityPath to agility
Path to agility
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Quack Chat | Fix Database Performance Problems with Profiling
Quack Chat | Fix Database Performance Problems with ProfilingQuack Chat | Fix Database Performance Problems with Profiling
Quack Chat | Fix Database Performance Problems with Profiling
 
Software devops engineer in test (SDET)
Software devops engineer in test (SDET)Software devops engineer in test (SDET)
Software devops engineer in test (SDET)
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
 
CountinuousDelivery
CountinuousDeliveryCountinuousDelivery
CountinuousDelivery
 
Git超入門
Git超入門Git超入門
Git超入門
 
Continuous integration meetup
Continuous integration meetupContinuous integration meetup
Continuous integration meetup
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
 
Mk model driven-automation-en
Mk model driven-automation-enMk model driven-automation-en
Mk model driven-automation-en
 
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
 
Adopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebaseAdopting Elixir in a 10 year old codebase
Adopting Elixir in a 10 year old codebase
 
Releasing To Production Every Week
Releasing To Production Every WeekReleasing To Production Every Week
Releasing To Production Every Week
 
Chefのエンタープライズ事例 ossミドルウェアスタックishigakiテンプレートにおける事例-
Chefのエンタープライズ事例 ossミドルウェアスタックishigakiテンプレートにおける事例-Chefのエンタープライズ事例 ossミドルウェアスタックishigakiテンプレートにおける事例-
Chefのエンタープライズ事例 ossミドルウェアスタックishigakiテンプレートにおける事例-
 
Feature vs component
Feature vs componentFeature vs component
Feature vs component
 

Semelhante a Introduction to atdd

Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Cprime
 
Shawn Wallace - Test automation in brownfield applications
Shawn Wallace - Test automation in brownfield applicationsShawn Wallace - Test automation in brownfield applications
Shawn Wallace - Test automation in brownfield applications
QA or the Highway
 

Semelhante a Introduction to atdd (20)

Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver Software
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
 
Get lean tutorial
Get lean tutorialGet lean tutorial
Get lean tutorial
 
5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous Delivery5 Steps on the Way to Continuous Delivery
5 Steps on the Way to Continuous Delivery
 
Comprehensive Validation with Laravel 4
Comprehensive Validation with Laravel 4Comprehensive Validation with Laravel 4
Comprehensive Validation with Laravel 4
 
Deployment is the new build
Deployment is the new buildDeployment is the new build
Deployment is the new build
 
State of Agile 2017
State of Agile 2017State of Agile 2017
State of Agile 2017
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 
Testing in a DevOps team
Testing in a DevOps teamTesting in a DevOps team
Testing in a DevOps team
 
A confused tester in agile world finalversion
A confused tester in agile world finalversionA confused tester in agile world finalversion
A confused tester in agile world finalversion
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings RevealedDBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
 
Flexing your Agile Muscle - Agile Technical Concepts Explained
Flexing your Agile Muscle - Agile Technical Concepts ExplainedFlexing your Agile Muscle - Agile Technical Concepts Explained
Flexing your Agile Muscle - Agile Technical Concepts Explained
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Shawn Wallace - Test automation in brownfield applications
Shawn Wallace - Test automation in brownfield applicationsShawn Wallace - Test automation in brownfield applications
Shawn Wallace - Test automation in brownfield applications
 
Moving to Continuous Delivery Without Breaking Your Code
Moving to Continuous Delivery Without Breaking Your CodeMoving to Continuous Delivery Without Breaking Your Code
Moving to Continuous Delivery Without Breaking Your Code
 
Building QA Team that matters for an Agile World
Building QA Team that matters for an Agile WorldBuilding QA Team that matters for an Agile World
Building QA Team that matters for an Agile World
 
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship CultureTechnical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Introduction to atdd

Notas do Editor

  1. There is a lot here for...\n\ndevs, qa, ba and project leadership\n\nMeant to wet your whistle.\n
  2. A few things about me.\n
  3. A few things about me.\n
  4. A few things about me.\n
  5. A few things about me.\n
  6. A few things about me.\n
  7. A few things about me.\n
  8. A few things about me.\n
  9. A few things about me.\n
  10. A few things about me.\n
  11. A few things about me.\n
  12. A few things about me.\n
  13. A few things about me.\n
  14. A few things about me.\n
  15. A few things about me.\n
  16. A few things about me.\n
  17. A few things about me.\n
  18. A few things about me.\n
  19. A few things about me.\n
  20. A few things about me.\n
  21. I &amp;#x2018;fear the light&amp;#x2019;\n\nWhy do I care about this?\n
  22. \n
  23. our existences are about precise communication\n
  24. \n
  25. How many agilists in the room\n
  26. Nothing about standups, iterations, product owners, \n\nPeople analyze agile by checking how many of these practices you have put in place.\n\nAlready, we have lost our way.\n
  27. The ceremony has become our goal\n
  28. The ceremony has become our goal\n
  29. Not about process, not about ceremony, about delivering working software\n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. Consider the ATM problem\n
  38. Thinking about how to break apart a backlog into vertical slices requires us to step outside the understanding of the code and implementation and instead think about the backlog in small pieces of working functionality.\n
  39. \n
  40. \n
  41. \n
  42. IT needs to be able to move faster than the business must make decisions\n Tests from the perspective of the user\n Tests behavior of the system\n Executable requirements, codefied\n not disposable artifacts\n
  43. TESTING IS PART OF REQUIREMENTS GATHERING\n TDD is a development practice\n These are fairly accurate ratios\n
  44. \n
  45. \n
  46. \n
  47. \n
  48. Within the definition of a feature you can provide a plain text description of the story, focusing on three important questions:\n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. And can be used in any of the three sections\n It serves as nice shorthand for repeating the Given, When, or Then\n And stands in for whatever the most recent explicitly named step was\n
  57. \nRuby and .NET\n
  58. \nRuby and .NET\n
  59. \nRuby and .NET\n
  60. \nRuby and .NET\n
  61. \nRuby and .NET\n
  62. \nRuby and .NET\n
  63. \nRuby and .NET\n
  64. \nRuby and .NET\n
  65. 1) show feature code\n2) show features run\nRED IS BAD\nYELLOW IS NOT IMPLEMENTED\nGREEN IS GOOD\n3) show feature output\n
  66. \n
  67. \n
  68. \n