SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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)
 

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

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

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

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