SlideShare a Scribd company logo
1 of 35
Download to read offline
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

More Related Content

What's hot (20)

Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
CI CD Basics
CI CD BasicsCI CD Basics
CI CD Basics
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
An introduction to DevOps
An introduction to DevOpsAn introduction to DevOps
An introduction to DevOps
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Devops online training ppt
Devops online training pptDevops online training ppt
Devops online training ppt
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Track code quality with SonarQube
Track code quality with SonarQubeTrack code quality with SonarQube
Track code quality with SonarQube
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
DevOps
DevOps DevOps
DevOps
 
Automation testing
Automation testingAutomation testing
Automation testing
 
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
CI/CD Overview
CI/CD OverviewCI/CD Overview
CI/CD Overview
 

Viewers also liked

ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
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
 
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
 
Agile Acceptance Criteria How To
Agile Acceptance Criteria How ToAgile Acceptance Criteria How To
Agile Acceptance Criteria How ToPayton Consulting
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)Brian Rasmussen
 

Viewers also liked (20)

ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
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...
 
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)
 
Agile Acceptance Criteria How To
Agile Acceptance Criteria How ToAgile Acceptance Criteria How To
Agile Acceptance Criteria How To
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)
 

Similar to 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
 

Similar to 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
 

More from Elisabeth Hendrickson

More from 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
 

Recently uploaded

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 

Recently uploaded (20)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
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
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 

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