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

More Related Content

What's hot

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
 

What's hot (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 to 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 to 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
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
#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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
#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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 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