SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Tendances (20)

Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Introducing Agile User Stories
Introducing Agile User StoriesIntroducing Agile User Stories
Introducing Agile User Stories
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
BDD & Cucumber
BDD & CucumberBDD & Cucumber
BDD & Cucumber
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
Agile QA and Testing process
Agile QA and Testing processAgile QA and Testing process
Agile QA and Testing process
 
Agile Metrics
Agile MetricsAgile Metrics
Agile Metrics
 
How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User Stories
 
BDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVABDD WITH CUCUMBER AND JAVA
BDD WITH CUCUMBER AND JAVA
 
Workshop - Writing Good User Stories
Workshop - Writing Good User Stories Workshop - Writing Good User Stories
Workshop - Writing Good User Stories
 
Acceptance criteria
Acceptance criteriaAcceptance criteria
Acceptance criteria
 
User Stories explained
User Stories explainedUser Stories explained
User Stories explained
 
Agile Testing
Agile Testing  Agile Testing
Agile Testing
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Agile
Agile Agile
Agile
 
Test automation
Test automationTest automation
Test automation
 
Agile QA presentation
Agile QA presentationAgile QA presentation
Agile QA presentation
 
Documentation in the agile software development process
Documentation in the agile software development processDocumentation in the agile software development process
Documentation in the agile software development process
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
QA process Presentation
QA process PresentationQA process Presentation
QA process Presentation
 

En vedette

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
 
Acceptance criteria
Acceptance criteriaAcceptance criteria
Acceptance criteriaSoftheme
 

En vedette (20)

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)
 
Acceptance criteria
Acceptance criteriaAcceptance criteria
Acceptance criteria
 

Similaire à 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
 

Similaire à 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
 

Plus de Elisabeth Hendrickson

Plus de 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
 

Dernier

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Dernier (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

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