SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Introduction and Strategies
     for Effective ATDD

                      Agile Day – Twin Cities
                                    Nov 11, 2011
                   Brian Repko
         brian.repko@learnthinkcode.com
 Copyright 2011 LearnThinkCode, Inc.
 This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Agenda
●
    Introduction to ATDD
         ●
             What it is
         ●
             How it works
         ●
             Tools
●
    Agile and ATDD
●
    Three Challenges / Strategies




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Introduction to ATDD/BDD
●
    Acceptance Test Driven Development
         ●
             Pioneered with FIT/Fitnesse
         ●
             System or Solution (multi-system)
         ●
             Readable and Executable Specifications
         ●
             Requires “Fixture” code
●
    Behavior Driven Development
         ●
             Introduced by Dan North (2003)
         ●
             Early on, referred to as “TDD done well”
         ●
             Business language / Given-When-Then


      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
How ATDD/BDD Tools Work
●
    Typically 4 pieces
          ●
              A system to test!
          ●
              An ATDD/BDD framework/tool
          ●
              Specifications/stories/tests (text/html)
          ●
              Fixtures/steps (code)
                         ●
                             Accessible to the framework
                         ●
                             Manipulates/verifies the system to test
●
    Framework parses the story, calls methods in the
    steps code which manipulates/verifies the system
●
    Most tools use regex matching to connect story text
    to steps methods and support befores/afters

       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
An example
Scenario: Authentication within the                             @Given("an organization named $orgNames")
timeframe
                                                                @Alias("organizations named $orgNames")
Given an organization named Cisco
                                                                public void
                                                                createOrganizationWithName(List<String>
And authentication policy for Cisco:                            orgNames) {

|passwordAutoExpire|passwordExpiryDays|                         ...

|true|30|                                                           }

And the users for Cisco:

|username|passwordCleartext|                                    @Given("authentication policy for $orgName:
                                                                $authPolicyTable")
lastPasswordResetDate|
                                                                public void
|lenbosack|password|t-15|                                       updateOrganizationWithDefaultAuthPolicy(String
                                                                orgName, ExamplesTable table) {
|sandylerner|password|t-45|
                                                                …
When current organization is Cisco
                                                                    }
And user lenbosack authenticates with
password password

Then user should be authenticated


        Copyright 2011 LearnThinkCode, Inc.
        This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Common Challenges
●
    What to test – Unit vs System Testing
         ●
             Unit/Mock for exception handling
         ●
             Unit Testing – fast feedback
         ●
             System Testing – full functionality




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Common Challenges
●
    How to Setup, Access and Verify the SUT
         ●
             Access different from Setup/Verify
         ●
             Need the System to support configuration




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
ATDD/BDD Testing Tools
●
    Open Source Frameworks/Tools
          ●
              FIT, Cucumber (ruby), JBehave (java), Lettuce (python),
                Behat (php), Spock (groovy), SpecFlow (.NET), EasyB
                (groovy), Concordian (java), *Spec, Thucydides
          ●
              Gherkin language for specifications
                         ●
                             Cucumber, Lettuce, SpecFlow, Behat - JBehave is close
●
    Integration (invoking) Technologies
          ●
              Browser – Selenium, Wati*, iMacros, WebAii
          ●
              Java UI – UISpec4J, java.awt.Robot
          ●
              Web Services – curl, Jersey, CXF, SoapUI, HTTP Client



       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
ATDD/BDD Testing Tools
●
    Resource / System Stubs
         ●
             In-Memory, Lightweight Databases
                        ●
                            H2, HSQLDB, OracleXE
                        ●
                            DbUnit, DbFIT (setup and verify)
         ●
             Messaging - ActiveMQ
         ●
             SMTP – DevNull
●
    System Stubs
         ●
             Custom / Groovy-Grails
●
    Environments
         ●
             SauceLabs
         ●
             Puppet / Chef / Vagrant
      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Agile and ATDD
●
    Defines (and Proves!) “Done“
          ●
              Understood by everyone
          ●
              Serves as documentation
●
    Test-first as part of story prep
          ●
              Add the specification but its not “on”
          ●
              Can run it without steps – PENDING
●
    System and solution (multi-system)
          ●
              Test a configured system or set of systems
●
    Part of Continuous Deployment pipeline
          ●
              Define stage gates in your pipeline
          ●
              Do varying types / amounts of tests
       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Challenges / Strategies (1)
●
    My system depends on another system
         ●
             Just call it
                        ●
                            Can you reuse step classes?
         ●
             Just stub it out
                        ●
                            Can you setup a mock in your system?
                        ●
                            Can you stub out the system?




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Challenges / Strategies (2)
●
    I have a resource (printed receipt) that I
    can't verify with code
         ●
             Take the API that access the resource
         ●
             Write/Create a “delegating wrapper”
         ●
             The wrapper will record all method calls
         ●
             Connect with the wrapper to verify




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Challenges / Strategies (3)
●
    Testing everything takes too much time
         ●
             Run the same story with different steps
                        ●
                            Step classes that drive the UI (slow)
                        ●
                            Step classes that run in the JVM / services
         ●
             80/20 rule (change vs nightly)
         ●
             Fail-Fast strategy
         ●
             Parallelization




      Copyright 2011 LearnThinkCode, Inc.
      This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
References
●
    Gojko Adzic
          ●
              “Bridging the Communication Gap”
          ●
              “Specification by Example”
●
    FIT - http://fit.c2.com
●
    Fitnesse - http://fitnesse.org
●
    Cucumber - http://cukes.info
●
    JBehave – http://jbehave.org
●
    SpecFlow - http://specflow.org/
●
    Spock - http://code.google.com/p/spock/

       Copyright 2011 LearnThinkCode, Inc.
       This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Q/A – Thank You!




   Copyright 2011 LearnThinkCode, Inc.
   This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

Contenu connexe

Tendances

DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDETDevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDETDevLabs Alliance
 
Top 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetTop 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetDevLabs Alliance
 
Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Stephan Hochdörfer
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java BasicsVicter Paul
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedyearninginjava
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDKBeMyApp
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Arun Kumar
 
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database RefactoringAnton Keks
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
 

Tendances (16)

DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDETDevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDET
 
Top 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetTop 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdet
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11Testing untestable code - PHPBNL11
Testing untestable code - PHPBNL11
 
1
11
1
 
Java - OOPS and Java Basics
Java - OOPS and Java BasicsJava - OOPS and Java Basics
Java - OOPS and Java Basics
 
Java Faqs useful for freshers and experienced
Java Faqs useful for freshers and experiencedJava Faqs useful for freshers and experienced
Java Faqs useful for freshers and experienced
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
CFEngine 3
CFEngine 3CFEngine 3
CFEngine 3
 
Tdd and-bdd
Tdd and-bddTdd and-bdd
Tdd and-bdd
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
 
OSGi overview
OSGi overviewOSGi overview
OSGi overview
 
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database Refactoring
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 

Similaire à Agile Days Twin Cities 2011

Improve your development skills with Test Driven Development
Improve your development skills with Test Driven DevelopmentImprove your development skills with Test Driven Development
Improve your development skills with Test Driven DevelopmentJohn Stevenson
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101Itiel Shwartz
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowRachid Kherrazi
 
Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowRachid Kherrazi
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...Sakari Hoisko
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Robin O'Brien
 
How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?Dmitry Buzdin
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
Unit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeUnit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeBlueFish
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsLinards Liep
 
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...mfrancis
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads ConferenceIndicThreads
 
Unit Testing DFC
Unit Testing DFCUnit Testing DFC
Unit Testing DFCBlueFish
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
30 days or less: New Features to Production
30 days or less: New Features to Production30 days or less: New Features to Production
30 days or less: New Features to ProductionKarthik Gaekwad
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesTriTAUG
 

Similaire à Agile Days Twin Cities 2011 (20)

Crucible
CrucibleCrucible
Crucible
 
Improve your development skills with Test Driven Development
Improve your development skills with Test Driven DevelopmentImprove your development skills with Test Driven Development
Improve your development skills with Test Driven Development
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
Behavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlowBehavior Driven Development with SpecFlow
Behavior Driven Development with SpecFlow
 
Behavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlowBehavior Driven Testing with SpecFlow
Behavior Driven Testing with SpecFlow
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...
Tampere Technical University - Seminar Presentation in testind day 2016 - Sca...
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Unit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeUnit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes Code
 
Ci tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepinsCi tips and_tricks_linards_liepins
Ci tips and_tricks_linards_liepins
 
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
 
Web Test Automation Framework - IndicThreads Conference
Web Test Automation Framework  - IndicThreads ConferenceWeb Test Automation Framework  - IndicThreads Conference
Web Test Automation Framework - IndicThreads Conference
 
Unit Testing DFC
Unit Testing DFCUnit Testing DFC
Unit Testing DFC
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
30 days or less: New Features to Production
30 days or less: New Features to Production30 days or less: New Features to Production
30 days or less: New Features to Production
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and Challenges
 

Dernier

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Dernier (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Agile Days Twin Cities 2011

  • 1. Introduction and Strategies for Effective ATDD Agile Day – Twin Cities Nov 11, 2011 Brian Repko brian.repko@learnthinkcode.com Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 2. Agenda ● Introduction to ATDD ● What it is ● How it works ● Tools ● Agile and ATDD ● Three Challenges / Strategies Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 3. Introduction to ATDD/BDD ● Acceptance Test Driven Development ● Pioneered with FIT/Fitnesse ● System or Solution (multi-system) ● Readable and Executable Specifications ● Requires “Fixture” code ● Behavior Driven Development ● Introduced by Dan North (2003) ● Early on, referred to as “TDD done well” ● Business language / Given-When-Then Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 4. How ATDD/BDD Tools Work ● Typically 4 pieces ● A system to test! ● An ATDD/BDD framework/tool ● Specifications/stories/tests (text/html) ● Fixtures/steps (code) ● Accessible to the framework ● Manipulates/verifies the system to test ● Framework parses the story, calls methods in the steps code which manipulates/verifies the system ● Most tools use regex matching to connect story text to steps methods and support befores/afters Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 5. An example Scenario: Authentication within the @Given("an organization named $orgNames") timeframe @Alias("organizations named $orgNames") Given an organization named Cisco public void createOrganizationWithName(List<String> And authentication policy for Cisco: orgNames) { |passwordAutoExpire|passwordExpiryDays| ... |true|30| } And the users for Cisco: |username|passwordCleartext| @Given("authentication policy for $orgName: $authPolicyTable") lastPasswordResetDate| public void |lenbosack|password|t-15| updateOrganizationWithDefaultAuthPolicy(String orgName, ExamplesTable table) { |sandylerner|password|t-45| … When current organization is Cisco } And user lenbosack authenticates with password password Then user should be authenticated Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 6. Common Challenges ● What to test – Unit vs System Testing ● Unit/Mock for exception handling ● Unit Testing – fast feedback ● System Testing – full functionality Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 7. Common Challenges ● How to Setup, Access and Verify the SUT ● Access different from Setup/Verify ● Need the System to support configuration Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 8. ATDD/BDD Testing Tools ● Open Source Frameworks/Tools ● FIT, Cucumber (ruby), JBehave (java), Lettuce (python), Behat (php), Spock (groovy), SpecFlow (.NET), EasyB (groovy), Concordian (java), *Spec, Thucydides ● Gherkin language for specifications ● Cucumber, Lettuce, SpecFlow, Behat - JBehave is close ● Integration (invoking) Technologies ● Browser – Selenium, Wati*, iMacros, WebAii ● Java UI – UISpec4J, java.awt.Robot ● Web Services – curl, Jersey, CXF, SoapUI, HTTP Client Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 9. ATDD/BDD Testing Tools ● Resource / System Stubs ● In-Memory, Lightweight Databases ● H2, HSQLDB, OracleXE ● DbUnit, DbFIT (setup and verify) ● Messaging - ActiveMQ ● SMTP – DevNull ● System Stubs ● Custom / Groovy-Grails ● Environments ● SauceLabs ● Puppet / Chef / Vagrant Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 10. Agile and ATDD ● Defines (and Proves!) “Done“ ● Understood by everyone ● Serves as documentation ● Test-first as part of story prep ● Add the specification but its not “on” ● Can run it without steps – PENDING ● System and solution (multi-system) ● Test a configured system or set of systems ● Part of Continuous Deployment pipeline ● Define stage gates in your pipeline ● Do varying types / amounts of tests Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 11. Challenges / Strategies (1) ● My system depends on another system ● Just call it ● Can you reuse step classes? ● Just stub it out ● Can you setup a mock in your system? ● Can you stub out the system? Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 12. Challenges / Strategies (2) ● I have a resource (printed receipt) that I can't verify with code ● Take the API that access the resource ● Write/Create a “delegating wrapper” ● The wrapper will record all method calls ● Connect with the wrapper to verify Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 13. Challenges / Strategies (3) ● Testing everything takes too much time ● Run the same story with different steps ● Step classes that drive the UI (slow) ● Step classes that run in the JVM / services ● 80/20 rule (change vs nightly) ● Fail-Fast strategy ● Parallelization Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 14. References ● Gojko Adzic ● “Bridging the Communication Gap” ● “Specification by Example” ● FIT - http://fit.c2.com ● Fitnesse - http://fitnesse.org ● Cucumber - http://cukes.info ● JBehave – http://jbehave.org ● SpecFlow - http://specflow.org/ ● Spock - http://code.google.com/p/spock/ Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
  • 15. Q/A – Thank You! Copyright 2011 LearnThinkCode, Inc. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License