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

Xray for Jira - How to automate your QA process
Xray for Jira - How to automate your QA processXray for Jira - How to automate your QA process
Xray for Jira - How to automate your QA processXpand IT
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best PracticesTrisha Gee
 
What is Shift Left Testing.pdf
What is Shift Left Testing.pdfWhat is Shift Left Testing.pdf
What is Shift Left Testing.pdfTestbytes
 
Agile Development unleashed
Agile Development unleashedAgile Development unleashed
Agile Development unleashedlivgeni
 
What does a Scrum Master do, or should do, all day?
What does a Scrum Master do, or should do, all day? What does a Scrum Master do, or should do, all day?
What does a Scrum Master do, or should do, all day? Stefania Marinelli
 
Advanced Scrum master workshop
Advanced Scrum master workshopAdvanced Scrum master workshop
Advanced Scrum master workshopElad Sofer
 
Conceitos e fundamentos sobre testes de software e garantia da qualidade
Conceitos e fundamentos sobre testes de software e garantia da qualidadeConceitos e fundamentos sobre testes de software e garantia da qualidade
Conceitos e fundamentos sobre testes de software e garantia da qualidaderzauza
 
Choosing the right QA strategy for a successful project
Choosing the right QA strategy for a successful projectChoosing the right QA strategy for a successful project
Choosing the right QA strategy for a successful projectThe Software House
 
Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Aaron Bernstein
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing PyramidNaresh Jain
 
Introduction to Extreme Programming
Introduction to Extreme ProgrammingIntroduction to Extreme Programming
Introduction to Extreme ProgrammingNaresh Jain
 
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in Scrum
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in ScrumA. Kamran's DoD and DoR: Definition of Done and Definition of Ready in Scrum
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in ScrumArman Kamran
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginnersBugRaptors
 

Tendances (20)

Xray for Jira - How to automate your QA process
Xray for Jira - How to automate your QA processXray for Jira - How to automate your QA process
Xray for Jira - How to automate your QA process
 
Code Review
Code ReviewCode Review
Code Review
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best Practices
 
What is Shift Left Testing.pdf
What is Shift Left Testing.pdfWhat is Shift Left Testing.pdf
What is Shift Left Testing.pdf
 
Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Agile Development unleashed
Agile Development unleashedAgile Development unleashed
Agile Development unleashed
 
What does a Scrum Master do, or should do, all day?
What does a Scrum Master do, or should do, all day? What does a Scrum Master do, or should do, all day?
What does a Scrum Master do, or should do, all day?
 
Advanced Scrum master workshop
Advanced Scrum master workshopAdvanced Scrum master workshop
Advanced Scrum master workshop
 
Conceitos e fundamentos sobre testes de software e garantia da qualidade
Conceitos e fundamentos sobre testes de software e garantia da qualidadeConceitos e fundamentos sobre testes de software e garantia da qualidade
Conceitos e fundamentos sobre testes de software e garantia da qualidade
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 
Choosing the right QA strategy for a successful project
Choosing the right QA strategy for a successful projectChoosing the right QA strategy for a successful project
Choosing the right QA strategy for a successful project
 
Kanban VS Scrum
Kanban VS ScrumKanban VS Scrum
Kanban VS Scrum
 
Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)
 
Teste de Software
Teste de SoftwareTeste de Software
Teste de Software
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
 
Introduction to Extreme Programming
Introduction to Extreme ProgrammingIntroduction to Extreme Programming
Introduction to Extreme Programming
 
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in Scrum
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in ScrumA. Kamran's DoD and DoR: Definition of Done and Definition of Ready in Scrum
A. Kamran's DoD and DoR: Definition of Done and Definition of Ready in Scrum
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
 

En vedette

ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in PracticeSteven Mak
 
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
 

En vedette (20)

ATDD in Practice
ATDD in PracticeATDD in Practice
ATDD in Practice
 
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...
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
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)
 

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

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
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
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
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
 

Dernier (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
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
 
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
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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...
 
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
 

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