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

More Related Content

PDF
Quality at Speed - Penny Wyatt
PDF
Heavenly hell – automated tests at scale wojciech seliga
PDF
Deployment Nirvana
KEY
improving the performance of Rails web Applications
PDF
Agile at LIC (GTPF 2011)
PDF
London Atlassian User Group - February 2014
KEY
WTF TDD?
KEY
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Quality at Speed - Penny Wyatt
Heavenly hell – automated tests at scale wojciech seliga
Deployment Nirvana
improving the performance of Rails web Applications
Agile at LIC (GTPF 2011)
London Atlassian User Group - February 2014
WTF TDD?
Pragmatic Continuous Delivery - ReaktorDevDay 2012

What's hot (20)

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

Similar to Introduction to atdd (20)

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

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
MIND Revenue Release Quarter 2 2025 Press Release
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Introduction to atdd

Editor's Notes

  • #2: There is a lot here for...\n\ndevs, qa, ba and project leadership\n\nMeant to wet your whistle.\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: A few things about me.\n
  • #22: I &amp;#x2018;fear the light&amp;#x2019;\n\nWhy do I care about this?\n
  • #23: \n
  • #24: our existences are about precise communication\n
  • #25: \n
  • #26: How many agilists in the room\n
  • #27: 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
  • #28: The ceremony has become our goal\n
  • #29: The ceremony has become our goal\n
  • #30: Not about process, not about ceremony, about delivering working software\n
  • #31: \n
  • #32: \n
  • #33: \n
  • #34: \n
  • #35: \n
  • #36: \n
  • #37: \n
  • #38: Consider the ATM problem\n
  • #39: 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
  • #40: \n
  • #41: \n
  • #42: \n
  • #43: 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
  • #44: TESTING IS PART OF REQUIREMENTS GATHERING\n TDD is a development practice\n These are fairly accurate ratios\n
  • #45: \n
  • #46: \n
  • #47: \n
  • #48: \n
  • #49: Within the definition of a feature you can provide a plain text description of the story, focusing on three important questions:\n
  • #50: \n
  • #51: \n
  • #52: \n
  • #53: \n
  • #54: \n
  • #55: \n
  • #56: \n
  • #57: 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
  • #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: \nRuby and .NET\n
  • #66: 1) show feature code\n2) show features run\nRED IS BAD\nYELLOW IS NOT IMPLEMENTED\nGREEN IS GOOD\n3) show feature output\n
  • #67: \n
  • #68: \n
  • #69: \n