SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Beginning with the End
               in Mind: Driving
               Development with
               Acceptance Tests
                Elisabeth Hendrickson
                Quality Tree Software, Inc.
                www.qualitytree.com
                esh@qualitytree.com



                                      Last updated November 10, 2009
This work is licensed under the Creative Commons Attribution 3.0
United States License. View a copy of this license.
What is ATDD?
Acceptance-Test Driven Development (ATDD) Cycle
                        0&1(/.2
                        3,.4#15
                        -21&6
                        -21&6
                        -21&6
                        -21&6
                        -21&6




                                                                          Copyright © 2010 Quality Tree Software, Inc.
          0&1(/.2
                                  !$-./--                 '" (




                                                 *
                                                 + #" ,




                                                                 ) &" "
                                                                 *
                    !"#$%"&                 !"%"#17
(Model developed with Pekka Klärck, Bas Vodde, and Craig Larman.)
ATDD: Discuss



          !"#$%&'
          ()&*+#,                                  !"#$%&




                                                                  Copyright © 2010 Quality Tree Software, Inc.
                                                '(&%$)*#(&+(,
           -'#".
           -'#".
           -'#".
           -'#".                                     Concrete
                                                  Examples with
           -'#".                                   Expectations




(Slide developed in collaboration with Pekka Klärck.)
ATDD: Develop

                                          '*&+%","-."/,/




                                                           Copyright © 2010 Quality Tree Software, Inc.
                                          '()*+"&
                                           %#$&
                    !"#                     ,-(*
                                            .&/*/
                                              !"#$
           &
           ' (" )




                           $ %" "




                                              %#$&
                           &




(Slide developed in collaboration with Pekka Klärck.)
ATDD: Deliver




                                                        Copyright © 2010 Quality Tree Software, Inc.
                               Product
                            Feature Feature
                       Feature Feature
                            Feature
                       Feature
                            FeatureFeature
                           Feature
(Slide developed in collaboration with Pekka Klärck.)
Introducing an Example
Start with the Story



As an administrator, I want users
creating accounts to be required




                                    Copyright © 2010 Quality Tree Software, Inc.
to choose secure passwords so
that their accounts cannot be
hacked by someone using a
password guessing program.
Discuss
And if a user provides                           Who’s in the
an insecure password,                              room?
   display an error
                                                   Product
       message.
                                                   Owner,
                                                   Testers,




                                                            Copyright © 2010 Quality Tree Software, Inc.
                                                 Developers,
                                                and anyone
                                                else who will
                                                  touch the
          What does                                 story.
        “secure” mean
           to you?
                            At least 6 characters with
                              at least one letter, one
                             symbol, and one number.
Capture Concrete Expectations and Examples
Password             Valid?                        Can be
                                                expressed as
“p@ssw0rd”           Yes                       “Given - When -
“p@s5”               No                             Then”
“passw0rd”           No




                                                                    Copyright © 2010 Quality Tree Software, Inc.
                              Given a user is creating an account
“p@ssword”           No
                              When they specify an insecure
“@#$%1234”           No       password
        Or can be             Then they see a message,
    expressed in tables       “Passwords must be at least 6
                              characters long with at least one
   Or in other formats        letter, one number, and one
    depending on the          symbol.”
       Framework
Why ATDD?
Reason #1:
Drive Out Ambiguity
and Clarify
Expectations
This is not an Argument about a Bug
                    “Bug Triage Meeting”
                The Tuesday before release.

 It’s a bug.




                                                            Copyright © 2010 Quality Tree Software, Inc.
 No it’s not.
                                        Whether or not
                                        it’s a bug, if we
   Is too.                              make a change
                                         we’ll blow the
   IS NOT.                                  schedule.

  IS TOO!

NOT NOT NOT!
Acceptance Tests Define Scope




Copyright © 2010 Quality Tree Software, Inc.
A Short Digression on
ATDD-Friendly Tools
Examples of ATDD-Friendly Frameworks

• Cucumber: a Ruby-based BDD tool that
  supports “Given-When-Then”
• Fitnesse: a table-driven framework that
  uses a wiki for displaying and editing




                                            Copyright © 2010 Quality Tree Software, Inc.
  tests
• Robot Framework: keyword-driven
  framework that supports text or tables
• Concordion: Java-based framework for
  expressing expectations in prose
Frameworks, Interfaces, and Drivers
   Created in      Code written during
 collaboration.      development in a      GUI Driver
Format defined    programming language   (e.g. SeleniumRC)
     by the         determined by the
  framework            framework.




                                                             Copyright © 2010 Quality Tree Software, Inc.
                                               GUI

                                           Public API
                          Test
   Natural                                   “Guts”
                        “Fixture”
  Language
 Expectations                                 Other
                                           interfaces

                                         Implementation
Characteristics of ATDD-Friendly Frameworks
•  Support expressing expectations in a language
   and format that fits the context
•  Support collaboration among the whole team
   including developers, testers, & the product owner




                                                           Copyright © 2010 Quality Tree Software, Inc.
•  Connect expectations to the system under test
   with a minimum of test code (“fixtures,” “libraries,”
   “steps”) to leverage expectations as executable
   requirements
•  Play nicely with source control systems and
   continuous integration
•  Pluggable to support a variety of interfaces
Contrasting View: Traditional Test Automation

         GUI             Automated Test
                            Scripts:
      Public API         Combination of
        “Guts”          business-facing




                                                Copyright © 2010 Quality Tree Software, Inc.
                        expectations and
         Other           implementation
      interfaces            details.

    Implementation
                         Written or recorded
                            after the fact.
                          Expectations are
                           translated, not
                              leveraged.
Back to the Example…
Take the Acceptance Tests…
Password             Valid?
“p@ssw0rd”           Yes
“p@s5”               No
“passw0rd”           No




                                                                    Copyright © 2010 Quality Tree Software, Inc.
                              Given a user is creating an account
“p@ssword”           No
                              When they specify an insecure
“@#$%1234”           No       password

     (Note that these         Then they see a message,
     expectations are         “Passwords must be at least 6
 implementation-agnostic      characters long with at least one
   and express just the       letter, one number, and one
      essence of the          symbol.”
       expectation.)
…and Write the Code


Password     Valid?       Test               GUI
“p@ssw0rd”   Yes        “Fixture”
“p@s5”       No                           Public API




                                                         Copyright © 2010 Quality Tree Software, Inc.
“passw0rd”   No
                                            “Guts”
“p@ssword”   No
“@#$%1234”   No                              Other
                                          interfaces

                                        Implementation
Why ATDD?
Reason #2:
Make progress visible.
Are We There Yet?




Copyright © 2010 Quality Tree Software, Inc.
Why ATDD?
Reason #3:
Leverage, Efficiency,
and Executable
Specifications
Traditional Approaches


                       Requirements
                       Management
                          System




                                                   Copyright © 2010 Quality Tree Software, Inc.
                       Traceability
                         Matrix
                                         Test
  Technical                           Management
Specifications              ?           System
Efficiency, Reusability, Maintainability
                        Implementation
   The tests                                 New interface?
                        change? Make a
   define the                                Just add a test
                      localized update to
 requirements.                                  fixture
                        the test fixture.




                                                                 Copyright © 2010 Quality Tree Software, Inc.
   Natural                 Test
                         “Fixture”                  …
  Language
 Expectations
                                              New Interface

                                             Implementation


 (No reconciling        (Preserve valid     (Leverage relevant
multiple, duplicate     expectations.)        expectations.)
   artifacts.)
How does ATDD fit with
the rest of the process?
ATDD: Part of an Agile Testing Strategy


                    Support                  Critique

Business-




                                                               Copyright © 2010 Quality Tree Software, Inc.
   facing      Acceptance Tests        Exploratory Testing



   Code-                              Reviews, inspections,
   facing          Unit Tests              pairing, code
                                          quality metrics


   (A variation on Brian Marick’s Agile Testing Quadrants as
        published in his essay “Agile Testing Directions”)
Tests are Versioned with the Code
           Source Control

            Natural
           Language
          Expectations




                                    Copyright © 2010 Quality Tree Software, Inc.
                 Test
               “Fixture”
                 Code
         Unit Tests

               Production
                  Code
Tests Execute as Part of the Automated Build

                     Continuous Integration




                                                              Copyright © 2010 Quality Tree Software, Inc.
   Images courtesy Mike Clark, www.pragmaticautomation.com.
   Used with permission.
Why ATDD?
Reason #4:
No more bugs. (No, I’m
not kidding. But yes,
there is a catch.)
Zero Tolerance for Bugs




                                           Copyright © 2010 Quality Tree Software, Inc.
!"#$%"%&'%(                  !"#$%"%&'%(
   )'*+,                        )'*+,
But Not Everything is a Bug

                      In this context,
                           a BUG
                     is behavior that
                    violates the letter




                                                   Copyright © 2010 Quality Tree Software, Inc.
                      or spirit of the
                     Product Owner’s
                  expectations for the
                   implemented story.

 If the behavior does not violate expectations
related to the implemented stories, it’s an item
                for the backlog.
Given all that…
Why not ATDD?
Resources
Adzic, Gojko (2009). Bridging the Communication Gap:
   Specification by Example and Agile Acceptance Testing.
   Neuri Limited.
Crispin, Lisa (2005). “Using Customer Tests to Drive
   Development.” Methods & Tools. Summer 2005 Issue.




                                                                Copyright © 2010 Quality Tree Software, Inc.
   Available online at http://www.methodsandtools.com/
   archive/archive.php?id=23
Crispin, L., & Gregory, J. (2009). Agile Testing: A Practical
   Guide for Testers and Agile Teams (Addison-Wesley
   Signature Series (Cohn)). New York: Addison-wesley
   Professional.
Marick, Brian (2003). “Agile Testing Directions.” (An
   explanation of business-facing v. code- facing tests.)
   Available online at http://www.exampler.com/old-blog/
   2003/08/22/#agile- testing-project-2

Weitere ähnliche Inhalte

Was ist angesagt?

A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) CodeOps Technologies LLP
 
Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8a34sharm
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategytharindakasun
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comIdexcel Technologies
 
Agile Testing – embedding testing into agile software development lifecycle
Agile Testing – embedding testing into agile software development lifecycle Agile Testing – embedding testing into agile software development lifecycle
Agile Testing – embedding testing into agile software development lifecycle Kari Kakkonen
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)Suman Guha
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing PyramidNaresh Jain
 
Agile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrAgile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrXBOSoft
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projectssriks7
 
Test Strategy and Planning
Test Strategy and PlanningTest Strategy and Planning
Test Strategy and PlanningSachin-QA
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Kaizenko
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test AutomationNaveen Kumar Singh
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsIosif Itkin
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework DesignsSauce Labs
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 

Was ist angesagt? (20)

A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD)
 
Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8Role Of Qa And Testing In Agile 1225221397167302 8
Role Of Qa And Testing In Agile 1225221397167302 8
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategy
 
Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
Agile Testing – embedding testing into agile software development lifecycle
Agile Testing – embedding testing into agile software development lifecycle Agile Testing – embedding testing into agile software development lifecycle
Agile Testing – embedding testing into agile software development lifecycle
 
Agile Testing
Agile Testing Agile Testing
Agile Testing
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
 
Agile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and ZephyrAgile Test Management Using Jira and Zephyr
Agile Test Management Using Jira and Zephyr
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projects
 
Test Strategy and Planning
Test Strategy and PlanningTest Strategy and Planning
Test Strategy and Planning
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
TDD and BDD and ATDD
TDD and BDD and ATDDTDD and BDD and ATDD
TDD and BDD and ATDD
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
Testing & Quality Assurance
Testing & Quality AssuranceTesting & Quality Assurance
Testing & Quality Assurance
 

Andere mochten auch

ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in PracticeSteven Mak
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Zohirul Alam Tiemoon
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
On the Care and Feeding of Feedback Cycles
On the Care and Feeding of Feedback CyclesOn the Care and Feeding of Feedback Cycles
On the Care and Feeding of Feedback CyclesElisabeth Hendrickson
 
Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextElisabeth Hendrickson
 
Acceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleAcceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleGiuseppe Torchia
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsChristopher Bartling
 
Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)one80
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereDaniel Davis
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven DevelopmentViraf Karai
 
Habit 2 Begin with the End in Mind (Supatcha's)
Habit 2 Begin with the End in Mind (Supatcha's)Habit 2 Begin with the End in Mind (Supatcha's)
Habit 2 Begin with the End in Mind (Supatcha's)Neil Wilson Aritonang
 

Andere mochten auch (20)

ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in Practice
 
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
On the Care and Feeding of Feedback Cycles
On the Care and Feeding of Feedback CyclesOn the Care and Feeding of Feedback Cycles
On the Care and Feeding of Feedback Cycles
 
Agile Testing Overview
Agile Testing OverviewAgile Testing Overview
Agile Testing Overview
 
The Thinking Tester, Evolved
The Thinking Tester, EvolvedThe Thinking Tester, Evolved
The Thinking Tester, Evolved
 
Exploratory Testing in an Agile Context
Exploratory Testing in an Agile ContextExploratory Testing in an Agile Context
Exploratory Testing in an Agile Context
 
Exploratory Testing in Practice
Exploratory Testing in PracticeExploratory Testing in Practice
Exploratory Testing in Practice
 
Agile Quality and Risk Management
Agile Quality and Risk ManagementAgile Quality and Risk Management
Agile Quality and Risk Management
 
ATDD in practice
ATDD in practiceATDD in practice
ATDD in practice
 
Acceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleAcceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycle
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And Friends
 
Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)
 
TDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & WhereTDD vs. ATDD - What, Why, Which, When & Where
TDD vs. ATDD - What, Why, Which, When & Where
 
Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.
 
Acceptance Test Driven Development
Acceptance Test Driven DevelopmentAcceptance Test Driven Development
Acceptance Test Driven Development
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
TDD, BDD and mocks
TDD, BDD and mocksTDD, BDD and mocks
TDD, BDD and mocks
 
Habit 2 Begin with the End in Mind (Supatcha's)
Habit 2 Begin with the End in Mind (Supatcha's)Habit 2 Begin with the End in Mind (Supatcha's)
Habit 2 Begin with the End in Mind (Supatcha's)
 

Ähnlich wie Introduction to Acceptance Test Driven Development

Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...André Goliath
 
Creating Realistic User Experiences with Interactive Prototypes
Creating Realistic User Experiences with Interactive PrototypesCreating Realistic User Experiences with Interactive Prototypes
Creating Realistic User Experiences with Interactive PrototypesPerficient, Inc.
 
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive ServicesAzure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Servicesdotnetcode
 
Install Offline Client for Oracle CRM on Demand
Install Offline Client for Oracle CRM on DemandInstall Offline Client for Oracle CRM on Demand
Install Offline Client for Oracle CRM on DemandDaniel Jordan
 
Crm gadget 2 go install
Crm gadget 2 go installCrm gadget 2 go install
Crm gadget 2 go installDaniel Jordan
 
CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011JUG Lausanne
 
Open Sourcing the User Experience for the IoT
Open Sourcing the User Experience for the IoTOpen Sourcing the User Experience for the IoT
Open Sourcing the User Experience for the IoTAllSeen Alliance
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.David Nuescheler
 
Microsoft Cognitive Services & Bot Framework - Universidade Fernando Pessoa
Microsoft Cognitive Services & Bot Framework - Universidade Fernando PessoaMicrosoft Cognitive Services & Bot Framework - Universidade Fernando Pessoa
Microsoft Cognitive Services & Bot Framework - Universidade Fernando PessoaRui Quintino
 
JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)Siddhartha Shankar
 
Make the Cloud Less Cloudy: A Perspective for Software Development Teams
Make the Cloud Less Cloudy: A Perspective for Software Development TeamsMake the Cloud Less Cloudy: A Perspective for Software Development Teams
Make the Cloud Less Cloudy: A Perspective for Software Development TeamsTechWell
 
Spare clive grinyer
Spare   clive grinyerSpare   clive grinyer
Spare clive grinyerlightningUX
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDay Software
 
A Gentle Intro to Deep Learning
A Gentle Intro to Deep LearningA Gentle Intro to Deep Learning
A Gentle Intro to Deep LearningGabe Hollombe
 
Scalable code Design with slimmer Django models .. and more
Scalable code  Design with slimmer Django models .. and moreScalable code  Design with slimmer Django models .. and more
Scalable code Design with slimmer Django models .. and moreDawa Sherpa
 
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...Amazon Web Services
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)Amazon Web Services Japan
 
Application Logging for fun and profit. Houston TechFest 2012
Application Logging for fun and profit.  Houston TechFest 2012Application Logging for fun and profit.  Houston TechFest 2012
Application Logging for fun and profit. Houston TechFest 2012Jane Prusakova
 
Elisa cloud announcement
Elisa cloud announcementElisa cloud announcement
Elisa cloud announcementPasi Maenpaa
 

Ähnlich wie Introduction to Acceptance Test Driven Development (20)

Agile: Get Real
Agile: Get RealAgile: Get Real
Agile: Get Real
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 
Creating Realistic User Experiences with Interactive Prototypes
Creating Realistic User Experiences with Interactive PrototypesCreating Realistic User Experiences with Interactive Prototypes
Creating Realistic User Experiences with Interactive Prototypes
 
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive ServicesAzure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
Azure Meetup: Novità CosmosDB modalità Serverless e Cognitive Services
 
Install Offline Client for Oracle CRM on Demand
Install Offline Client for Oracle CRM on DemandInstall Offline Client for Oracle CRM on Demand
Install Offline Client for Oracle CRM on Demand
 
Crm gadget 2 go install
Crm gadget 2 go installCrm gadget 2 go install
Crm gadget 2 go install
 
CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011CloudBees - Sacha Labourey - May 2011
CloudBees - Sacha Labourey - May 2011
 
Open Sourcing the User Experience for the IoT
Open Sourcing the User Experience for the IoTOpen Sourcing the User Experience for the IoT
Open Sourcing the User Experience for the IoT
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.
 
Microsoft Cognitive Services & Bot Framework - Universidade Fernando Pessoa
Microsoft Cognitive Services & Bot Framework - Universidade Fernando PessoaMicrosoft Cognitive Services & Bot Framework - Universidade Fernando Pessoa
Microsoft Cognitive Services & Bot Framework - Universidade Fernando Pessoa
 
JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)JaanSi Solutions & Services profile (v1.0)
JaanSi Solutions & Services profile (v1.0)
 
Make the Cloud Less Cloudy: A Perspective for Software Development Teams
Make the Cloud Less Cloudy: A Perspective for Software Development TeamsMake the Cloud Less Cloudy: A Perspective for Software Development Teams
Make the Cloud Less Cloudy: A Perspective for Software Development Teams
 
Spare clive grinyer
Spare   clive grinyerSpare   clive grinyer
Spare clive grinyer
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
 
A Gentle Intro to Deep Learning
A Gentle Intro to Deep LearningA Gentle Intro to Deep Learning
A Gentle Intro to Deep Learning
 
Scalable code Design with slimmer Django models .. and more
Scalable code  Design with slimmer Django models .. and moreScalable code  Design with slimmer Django models .. and more
Scalable code Design with slimmer Django models .. and more
 
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...
[REPEAT 1] Architecting Security & Governance across your AWS Landing Zone (S...
 
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
 
Application Logging for fun and profit. Houston TechFest 2012
Application Logging for fun and profit.  Houston TechFest 2012Application Logging for fun and profit.  Houston TechFest 2012
Application Logging for fun and profit. Houston TechFest 2012
 
Elisa cloud announcement
Elisa cloud announcementElisa cloud announcement
Elisa cloud announcement
 

Mehr von Elisabeth Hendrickson

Mehr von Elisabeth Hendrickson (7)

Influence > Authority
Influence > AuthorityInfluence > Authority
Influence > Authority
 
Agility for Data
Agility for DataAgility for Data
Agility for Data
 
#LFMF: Tales of Test Automation Gone Wrong
#LFMF: Tales of Test Automation Gone Wrong #LFMF: Tales of Test Automation Gone Wrong
#LFMF: Tales of Test Automation Gone Wrong
 
AGILEEE Friday 17:15 Talk
AGILEEE Friday 17:15 TalkAGILEEE Friday 17:15 Talk
AGILEEE Friday 17:15 Talk
 
Entaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case StudyEntaggle: an Agile Software Development Case Study
Entaggle: an Agile Software Development Case Study
 
Wclessons atd-sm
Wclessons atd-smWclessons atd-sm
Wclessons atd-sm
 
Agile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All WorksAgile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All Works
 

Kürzlich hochgeladen

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Kürzlich hochgeladen (20)

Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

Introduction to Acceptance Test Driven Development

  • 1. Beginning with the End in Mind: Driving Development with Acceptance Tests Elisabeth Hendrickson Quality Tree Software, Inc. www.qualitytree.com esh@qualitytree.com Last updated November 10, 2009 This work is licensed under the Creative Commons Attribution 3.0 United States License. View a copy of this license.
  • 3. Acceptance-Test Driven Development (ATDD) Cycle 0&1(/.2 3,.4#15 -21&6 -21&6 -21&6 -21&6 -21&6 Copyright © 2010 Quality Tree Software, Inc. 0&1(/.2 !$-./-- '" ( * + #" , ) &" " * !"#$%"& !"%"#17 (Model developed with Pekka Klärck, Bas Vodde, and Craig Larman.)
  • 4. ATDD: Discuss !"#$%&' ()&*+#, !"#$%& Copyright © 2010 Quality Tree Software, Inc. '(&%$)*#(&+(, -'#". -'#". -'#". -'#". Concrete Examples with -'#". Expectations (Slide developed in collaboration with Pekka Klärck.)
  • 5. ATDD: Develop '*&+%","-."/,/ Copyright © 2010 Quality Tree Software, Inc. '()*+"& %#$& !"# ,-(* .&/*/ !"#$ & ' (" ) $ %" " %#$& & (Slide developed in collaboration with Pekka Klärck.)
  • 6. ATDD: Deliver Copyright © 2010 Quality Tree Software, Inc. Product Feature Feature Feature Feature Feature Feature FeatureFeature Feature (Slide developed in collaboration with Pekka Klärck.)
  • 8. Start with the Story As an administrator, I want users creating accounts to be required Copyright © 2010 Quality Tree Software, Inc. to choose secure passwords so that their accounts cannot be hacked by someone using a password guessing program.
  • 9. Discuss And if a user provides Who’s in the an insecure password, room? display an error Product message. Owner, Testers, Copyright © 2010 Quality Tree Software, Inc. Developers, and anyone else who will touch the What does story. “secure” mean to you? At least 6 characters with at least one letter, one symbol, and one number.
  • 10. Capture Concrete Expectations and Examples Password Valid? Can be expressed as “p@ssw0rd” Yes “Given - When - “p@s5” No Then” “passw0rd” No Copyright © 2010 Quality Tree Software, Inc. Given a user is creating an account “p@ssword” No When they specify an insecure “@#$%1234” No password Or can be Then they see a message, expressed in tables “Passwords must be at least 6 characters long with at least one Or in other formats letter, one number, and one depending on the symbol.” Framework
  • 11. Why ATDD? Reason #1: Drive Out Ambiguity and Clarify Expectations
  • 12. This is not an Argument about a Bug “Bug Triage Meeting” The Tuesday before release. It’s a bug. Copyright © 2010 Quality Tree Software, Inc. No it’s not. Whether or not it’s a bug, if we Is too. make a change we’ll blow the IS NOT. schedule. IS TOO! NOT NOT NOT!
  • 13. Acceptance Tests Define Scope Copyright © 2010 Quality Tree Software, Inc.
  • 14. A Short Digression on ATDD-Friendly Tools
  • 15. Examples of ATDD-Friendly Frameworks • Cucumber: a Ruby-based BDD tool that supports “Given-When-Then” • Fitnesse: a table-driven framework that uses a wiki for displaying and editing Copyright © 2010 Quality Tree Software, Inc. tests • Robot Framework: keyword-driven framework that supports text or tables • Concordion: Java-based framework for expressing expectations in prose
  • 16. Frameworks, Interfaces, and Drivers Created in Code written during collaboration. development in a GUI Driver Format defined programming language (e.g. SeleniumRC) by the determined by the framework framework. Copyright © 2010 Quality Tree Software, Inc. GUI Public API Test Natural “Guts” “Fixture” Language Expectations Other interfaces Implementation
  • 17. Characteristics of ATDD-Friendly Frameworks •  Support expressing expectations in a language and format that fits the context •  Support collaboration among the whole team including developers, testers, & the product owner Copyright © 2010 Quality Tree Software, Inc. •  Connect expectations to the system under test with a minimum of test code (“fixtures,” “libraries,” “steps”) to leverage expectations as executable requirements •  Play nicely with source control systems and continuous integration •  Pluggable to support a variety of interfaces
  • 18. Contrasting View: Traditional Test Automation GUI Automated Test Scripts: Public API Combination of “Guts” business-facing Copyright © 2010 Quality Tree Software, Inc. expectations and Other implementation interfaces details. Implementation Written or recorded after the fact. Expectations are translated, not leveraged.
  • 19. Back to the Example…
  • 20. Take the Acceptance Tests… Password Valid? “p@ssw0rd” Yes “p@s5” No “passw0rd” No Copyright © 2010 Quality Tree Software, Inc. Given a user is creating an account “p@ssword” No When they specify an insecure “@#$%1234” No password (Note that these Then they see a message, expectations are “Passwords must be at least 6 implementation-agnostic characters long with at least one and express just the letter, one number, and one essence of the symbol.” expectation.)
  • 21. …and Write the Code Password Valid? Test GUI “p@ssw0rd” Yes “Fixture” “p@s5” No Public API Copyright © 2010 Quality Tree Software, Inc. “passw0rd” No “Guts” “p@ssword” No “@#$%1234” No Other interfaces Implementation
  • 22. Why ATDD? Reason #2: Make progress visible.
  • 23. Are We There Yet? Copyright © 2010 Quality Tree Software, Inc.
  • 24. Why ATDD? Reason #3: Leverage, Efficiency, and Executable Specifications
  • 25. Traditional Approaches Requirements Management System Copyright © 2010 Quality Tree Software, Inc. Traceability Matrix Test Technical Management Specifications ? System
  • 26. Efficiency, Reusability, Maintainability Implementation The tests New interface? change? Make a define the Just add a test localized update to requirements. fixture the test fixture. Copyright © 2010 Quality Tree Software, Inc. Natural Test “Fixture” … Language Expectations New Interface Implementation (No reconciling (Preserve valid (Leverage relevant multiple, duplicate expectations.) expectations.) artifacts.)
  • 27. How does ATDD fit with the rest of the process?
  • 28. ATDD: Part of an Agile Testing Strategy Support Critique Business- Copyright © 2010 Quality Tree Software, Inc. facing Acceptance Tests Exploratory Testing Code- Reviews, inspections, facing Unit Tests pairing, code quality metrics (A variation on Brian Marick’s Agile Testing Quadrants as published in his essay “Agile Testing Directions”)
  • 29. Tests are Versioned with the Code Source Control Natural Language Expectations Copyright © 2010 Quality Tree Software, Inc. Test “Fixture” Code Unit Tests Production Code
  • 30. Tests Execute as Part of the Automated Build Continuous Integration Copyright © 2010 Quality Tree Software, Inc. Images courtesy Mike Clark, www.pragmaticautomation.com. Used with permission.
  • 31. Why ATDD? Reason #4: No more bugs. (No, I’m not kidding. But yes, there is a catch.)
  • 32. Zero Tolerance for Bugs Copyright © 2010 Quality Tree Software, Inc. !"#$%"%&'%( !"#$%"%&'%( )'*+, )'*+,
  • 33. But Not Everything is a Bug In this context, a BUG is behavior that violates the letter Copyright © 2010 Quality Tree Software, Inc. or spirit of the Product Owner’s expectations for the implemented story. If the behavior does not violate expectations related to the implemented stories, it’s an item for the backlog.
  • 35. Resources Adzic, Gojko (2009). Bridging the Communication Gap: Specification by Example and Agile Acceptance Testing. Neuri Limited. Crispin, Lisa (2005). “Using Customer Tests to Drive Development.” Methods & Tools. Summer 2005 Issue. Copyright © 2010 Quality Tree Software, Inc. Available online at http://www.methodsandtools.com/ archive/archive.php?id=23 Crispin, L., & Gregory, J. (2009). Agile Testing: A Practical Guide for Testers and Agile Teams (Addison-Wesley Signature Series (Cohn)). New York: Addison-wesley Professional. Marick, Brian (2003). “Agile Testing Directions.” (An explanation of business-facing v. code- facing tests.) Available online at http://www.exampler.com/old-blog/ 2003/08/22/#agile- testing-project-2