SlideShare a Scribd company logo
1 of 44
Download to read offline
Testing in an Agile Context

    ā€œWhat he needs is some way to pay back. Not some way to borrow more.ā€
       - Will Rogers



                                                                 Chris Sterling
                                                                           VP of Engineering
                                                                            AgileEVM Inc.
                                                                Web: www.AgileEVM.com
                                                              Email: chris@agileevm.com
                                                            Blog: www.GettingAgile.com
                                                           Follow Me on Twitter: @csterwa
                                                        Hash Tag for Presentation: #swdebt
Wednesday, June 8, 2011
Chris Sterling ā€“ Sterling Barton, LLC
             Partner, Sterling Barton, LLC
             Author of Book ā€œManaging Software
             Debt: Building for Inevitable
             Changeā€
             Consults on software technology,
             Agile technical practices, Scrum,
             and effective management
             techniques
                                                 Email: chris@sterlingbarton.com
                                                 Web: http://www.agileevm.com
             Certiļ¬ed Scrum Trainer              Blog: http://www.gettingagile.com
                                                 Follow me on Twitter: @csterwa
             Innovation GamesĀ® Trained
             Facilitator
             Open Source Developer
  Ā© 2009-2010,                                                                  2


Wednesday, June 8, 2011
Presentation Agenda

            Agile - Find Issues Earlier

            Effects of Quality Debt

            Deļ¬nition of Done

            Quality Dashboard

            Agile Test and Integration Strategies

                 Acceptance Test-Driven Development

                 Test-Driven Design

                 Agile Regression Test Triangle

            Conļ¬guration Management Debt Strategy

            Questions and Answers

  Ā© 2009-2010,                                        3


Wednesday, June 8, 2011
Why Use Agile Methods?




  Ā© 2009-2010,                4


Wednesday, June 8, 2011
ā€œStuffā€ Rolls Down Hill...

                      Requirements
                      Specification


                                  Design



                                           Construction


                                                      Testing
                                                    (Validation)


                                                              Integration



                                                                       Maintenance

  Ā© 2009-2010,                                                                       5


Wednesday, June 8, 2011
ā€œStuffā€ Rolls Down Hill...

                      Requirements
                      Specification


                                  Design



                                           Construction


                                                      Testing
                                                    (Validation)
           This is too
       late to ļ¬nd issues                                     Integration
          and respond
           effectively
                                                                       Maintenance

  Ā© 2009-2010,                                                                       5


Wednesday, June 8, 2011
The Agile Manifesto*
       We are uncovering better ways of developing software by doing it and
           helping others do it. Through this work we have come to value:

        Individuals and interactions over processes and tools
       Working software over comprehensive documentation
             Customer collaboration over contract negotiation
                 Responding to change over following a plan
                   That is, while there is value in the items on the right,
                             we value the items on the left more.ā€

                          Kent Beck           James Grenning   Robert C. Martin
                          Mike Beedle         Jim Highsmith    Steve Mellor
                          Arie van Bennekum   Andrew Hunt      Ken Schwaber
                          Alistair Cockburn   Ron Jeffries     Jeff Sutherland
                          Ward Cunningham     Jon Kern         Dave Thomas
                          Martin Fowler       Brian Marick


                                                                                                             55
                                                                                                              6
  Ā© 2009-2010,                                                                    * www.agilemanifesto.org

Wednesday, June 8, 2011
Principles Behind the Agile Manifesto*
     1.    Our highest priority is to satisfy the customer through early and continuous delivery of
           valuable software.

     2.    Welcome changing requirements, even late in development. Agile processes harness
           change for
           the customer's competitive advantage.
     3.    Deliver working software frequently, from a couple of weeks to a couple of months, with
           a preference to the shorter timescale.
     4.    Business people and developers must work together daily throughout the project.
     5.    Build projects around motivated individuals. Give them the environment and support
           they need, and trust them to get the job done.
     6.    The most efļ¬cient and effective method of conveying information to and within a
           development team is face-to-face conversation.
     7.    Working software is the primary measure of progress.
     8.    Agile processes promote sustainable development. The sponsors, developers, and
           users should be able to maintain a constant pace indeļ¬nitely.
     9.    Continuous attention to technical excellence and good design enhances agility.
     10.   Simplicity--the art of maximizing the amount of work not done--is essential.
     11.   The best architectures, requirements, and designs emerge from self-organizing teams.

     12.       At regular intervals, the team reļ¬‚ects on how to become more effective, then tunes and
  Ā© 2009-2010,
               adjusts its behavior accordingly.                                                             56
                                                                                                              7
                                                                       * www.agilemanifesto.org/principles

Wednesday, June 8, 2011
An Agile Method:
     Scrum




  Ā© 2009-2010,            8


Wednesday, June 8, 2011
Effects of Quality Debt

    ā€œPromises make debt, and debt makes promises.ā€ - Dutch Proverb




                                                                     9


Wednesday, June 8, 2011
Effect of Project Constraints on Quality




  Ā© 2009-2010,                                  10


Wednesday, June 8, 2011
Effect of Project Constraints on Quality




  Ā© 2009-2010,                                  10


Wednesday, June 8, 2011
ā€œFor every [dollar] of competitive advantage gained by
     cutting quality, it costs $4 to restore it; and software is
     an organizational asset and decisions to cut quality
     must be made by executive management and
     reļ¬‚ected in the ļ¬nancial statements.ā€ - Ken Schwaber




  Ā© 2009-2010,                                                     11


Wednesday, June 8, 2011
Lack of emphasis on software quality attributes
     contributes to decay




  Ā© 2009-2010,                                         12


Wednesday, June 8, 2011
Software Quality Attributes Deļ¬ned




  Ā© 2009-2010,                            13


Wednesday, June 8, 2011
Software Quality Attributes Rating Tool




  Ā© 2009-2010,                                 14


Wednesday, June 8, 2011
Sonar: Quality Dashboard




  Ā© 2009-2010,                  15


Wednesday, June 8, 2011
Agile Test and Integration Strategies




  Ā© 2009-2010,                               16


Wednesday, June 8, 2011
Deļ¬nition of Done

     Deļ¬nes work products that will be
     delivered with each feature as it is
     ready for acceptance.

     Typical entries...

             Code includes unit tests, reviewed,
             checked in

             Tests described and executed

             Build, release notes

             Compliance documentation
             updated to include current
             functionality
                                                   Example	
 Ā of	
 Ā ā€œaverageā€	
 Ā DoD
             What else?

  Ā© 2009-2010,                                                                         17


Wednesday, June 8, 2011
Deļ¬nition of Done as a Compliance Checklist
                 Acceptance deļ¬ned criteria for each    Code checked in with reference to
                 user story                             US#/Task#

                 Unit tests written and passed          Tested on FE

                 Code compiles with no errors and no    Integration test written & passes
                 warnings
                                                        Test code reviewed
                 New code doesnā€™t break existing code
                                                        Environment requirements documented
                 Test case review (Dev to review test
                 case written)                          Interface document updated/added and
                                                        checked in to SVN
                 Architectural impact assessed and
                 artifacts updated if necessary         Acceptance criteria veriļ¬ed complete

                 Comments in code                       All P1-P3 bugs for the story are closed

                 Error codes added                      Test approves user story

                 Code reviewed by peer                  Story demonstrated to product owner

  Ā© 2009-2010,                                                                                    18


Wednesday, June 8, 2011
Another Deļ¬nition of Done Example

                                                                                          Story and
                             Unit Tests          Functional        Acceptance                              Build System
                                                                                         Task Status
                              Passed            Tests Passed       Tests Passed                             Compiles
                                                                                          Updated
                   Story



                                                                      Code                 Code
                              Code is           Code Meets                                                 Published to
                                                                   Implements            Comments
                             Reviewed            Standards                                                  Dev Server
                                                                     Logging              Updated


                              Product               Past             Product             No Compile
                                                                                                              Demo
                              Owner             Acceptance           Owner               Warnings in
                                                                                                            Prepared
                   Sprint




                               Demo             Tests Passed       Acceptance              Code

                                         Bugs              Deployment          Release                 Code
                                     Committed in             Docs              Notes              Repository
                                    Sprint Resolved         Updated            Updated              is Tagged



                             Release to               Deployment                    Deployment               Release
                               Stage                    Testing                        Docs                   Notes
                   Release




                               Server                   Passed                       Delivered              Delivered

                                          Infrastructure            Integrated                      Build
                                          Change Notes             Stress Testing                Requirements
                                            Delivered                 Passed                         Met


  Ā© 2009-2010,                                                                                                            19


Wednesday, June 8, 2011
No matter what, the cost of addressing software
     debt increases with time.




  Ā© 2009-2010,                                         20


Wednesday, June 8, 2011
Acceptance Test-Driven Development




  Ā© 2009-2010,                            21


Wednesday, June 8, 2011
Test-Driven Design (TDD) - Basic ā€œFlowā€




  Ā© 2009-2010,                                 22

Wednesday, June 8, 2011
Test-Driven Design (TDD) - Basic ā€œFlowā€


                             Write	
 Ā 
                          Failing	
 Ā Test




  Ā© 2009-2010,                                 22

Wednesday, June 8, 2011
Test-Driven Design (TDD) - Basic ā€œFlowā€


                             Write	
 Ā 
                          Failing	
 Ā Test



                                            Make	
 Ā Test	
 Ā 
                                              Pass



  Ā© 2009-2010,                                                 22

Wednesday, June 8, 2011
Test-Driven Design (TDD) - Basic ā€œFlowā€


                                          Write	
 Ā 
                                       Failing	
 Ā Test



                  Refactor	
 Ā to	
 Ā                      Make	
 Ā Test	
 Ā 
                  Acceptable	
 Ā 
                    Design                                 Pass



  Ā© 2009-2010,                                                              22

Wednesday, June 8, 2011
Test-Driven Design (TDD) - Basic ā€œFlowā€


                                          Write	
 Ā 
                                       Failing	
 Ā Test



                  Refactor	
 Ā to	
 Ā                      Make	
 Ā Test	
 Ā 
                  Acceptable	
 Ā 
                    Design                                 Pass



  Ā© 2009-2010,                                                              22

Wednesday, June 8, 2011
Test-Driven Design (TDD)

    Lets go through an example session using TDD to drive the implementation of a
    user story to meeting its acceptance criteria.




                                                                                    23


Wednesday, June 8, 2011
Jitter ā€“ Example TDD Session


             Fake micro-blogging tool named ā€œJitterā€ is made by Seattle-
             based ļ¬ctitious company that focuses on enabling coffee
             injected folks to write short messages and have common online
             messaging shorthand expanded for easy reading. The user story
             we are working on is:

          So it is easier to read their kidā€™s messages, Mothers want to
                 automatically expand common shorthand notation

             The acceptance criteria for this user story are:

                 LOL, AFAIK, and TTYL are expandable

                 Expand lower and upper case versions of shorthand



  Ā© 2009-2010,                                                               24

Wednesday, June 8, 2011
Expand LOL to ā€œlaughing out loudā€


     public class WhenMotherWantsToExpandMessagesThatContainShorthandTest {

             @Test

             public void shouldExpandLOLToLaughingOutLoud() {

                 JitterSession session = mock(JitterSession.class);

                 when(session.getNextMessage()).thenReturn("Expand LOL please");

                 MessageExpander expander = new MessageExpander(session);

                 assertThat(expander.getNextMessage(),

                     equalTo("Expand laughing out loud please"));

             }

     }




  Ā© 2009-2010,                                                                     25

Wednesday, June 8, 2011
But waitā€¦what ifā€¦?


            What if LOL is written in lower case?

            What if it is written as ā€œLolā€? Should it be expanded?

            What if some variation of LOL is inside a word?

            What if characters surrounding LOL are symbols, not letters?

     Write these down as upcoming programmer tests as comments so I
      donā€™t forget them.
     // shouldExpandLOLIfLowerCase
     // shouldNotExpandLOLIfMixedCase
     // shouldNotExpandLOLIfInsideWord
     // shouldExpandIfSurroundingCharactersAreNotLetters




  Ā© 2009-2010,                                                             26

Wednesday, June 8, 2011
Expand LOL If Lower Case


     @Test
     public void shouldExpandLOLIfLowerCase() {
             when(session.getNextMessage()).thenReturn("Expand lol please");
             MessageExpander expander = new MessageExpander(session);
             assertThat(expander.getNextMessage(),
                 equalTo("Expand laughing out loud please"));
     }

     This forced use of java.util.regex.Pattern to handle case
      insensitivity.
     public String getNextMessage() {
             String msg = session.getNextMessage();
             return Pattern.compile("LOLā€, Pattern.CASE_INSENSITIVE)
                 .matcher(msg).replaceAll("laughing out loud");
     }


  Ā© 2009-2010,                                                                 27

Wednesday, June 8, 2011
Donā€™t Expand ā€œLolā€ ā€“ Mixed-Case


     @Test
     public void shouldNotExpandLOLIfMixedCase() {
             String msg = "Do not expand Lol please";
             when(session.getNextMessage()).thenReturn(msg);
             MessageExpander expander = new MessageExpander(session);
             assertThat(expander.getNextMessage(), equalTo(msg));
     }

     This forced me to stop using Pattern.CASE_INSENSITIVE ļ¬‚ag
      in pattern compilation. Only use ā€œLOLā€ or ā€œlolā€ for now.
     public String getNextMessage() {
             String msg = session.getNextMessage();
             return Pattern.compile("LOL|lol").matcher(msg)
                           .replaceAll("laughing out loud");
     }


  Ā© 2009-2010,                                                          28

Wednesday, June 8, 2011
Donā€™t Expand ā€œLOLā€ If Inside Word


     @Test
     public void shouldNotExpandLOLIfInsideWord() {
             String msg = "Do not expand PLOL or LOLP or PLOLP please";
             when(session.getNextMessage()).thenReturn(msg);
             MessageExpander expander = new MessageExpander(session);
             assertThat(expander.getNextMessage(), equalTo(msg));
     }



     The pattern matching is now modiļ¬ed to use spaces around
      each variation of valid LOL shorthand.
     return Pattern.compile("sLOLs|slols").matcher(msg)
             .replaceAll("laughing out loud");




  Ā© 2009-2010,                                                            29

Wednesday, June 8, 2011
Expand ā€œLOLā€ If Not Inside Word


     @Test
     public void shouldExpandIfSurroundingCharactersAreNotLetters() {
             when(session.getNextMessage()).thenReturn("Expand .lol! please");
             MessageExpander expander = new MessageExpander(session);
             assertThat(expander.getNextMessage(),
                 equalTo("Expand .laughing out loud! please"));
     }



     Final implementation of pattern matching code:
     return Pattern.compile("bLOLb|blolb").matcher(msg)
             .replaceAll("laughing out loud");




  Ā© 2009-2010,                                                                   30

Wednesday, June 8, 2011
The Agile Regression Testing Triangle*




  Ā© 2009-2010,            * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version   31


Wednesday, June 8, 2011
The Agile Regression Testing Triangle*




                               Automated Unit Tests
                              Make up largest portion of
                               regression tests and are
                             developed by programmers

  Ā© 2009-2010,            * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version   31


Wednesday, June 8, 2011
The Agile Regression Testing Triangle*



                                        Integration Tests
                                           Automated &
                                            Exploratory

                               Automated Unit Tests
                              Make up largest portion of
                               regression tests and are
                             developed by programmers

  Ā© 2009-2010,            * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version   31


Wednesday, June 8, 2011
The Agile Regression Testing Triangle*

Smoke++ Tests
Risk-based UI &
                                        Integration Tests
 API Automated
                                           Automated &
      Tests
                                            Exploratory

                               Automated Unit Tests
                              Make up largest portion of
                               regression tests and are
                             developed by programmers

  Ā© 2009-2010,            * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version   31


Wednesday, June 8, 2011
Conļ¬guration Management Debt

    ā€œIf releases are like giving birth, then you must be doing something wrong.ā€
       - Robert Beneļ¬eld




                                                                                   32


Wednesday, June 8, 2011
The Power of 2 Scripts: Deploy and Rollback




  Ā© 2009-2010,                                     33


Wednesday, June 8, 2011
Thank you

    Questions and Answers




                            34


Wednesday, June 8, 2011
Chris Sterling ā€“ Sterling Barton, LLC
             Partner, Sterling Barton, LLC
             Author of Book ā€œManaging Software
             Debt: Building for Inevitable
             Changeā€
             Consults on software technology,
             Agile technical practices, Scrum,
             and effective management
             techniques
                                                 Email: chris@sterlingbarton.com
                                                 Web: http://www.agileevm.com
             Certiļ¬ed Scrum Trainer              Blog: http://www.gettingagile.com
                                                 Follow me on Twitter: @csterwa
             Innovation GamesĀ® Trained
             Facilitator
             Open Source Developer
  Ā© 2009-2010,                                                                 35


Wednesday, June 8, 2011

More Related Content

What's hot

Mary Poppendieck: Agile under contract
Mary Poppendieck: Agile under contractMary Poppendieck: Agile under contract
Mary Poppendieck: Agile under contract
Agile Lietuva
Ā 
Mature agile teams essential patterns v4 - half day workshop
Mature agile teams   essential patterns v4 - half day workshopMature agile teams   essential patterns v4 - half day workshop
Mature agile teams essential patterns v4 - half day workshop
drewz lin
Ā 
Value stream mapping
Value stream mapping  Value stream mapping
Value stream mapping
AgileOnTheBeach
Ā 
Dnv Improving Your Process Performances With Agile
Dnv   Improving Your Process Performances With AgileDnv   Improving Your Process Performances With Agile
Dnv Improving Your Process Performances With Agile
George Ang
Ā 
One XP Experience: Introducing Agile (XP) Software Development into a Culture...
One XP Experience: Introducing Agile (XP) Software Development into a Culture...One XP Experience: Introducing Agile (XP) Software Development into a Culture...
One XP Experience: Introducing Agile (XP) Software Development into a Culture...
David Leip
Ā 
Agile Project Management and Scrum Introduction
Agile Project Management and Scrum IntroductionAgile Project Management and Scrum Introduction
Agile Project Management and Scrum Introduction
Eric Krock
Ā 

What's hot (20)

2011 pmo symposium Bridging the Agile-to-PMO Communication Gap
2011 pmo symposium Bridging the Agile-to-PMO Communication Gap2011 pmo symposium Bridging the Agile-to-PMO Communication Gap
2011 pmo symposium Bridging the Agile-to-PMO Communication Gap
Ā 
Mary Poppendieck: Agile under contract
Mary Poppendieck: Agile under contractMary Poppendieck: Agile under contract
Mary Poppendieck: Agile under contract
Ā 
Mature agile teams essential patterns v4 - half day workshop
Mature agile teams   essential patterns v4 - half day workshopMature agile teams   essential patterns v4 - half day workshop
Mature agile teams essential patterns v4 - half day workshop
Ā 
Rawsthorne dan - scrum the big picture
Rawsthorne dan - scrum the big pictureRawsthorne dan - scrum the big picture
Rawsthorne dan - scrum the big picture
Ā 
Business value of Agile : A People10 Showcase
Business value of Agile : A People10 ShowcaseBusiness value of Agile : A People10 Showcase
Business value of Agile : A People10 Showcase
Ā 
Dollars and Dates are Killing Agile
Dollars and Dates are Killing AgileDollars and Dates are Killing Agile
Dollars and Dates are Killing Agile
Ā 
"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary Poppendieck"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary Poppendieck
Ā 
Value stream mapping
Value stream mapping  Value stream mapping
Value stream mapping
Ā 
Dnv Improving Your Process Performances With Agile
Dnv   Improving Your Process Performances With AgileDnv   Improving Your Process Performances With Agile
Dnv Improving Your Process Performances With Agile
Ā 
Bv Eng & Agile Specs For Scrum U.Key
Bv Eng & Agile Specs For Scrum U.KeyBv Eng & Agile Specs For Scrum U.Key
Bv Eng & Agile Specs For Scrum U.Key
Ā 
The Agile Gap: Closing it with User Experience
The Agile Gap: Closing it with User ExperienceThe Agile Gap: Closing it with User Experience
The Agile Gap: Closing it with User Experience
Ā 
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010Boeing Webinar - Integrating Quality in Portfolio Management -  oct 2010
Boeing Webinar - Integrating Quality in Portfolio Management - oct 2010
Ā 
5 Ingredients Of The EVM Secret Sauce V Final
5 Ingredients Of The EVM Secret Sauce V Final5 Ingredients Of The EVM Secret Sauce V Final
5 Ingredients Of The EVM Secret Sauce V Final
Ā 
The Stream Processā„¢ for Defining Projects
The Stream Processā„¢ for Defining ProjectsThe Stream Processā„¢ for Defining Projects
The Stream Processā„¢ for Defining Projects
Ā 
Agile Planning
Agile PlanningAgile Planning
Agile Planning
Ā 
Identifying Managing & Eliminating Technical Debt
Identifying Managing & Eliminating Technical DebtIdentifying Managing & Eliminating Technical Debt
Identifying Managing & Eliminating Technical Debt
Ā 
One XP Experience: Introducing Agile (XP) Software Development into a Culture...
One XP Experience: Introducing Agile (XP) Software Development into a Culture...One XP Experience: Introducing Agile (XP) Software Development into a Culture...
One XP Experience: Introducing Agile (XP) Software Development into a Culture...
Ā 
Agile Project Management and Scrum Introduction
Agile Project Management and Scrum IntroductionAgile Project Management and Scrum Introduction
Agile Project Management and Scrum Introduction
Ā 
Simple Measurements #2
Simple Measurements #2Simple Measurements #2
Simple Measurements #2
Ā 
Can MVP help Government innovate like a Startup?
Can MVP help Government innovate like a Startup?Can MVP help Government innovate like a Startup?
Can MVP help Government innovate like a Startup?
Ā 

Viewers also liked (6)

Scrum at Scale
Scrum at ScaleScrum at Scale
Scrum at Scale
Ā 
Scrum in eBuddy
Scrum in eBuddyScrum in eBuddy
Scrum in eBuddy
Ā 
Scrum Process Overview
Scrum Process OverviewScrum Process Overview
Scrum Process Overview
Ā 
Practical Guide to Scrum
Practical Guide to ScrumPractical Guide to Scrum
Practical Guide to Scrum
Ā 
Agile explained
Agile explainedAgile explained
Agile explained
Ā 
Agile Scrum Methodology
Agile Scrum MethodologyAgile Scrum Methodology
Agile Scrum Methodology
Ā 

Similar to Testing in an Agile Context 2011

SEI Webinar Series: Making Agile Work for You
SEI Webinar Series: Making Agile Work for YouSEI Webinar Series: Making Agile Work for You
SEI Webinar Series: Making Agile Work for You
La Red DBAccess
Ā 
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
Compuware APM
Ā 
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
youzitang
Ā 
JitheshRamdas_QA
JitheshRamdas_QAJitheshRamdas_QA
JitheshRamdas_QA
Jithesh Ramdas
Ā 

Similar to Testing in an Agile Context 2011 (20)

Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...
Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...
Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...
Ā 
SEI Webinar Series: Making Agile Work for You
SEI Webinar Series: Making Agile Work for YouSEI Webinar Series: Making Agile Work for You
SEI Webinar Series: Making Agile Work for You
Ā 
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
IDC & Gomez Webinar --Best Practices: Protect Your Online Revenue Through Web...
Ā 
Agile Talk at CSI Chapter, Mumbai
Agile Talk at CSI Chapter, MumbaiAgile Talk at CSI Chapter, Mumbai
Agile Talk at CSI Chapter, Mumbai
Ā 
Technical Debt
Technical DebtTechnical Debt
Technical Debt
Ā 
Corporate presentation tech jini
Corporate presentation   tech jiniCorporate presentation   tech jini
Corporate presentation tech jini
Ā 
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
Ppwithagileyannhamonqconbeijing 090423081417-phpapp02
Ā 
Utah PMA Quarterly Meeting, June, 2009
Utah PMA Quarterly Meeting, June, 2009Utah PMA Quarterly Meeting, June, 2009
Utah PMA Quarterly Meeting, June, 2009
Ā 
The Business Analystā€™s Critical Role in Agile Projects
The Business Analystā€™s Critical Role in Agile ProjectsThe Business Analystā€™s Critical Role in Agile Projects
The Business Analystā€™s Critical Role in Agile Projects
Ā 
Agile Methodologies
Agile MethodologiesAgile Methodologies
Agile Methodologies
Ā 
PMI is NOT the enemy
PMI is NOT the enemyPMI is NOT the enemy
PMI is NOT the enemy
Ā 
STC Toronto Agile Intro - How can this possibly work?
STC Toronto Agile Intro - How can this possibly work?STC Toronto Agile Intro - How can this possibly work?
STC Toronto Agile Intro - How can this possibly work?
Ā 
Santoshi_CV_Latest
Santoshi_CV_LatestSantoshi_CV_Latest
Santoshi_CV_Latest
Ā 
Going agile with scrum
Going agile with scrumGoing agile with scrum
Going agile with scrum
Ā 
JitheshRamdas_QA
JitheshRamdas_QAJitheshRamdas_QA
JitheshRamdas_QA
Ā 
Stevan Zovinovic - Testers Agile Pocketbook - EuroSTAR 2012
Stevan Zovinovic - Testers Agile Pocketbook - EuroSTAR 2012Stevan Zovinovic - Testers Agile Pocketbook - EuroSTAR 2012
Stevan Zovinovic - Testers Agile Pocketbook - EuroSTAR 2012
Ā 
Managing Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal ApproachManaging Application Performance: A Simplified Universal Approach
Managing Application Performance: A Simplified Universal Approach
Ā 
Creating Successful Change Using Continuous Improvement Methods
Creating Successful Change Using Continuous Improvement MethodsCreating Successful Change Using Continuous Improvement Methods
Creating Successful Change Using Continuous Improvement Methods
Ā 
Psp Tsp Agile 3 1 En
Psp Tsp Agile 3 1 EnPsp Tsp Agile 3 1 En
Psp Tsp Agile 3 1 En
Ā 
SharePoint Conference Recap - Project Server
SharePoint Conference Recap - Project Server SharePoint Conference Recap - Project Server
SharePoint Conference Recap - Project Server
Ā 

More from Chris Sterling

The DevOps Revolution And Beyond...
The DevOps Revolution And Beyond...The DevOps Revolution And Beyond...
The DevOps Revolution And Beyond...
Chris Sterling
Ā 
Reduce Time to Value: Focus First on Configuration Management Debt
Reduce Time to Value: Focus First on Configuration Management DebtReduce Time to Value: Focus First on Configuration Management Debt
Reduce Time to Value: Focus First on Configuration Management Debt
Chris Sterling
Ā 
Managing Software Debt - Quality Debt Focus - QASIG Kirkland
Managing Software Debt - Quality Debt Focus - QASIG KirklandManaging Software Debt - Quality Debt Focus - QASIG Kirkland
Managing Software Debt - Quality Debt Focus - QASIG Kirkland
Chris Sterling
Ā 
Managing Software Debt Workshop at Intel
Managing Software Debt Workshop at IntelManaging Software Debt Workshop at Intel
Managing Software Debt Workshop at Intel
Chris Sterling
Ā 
Managing softwaredebt agilepalooza-redmond-sept2010
Managing softwaredebt agilepalooza-redmond-sept2010Managing softwaredebt agilepalooza-redmond-sept2010
Managing softwaredebt agilepalooza-redmond-sept2010
Chris Sterling
Ā 
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
Chris Sterling
Ā 
UW Agile CP202 Class 3 Managing Software Debt
UW Agile CP202 Class 3 Managing Software DebtUW Agile CP202 Class 3 Managing Software Debt
UW Agile CP202 Class 3 Managing Software Debt
Chris Sterling
Ā 
Class5 Scaling And Strategic Planning
Class5 Scaling And Strategic PlanningClass5 Scaling And Strategic Planning
Class5 Scaling And Strategic Planning
Chris Sterling
Ā 
Executable Specifications Agile Palooza
Executable Specifications Agile PaloozaExecutable Specifications Agile Palooza
Executable Specifications Agile Palooza
Chris Sterling
Ā 
Building Integrity In Seminar
Building Integrity In   SeminarBuilding Integrity In   Seminar
Building Integrity In Seminar
Chris Sterling
Ā 
UW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
UW ADC - Course 3 - Class 1 - User Stories And Acceptance TestingUW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
UW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
Chris Sterling
Ā 

More from Chris Sterling (18)

Cloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud ServicesCloud Native Java with Spring Cloud Services
Cloud Native Java with Spring Cloud Services
Ā 
The DevOps Revolution And Beyond...
The DevOps Revolution And Beyond...The DevOps Revolution And Beyond...
The DevOps Revolution And Beyond...
Ā 
From Zero to Continuous Validated Learning: Lean Startup on PaaS
From Zero to Continuous Validated Learning: Lean Startup on PaaSFrom Zero to Continuous Validated Learning: Lean Startup on PaaS
From Zero to Continuous Validated Learning: Lean Startup on PaaS
Ā 
Microservices: Aren't Microservices Just SOA?
Microservices: Aren't Microservices Just SOA?Microservices: Aren't Microservices Just SOA?
Microservices: Aren't Microservices Just SOA?
Ā 
Reduce Time to Value: Focus First on Configuration Management Debt
Reduce Time to Value: Focus First on Configuration Management DebtReduce Time to Value: Focus First on Configuration Management Debt
Reduce Time to Value: Focus First on Configuration Management Debt
Ā 
Managing Software Debt - Quality Debt Focus - QASIG Kirkland
Managing Software Debt - Quality Debt Focus - QASIG KirklandManaging Software Debt - Quality Debt Focus - QASIG Kirkland
Managing Software Debt - Quality Debt Focus - QASIG Kirkland
Ā 
Managing Software Debt Workshop at Intel
Managing Software Debt Workshop at IntelManaging Software Debt Workshop at Intel
Managing Software Debt Workshop at Intel
Ā 
Managing Software Debt - Federal Reserve Bank
Managing Software Debt - Federal Reserve BankManaging Software Debt - Federal Reserve Bank
Managing Software Debt - Federal Reserve Bank
Ā 
Managing softwaredebt agilepalooza-redmond-sept2010
Managing softwaredebt agilepalooza-redmond-sept2010Managing softwaredebt agilepalooza-redmond-sept2010
Managing softwaredebt agilepalooza-redmond-sept2010
Ā 
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
UW Agile CP202 Adv Topics Class 4 Scaling Multi-Level Planning Portfolio Mana...
Ā 
UW Agile CP202 Class 3 Managing Software Debt
UW Agile CP202 Class 3 Managing Software DebtUW Agile CP202 Class 3 Managing Software Debt
UW Agile CP202 Class 3 Managing Software Debt
Ā 
UW Agile CP202 - Class 1 User Stories
UW Agile CP202 - Class 1 User StoriesUW Agile CP202 - Class 1 User Stories
UW Agile CP202 - Class 1 User Stories
Ā 
Managing Software Debt Agile Bazaar
Managing Software Debt Agile BazaarManaging Software Debt Agile Bazaar
Managing Software Debt Agile Bazaar
Ā 
Intro To Tdd Agile Palooza
Intro To Tdd Agile PaloozaIntro To Tdd Agile Palooza
Intro To Tdd Agile Palooza
Ā 
Class5 Scaling And Strategic Planning
Class5 Scaling And Strategic PlanningClass5 Scaling And Strategic Planning
Class5 Scaling And Strategic Planning
Ā 
Executable Specifications Agile Palooza
Executable Specifications Agile PaloozaExecutable Specifications Agile Palooza
Executable Specifications Agile Palooza
Ā 
Building Integrity In Seminar
Building Integrity In   SeminarBuilding Integrity In   Seminar
Building Integrity In Seminar
Ā 
UW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
UW ADC - Course 3 - Class 1 - User Stories And Acceptance TestingUW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
UW ADC - Course 3 - Class 1 - User Stories And Acceptance Testing
Ā 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Ā 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
Ā 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Ā 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Ā 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Ā 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
Ā 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Ā 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Ā 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Ā 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Ā 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Ā 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Ā 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Ā 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Ā 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Ā 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Ā 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Ā 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Ā 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Ā 

Testing in an Agile Context 2011

  • 1. Testing in an Agile Context ā€œWhat he needs is some way to pay back. Not some way to borrow more.ā€ - Will Rogers Chris Sterling VP of Engineering AgileEVM Inc. Web: www.AgileEVM.com Email: chris@agileevm.com Blog: www.GettingAgile.com Follow Me on Twitter: @csterwa Hash Tag for Presentation: #swdebt Wednesday, June 8, 2011
  • 2. Chris Sterling ā€“ Sterling Barton, LLC Partner, Sterling Barton, LLC Author of Book ā€œManaging Software Debt: Building for Inevitable Changeā€ Consults on software technology, Agile technical practices, Scrum, and effective management techniques Email: chris@sterlingbarton.com Web: http://www.agileevm.com Certiļ¬ed Scrum Trainer Blog: http://www.gettingagile.com Follow me on Twitter: @csterwa Innovation GamesĀ® Trained Facilitator Open Source Developer Ā© 2009-2010, 2 Wednesday, June 8, 2011
  • 3. Presentation Agenda Agile - Find Issues Earlier Effects of Quality Debt Deļ¬nition of Done Quality Dashboard Agile Test and Integration Strategies Acceptance Test-Driven Development Test-Driven Design Agile Regression Test Triangle Conļ¬guration Management Debt Strategy Questions and Answers Ā© 2009-2010, 3 Wednesday, June 8, 2011
  • 4. Why Use Agile Methods? Ā© 2009-2010, 4 Wednesday, June 8, 2011
  • 5. ā€œStuffā€ Rolls Down Hill... Requirements Specification Design Construction Testing (Validation) Integration Maintenance Ā© 2009-2010, 5 Wednesday, June 8, 2011
  • 6. ā€œStuffā€ Rolls Down Hill... Requirements Specification Design Construction Testing (Validation) This is too late to ļ¬nd issues Integration and respond effectively Maintenance Ā© 2009-2010, 5 Wednesday, June 8, 2011
  • 7. The Agile Manifesto* We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more.ā€ Kent Beck James Grenning Robert C. Martin Mike Beedle Jim Highsmith Steve Mellor Arie van Bennekum Andrew Hunt Ken Schwaber Alistair Cockburn Ron Jeffries Jeff Sutherland Ward Cunningham Jon Kern Dave Thomas Martin Fowler Brian Marick 55 6 Ā© 2009-2010, * www.agilemanifesto.org Wednesday, June 8, 2011
  • 8. Principles Behind the Agile Manifesto* 1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. 2. Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. 3. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. 4. Business people and developers must work together daily throughout the project. 5. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. 6. The most efļ¬cient and effective method of conveying information to and within a development team is face-to-face conversation. 7. Working software is the primary measure of progress. 8. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indeļ¬nitely. 9. Continuous attention to technical excellence and good design enhances agility. 10. Simplicity--the art of maximizing the amount of work not done--is essential. 11. The best architectures, requirements, and designs emerge from self-organizing teams. 12. At regular intervals, the team reļ¬‚ects on how to become more effective, then tunes and Ā© 2009-2010, adjusts its behavior accordingly. 56 7 * www.agilemanifesto.org/principles Wednesday, June 8, 2011
  • 9. An Agile Method: Scrum Ā© 2009-2010, 8 Wednesday, June 8, 2011
  • 10. Effects of Quality Debt ā€œPromises make debt, and debt makes promises.ā€ - Dutch Proverb 9 Wednesday, June 8, 2011
  • 11. Effect of Project Constraints on Quality Ā© 2009-2010, 10 Wednesday, June 8, 2011
  • 12. Effect of Project Constraints on Quality Ā© 2009-2010, 10 Wednesday, June 8, 2011
  • 13. ā€œFor every [dollar] of competitive advantage gained by cutting quality, it costs $4 to restore it; and software is an organizational asset and decisions to cut quality must be made by executive management and reļ¬‚ected in the ļ¬nancial statements.ā€ - Ken Schwaber Ā© 2009-2010, 11 Wednesday, June 8, 2011
  • 14. Lack of emphasis on software quality attributes contributes to decay Ā© 2009-2010, 12 Wednesday, June 8, 2011
  • 15. Software Quality Attributes Deļ¬ned Ā© 2009-2010, 13 Wednesday, June 8, 2011
  • 16. Software Quality Attributes Rating Tool Ā© 2009-2010, 14 Wednesday, June 8, 2011
  • 17. Sonar: Quality Dashboard Ā© 2009-2010, 15 Wednesday, June 8, 2011
  • 18. Agile Test and Integration Strategies Ā© 2009-2010, 16 Wednesday, June 8, 2011
  • 19. Deļ¬nition of Done Deļ¬nes work products that will be delivered with each feature as it is ready for acceptance. Typical entries... Code includes unit tests, reviewed, checked in Tests described and executed Build, release notes Compliance documentation updated to include current functionality Example Ā of Ā ā€œaverageā€ Ā DoD What else? Ā© 2009-2010, 17 Wednesday, June 8, 2011
  • 20. Deļ¬nition of Done as a Compliance Checklist Acceptance deļ¬ned criteria for each Code checked in with reference to user story US#/Task# Unit tests written and passed Tested on FE Code compiles with no errors and no Integration test written & passes warnings Test code reviewed New code doesnā€™t break existing code Environment requirements documented Test case review (Dev to review test case written) Interface document updated/added and checked in to SVN Architectural impact assessed and artifacts updated if necessary Acceptance criteria veriļ¬ed complete Comments in code All P1-P3 bugs for the story are closed Error codes added Test approves user story Code reviewed by peer Story demonstrated to product owner Ā© 2009-2010, 18 Wednesday, June 8, 2011
  • 21. Another Deļ¬nition of Done Example Story and Unit Tests Functional Acceptance Build System Task Status Passed Tests Passed Tests Passed Compiles Updated Story Code Code Code is Code Meets Published to Implements Comments Reviewed Standards Dev Server Logging Updated Product Past Product No Compile Demo Owner Acceptance Owner Warnings in Prepared Sprint Demo Tests Passed Acceptance Code Bugs Deployment Release Code Committed in Docs Notes Repository Sprint Resolved Updated Updated is Tagged Release to Deployment Deployment Release Stage Testing Docs Notes Release Server Passed Delivered Delivered Infrastructure Integrated Build Change Notes Stress Testing Requirements Delivered Passed Met Ā© 2009-2010, 19 Wednesday, June 8, 2011
  • 22. No matter what, the cost of addressing software debt increases with time. Ā© 2009-2010, 20 Wednesday, June 8, 2011
  • 23. Acceptance Test-Driven Development Ā© 2009-2010, 21 Wednesday, June 8, 2011
  • 24. Test-Driven Design (TDD) - Basic ā€œFlowā€ Ā© 2009-2010, 22 Wednesday, June 8, 2011
  • 25. Test-Driven Design (TDD) - Basic ā€œFlowā€ Write Ā  Failing Ā Test Ā© 2009-2010, 22 Wednesday, June 8, 2011
  • 26. Test-Driven Design (TDD) - Basic ā€œFlowā€ Write Ā  Failing Ā Test Make Ā Test Ā  Pass Ā© 2009-2010, 22 Wednesday, June 8, 2011
  • 27. Test-Driven Design (TDD) - Basic ā€œFlowā€ Write Ā  Failing Ā Test Refactor Ā to Ā  Make Ā Test Ā  Acceptable Ā  Design Pass Ā© 2009-2010, 22 Wednesday, June 8, 2011
  • 28. Test-Driven Design (TDD) - Basic ā€œFlowā€ Write Ā  Failing Ā Test Refactor Ā to Ā  Make Ā Test Ā  Acceptable Ā  Design Pass Ā© 2009-2010, 22 Wednesday, June 8, 2011
  • 29. Test-Driven Design (TDD) Lets go through an example session using TDD to drive the implementation of a user story to meeting its acceptance criteria. 23 Wednesday, June 8, 2011
  • 30. Jitter ā€“ Example TDD Session Fake micro-blogging tool named ā€œJitterā€ is made by Seattle- based ļ¬ctitious company that focuses on enabling coffee injected folks to write short messages and have common online messaging shorthand expanded for easy reading. The user story we are working on is: So it is easier to read their kidā€™s messages, Mothers want to automatically expand common shorthand notation The acceptance criteria for this user story are: LOL, AFAIK, and TTYL are expandable Expand lower and upper case versions of shorthand Ā© 2009-2010, 24 Wednesday, June 8, 2011
  • 31. Expand LOL to ā€œlaughing out loudā€ public class WhenMotherWantsToExpandMessagesThatContainShorthandTest { @Test public void shouldExpandLOLToLaughingOutLoud() { JitterSession session = mock(JitterSession.class); when(session.getNextMessage()).thenReturn("Expand LOL please"); MessageExpander expander = new MessageExpander(session); assertThat(expander.getNextMessage(), equalTo("Expand laughing out loud please")); } } Ā© 2009-2010, 25 Wednesday, June 8, 2011
  • 32. But waitā€¦what ifā€¦? What if LOL is written in lower case? What if it is written as ā€œLolā€? Should it be expanded? What if some variation of LOL is inside a word? What if characters surrounding LOL are symbols, not letters? Write these down as upcoming programmer tests as comments so I donā€™t forget them. // shouldExpandLOLIfLowerCase // shouldNotExpandLOLIfMixedCase // shouldNotExpandLOLIfInsideWord // shouldExpandIfSurroundingCharactersAreNotLetters Ā© 2009-2010, 26 Wednesday, June 8, 2011
  • 33. Expand LOL If Lower Case @Test public void shouldExpandLOLIfLowerCase() { when(session.getNextMessage()).thenReturn("Expand lol please"); MessageExpander expander = new MessageExpander(session); assertThat(expander.getNextMessage(), equalTo("Expand laughing out loud please")); } This forced use of java.util.regex.Pattern to handle case insensitivity. public String getNextMessage() { String msg = session.getNextMessage(); return Pattern.compile("LOLā€, Pattern.CASE_INSENSITIVE) .matcher(msg).replaceAll("laughing out loud"); } Ā© 2009-2010, 27 Wednesday, June 8, 2011
  • 34. Donā€™t Expand ā€œLolā€ ā€“ Mixed-Case @Test public void shouldNotExpandLOLIfMixedCase() { String msg = "Do not expand Lol please"; when(session.getNextMessage()).thenReturn(msg); MessageExpander expander = new MessageExpander(session); assertThat(expander.getNextMessage(), equalTo(msg)); } This forced me to stop using Pattern.CASE_INSENSITIVE ļ¬‚ag in pattern compilation. Only use ā€œLOLā€ or ā€œlolā€ for now. public String getNextMessage() { String msg = session.getNextMessage(); return Pattern.compile("LOL|lol").matcher(msg) .replaceAll("laughing out loud"); } Ā© 2009-2010, 28 Wednesday, June 8, 2011
  • 35. Donā€™t Expand ā€œLOLā€ If Inside Word @Test public void shouldNotExpandLOLIfInsideWord() { String msg = "Do not expand PLOL or LOLP or PLOLP please"; when(session.getNextMessage()).thenReturn(msg); MessageExpander expander = new MessageExpander(session); assertThat(expander.getNextMessage(), equalTo(msg)); } The pattern matching is now modiļ¬ed to use spaces around each variation of valid LOL shorthand. return Pattern.compile("sLOLs|slols").matcher(msg) .replaceAll("laughing out loud"); Ā© 2009-2010, 29 Wednesday, June 8, 2011
  • 36. Expand ā€œLOLā€ If Not Inside Word @Test public void shouldExpandIfSurroundingCharactersAreNotLetters() { when(session.getNextMessage()).thenReturn("Expand .lol! please"); MessageExpander expander = new MessageExpander(session); assertThat(expander.getNextMessage(), equalTo("Expand .laughing out loud! please")); } Final implementation of pattern matching code: return Pattern.compile("bLOLb|blolb").matcher(msg) .replaceAll("laughing out loud"); Ā© 2009-2010, 30 Wednesday, June 8, 2011
  • 37. The Agile Regression Testing Triangle* Ā© 2009-2010, * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version 31 Wednesday, June 8, 2011
  • 38. The Agile Regression Testing Triangle* Automated Unit Tests Make up largest portion of regression tests and are developed by programmers Ā© 2009-2010, * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version 31 Wednesday, June 8, 2011
  • 39. The Agile Regression Testing Triangle* Integration Tests Automated & Exploratory Automated Unit Tests Make up largest portion of regression tests and are developed by programmers Ā© 2009-2010, * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version 31 Wednesday, June 8, 2011
  • 40. The Agile Regression Testing Triangle* Smoke++ Tests Risk-based UI & Integration Tests API Automated Automated & Tests Exploratory Automated Unit Tests Make up largest portion of regression tests and are developed by programmers Ā© 2009-2010, * The Agile Triangle has been modiļ¬ed from Mike Cohnā€™s original version 31 Wednesday, June 8, 2011
  • 41. Conļ¬guration Management Debt ā€œIf releases are like giving birth, then you must be doing something wrong.ā€ - Robert Beneļ¬eld 32 Wednesday, June 8, 2011
  • 42. The Power of 2 Scripts: Deploy and Rollback Ā© 2009-2010, 33 Wednesday, June 8, 2011
  • 43. Thank you Questions and Answers 34 Wednesday, June 8, 2011
  • 44. Chris Sterling ā€“ Sterling Barton, LLC Partner, Sterling Barton, LLC Author of Book ā€œManaging Software Debt: Building for Inevitable Changeā€ Consults on software technology, Agile technical practices, Scrum, and effective management techniques Email: chris@sterlingbarton.com Web: http://www.agileevm.com Certiļ¬ed Scrum Trainer Blog: http://www.gettingagile.com Follow me on Twitter: @csterwa Innovation GamesĀ® Trained Facilitator Open Source Developer Ā© 2009-2010, 35 Wednesday, June 8, 2011