SlideShare a Scribd company logo
1 of 45
Agile Testing Best Practices



       Stephen Ritchie
       DCAST March Meeting
       19-Mar-2013
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   -2-
Motivation




             Why Test
             Software?


               Excella Consulting
Chrysler New Yorker




                      Excella Consulting
Motivation




             Why Write
             Automated
               Tests?

               Excella Consulting
Achieve Desired Results




                            •   Software costs too much
                            •   Users demand quality
                            •   Testing takes too long
                            •   New features take too long




                          Excella Consulting
Microscope: Visibility and Insight




                               Excella Consulting
Smoke Detector: Problem Detection




                           Excella Consulting
Weather Satellite: Advanced Warning




                            Excella Consulting
Automated Tests
  Make Sure
Software Works
  As Intended
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 12 -
Agile Test Pyramid: Vision




Testers




                                                                   Automated
Engineers



       Google “Agile Test Pyramid”         http://bit.ly/10Qubsy

                             Excella Consulting
Agile Test Pyramid: Reality




       Ice-Cream Cone Anti-Pattern         http://bit.ly/10QpUFG

                              Excella Consulting
Agile Test Quadrants




                       Excella Consulting
Principles




             1. Unit Test

    Developer Tests
 “Intention Checking”

                Excella Consulting
Principles




             2. Automate
                  • Always running
                  • Can't be bargained with
                  • Can't be reasoned with
                  • Tests don't feel pity or
                    remorse or fear
                  • Absolutely will not stop,
                    ever, until you deliver a
                    quality software product.



                Excella Consulting
Principles




             2. Automate
                  • CI Server
                     • Per Commit
                     • Overnight Functional
                     • Smoke Testing
                     • Stability Testing
                     • Performance/Load
                  • Automate Deployments
                  • Project “Dashboard”



                Excella Consulting
Principles




   3. Zero Configuration*

 I can run your tests,
 You can run mine.
       * One-time configuration is okay
                   Excella Consulting
Principles




                  4. Fast

             All tests run
             time efficiently

                   Excella Consulting
Principles




             5. Clear Results
                Pass/Fail
             Focused Test
             Isolates Issue
                  Excella Consulting
Principles




        6. Easy to Maintain

             Conventional
                Brief

                 Excella Consulting
Principles




             7. Timely
Test-Driven Development (TDD)

        Test As-It’s-Built
        Test As-It’s-Fixed
               Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 24 -
Requirements, Requirements, Requirements




                  Obstacle 1
        •Too Abstract
        •Changing
        •Over Specification

                           Excella Consulting
Specification by Example




Examples & Feature Files




                           Excella Consulting
One Primary Assert To Rule Them All




      One Primary Assert




                            Excella Consulting
Time Crunch




               Obstacle 2
              Time Crunch



                  Excella Consulting
Four Ways to Fake Time




                  Fake Time
            • Virtual Machine
            • Isolate The System
            • Inspect The Clock
            • Dummy IClock

                         Excella Consulting
Dummy               Real System
Clock               Clock



        IClock
        Interface




  System Under Test
Database Killed The Integration Test




                   Obstacle 3
                   Database
                   Integration


                             Excella Consulting
Fixture Setup and Data Arrangement




                           Excella Consulting
Fixture Setup and Data Arrangement


• Schema Migration
   – RoundhousE
   – Flyway Db
   – Liquibase
• Data Arrangement
   – DbUnit & NDbUnit




                           Excella Consulting
Now We Have Too Much Test Code




                 Obstacle 4
                 Explosion of
                 Test Code


                         Excella Consulting
Monitor Test Code Growth Rate




            Control Growth
            • Monitor The Ratio
            • Data-Drive Tests
            • Boundary Analysis


                           Excella Consulting
Bad Coupling




      Obstacle 5
  Unhelpful Reuse
  Unhelpful Repetition
  Unhelpful Coupling
               Excella Consulting
In Test Code, Do Repeat Yourself ... Do Repeat Yourself




   Test Code Is Different
    • Avoid Inheritance Reuse
    • Use “Context” Helpers
    • Repetition Is Better Than
      Coupling

                             Excella Consulting
Agenda
  1   Motivation

  2   Principles

  3   Obstacles
         Excella Consulting   - 41 -
Of Course It’s Safe … After You




                             Excella Consulting
Shameless Self Promotion Time!


                                        • “Best Practices” Initiative
                                        • Tips and Tricks
                                        • Generate Ideas
                                           • Quantifying Value
                                           • Biases & Aversions
                                           • Tools & Technologies
                                        • Avoid Making the Same
                                          Mistake Once.




                            Excella Consulting
Code and Slides




• Code:           https://github.com/ruthlesshelp

• Slides:         http://www.slideshare.net/ruthlesshelp




                              Excella Consulting
Contact Me




      •   Email:      stephen.ritchie@excella.com
      •   Twitter:    @ruthlesshelp
      •   Blog:       http://ruthlesslyhelpful.net
      •   LinkedIn:   http://www.linkedin.com/in/sritchie




                           Excella Consulting

More Related Content

What's hot

Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategytharindakasun
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 
Scrum Testing Methodology
Scrum Testing MethodologyScrum Testing Methodology
Scrum Testing MethodologyGaya1985
 
ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2onsoftwaretest
 
Introducing QA Into an Agile Environment
Introducing QA Into an Agile EnvironmentIntroducing QA Into an Agile Environment
Introducing QA Into an Agile EnvironmentJoseph Beale
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessLee Barnes
 
Agile Qa Framework Jacky Wu
Agile Qa Framework Jacky WuAgile Qa Framework Jacky Wu
Agile Qa Framework Jacky WuJacky Wu
 
Agile Testing Process
Agile Testing ProcessAgile Testing Process
Agile Testing ProcessIntetics
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level BasicSelin Gungor
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 

What's hot (20)

Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategy
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 
Test Automation in Agile
Test Automation in AgileTest Automation in Agile
Test Automation in Agile
 
Scrum Testing Methodology
Scrum Testing MethodologyScrum Testing Methodology
Scrum Testing Methodology
 
Presentation on Agile Testing
Presentation on Agile TestingPresentation on Agile Testing
Presentation on Agile Testing
 
ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2
 
ISTQB foundation level - day 2
ISTQB foundation level - day 2ISTQB foundation level - day 2
ISTQB foundation level - day 2
 
Introduction & Manual Testing
Introduction & Manual TestingIntroduction & Manual Testing
Introduction & Manual Testing
 
Introducing QA Into an Agile Environment
Introducing QA Into an Agile EnvironmentIntroducing QA Into an Agile Environment
Introducing QA Into an Agile Environment
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
 
Agile testing
Agile testingAgile testing
Agile testing
 
Agile Qa Framework Jacky Wu
Agile Qa Framework Jacky WuAgile Qa Framework Jacky Wu
Agile Qa Framework Jacky Wu
 
Agile Testing Process
Agile Testing ProcessAgile Testing Process
Agile Testing Process
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
 
QA Best Practices in Agile World_new
QA Best Practices in Agile World_newQA Best Practices in Agile World_new
QA Best Practices in Agile World_new
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Guide to Agile testing
Guide to Agile testingGuide to Agile testing
Guide to Agile testing
 

Viewers also liked

Introduction to Agile software testing
Introduction to Agile software testingIntroduction to Agile software testing
Introduction to Agile software testingKMS Technology
 
Agile Best Practices For Distributed Development
Agile Best Practices For Distributed DevelopmentAgile Best Practices For Distributed Development
Agile Best Practices For Distributed DevelopmentSunil Mundra
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingDimitri Ponomareff
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile MethodologyHaresh Karkar
 
Agile to the top 2016 (EN)
Agile to the top 2016 (EN)Agile to the top 2016 (EN)
Agile to the top 2016 (EN)Luc Taesch
 
Test pyramid agile pune conference
Test pyramid   agile pune conferenceTest pyramid   agile pune conference
Test pyramid agile pune conferenceSachin Natu
 
Agile Testing Practices
Agile Testing PracticesAgile Testing Practices
Agile Testing PracticesPaul King
 
Running successful agile projects
Running successful agile projectsRunning successful agile projects
Running successful agile projectsMartin Aspeli
 
How to Build in Quality from Day 1 using Lean QA and Agile Testing
How to Build in Quality from Day 1 using Lean QA and Agile TestingHow to Build in Quality from Day 1 using Lean QA and Agile Testing
How to Build in Quality from Day 1 using Lean QA and Agile TestingAtlassian
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Ajay Danait
 
Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Naresh Jain
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing PyramidNaresh Jain
 

Viewers also liked (19)

Testing Best Practices
Testing Best PracticesTesting Best Practices
Testing Best Practices
 
Introduction to Agile software testing
Introduction to Agile software testingIntroduction to Agile software testing
Introduction to Agile software testing
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Agile Best Practices For Distributed Development
Agile Best Practices For Distributed DevelopmentAgile Best Practices For Distributed Development
Agile Best Practices For Distributed Development
 
Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
Overview of Agile Methodology
Overview of Agile MethodologyOverview of Agile Methodology
Overview of Agile Methodology
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Value Based Testing
Value Based Testing Value Based Testing
Value Based Testing
 
Agile QA 2.0
Agile QA 2.0Agile QA 2.0
Agile QA 2.0
 
Agile to the top 2016 (EN)
Agile to the top 2016 (EN)Agile to the top 2016 (EN)
Agile to the top 2016 (EN)
 
Test pyramid agile pune conference
Test pyramid   agile pune conferenceTest pyramid   agile pune conference
Test pyramid agile pune conference
 
Agile Testing Practices
Agile Testing PracticesAgile Testing Practices
Agile Testing Practices
 
Atagg2015 BDD in Test pyramid
Atagg2015  BDD in Test pyramidAtagg2015  BDD in Test pyramid
Atagg2015 BDD in Test pyramid
 
Running successful agile projects
Running successful agile projectsRunning successful agile projects
Running successful agile projects
 
How to Build in Quality from Day 1 using Lean QA and Agile Testing
How to Build in Quality from Day 1 using Lean QA and Agile TestingHow to Build in Quality from Day 1 using Lean QA and Agile Testing
How to Build in Quality from Day 1 using Lean QA and Agile Testing
 
Behavior Driven Development (BDD)
Behavior Driven Development (BDD)Behavior Driven Development (BDD)
Behavior Driven Development (BDD)
 
Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)Outside In - Behaviour Driven Development (BDD)
Outside In - Behaviour Driven Development (BDD)
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
 

Similar to Agile Testing Best Practices

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersStephen Ritchie
 
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingOvercoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingStephen Ritchie
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersStephen Ritchie
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with DatabasesStephen Ritchie
 
Advancing Testing Using Axioms
Advancing Testing Using AxiomsAdvancing Testing Using Axioms
Advancing Testing Using AxiomsSQALab
 
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance Company
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance CompanyAgile Odyssey: Case Study of Agile Adoption within A Health Insurance Company
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance Companyalstonehodge
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesIgor Moochnick
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet
 
My Experiments In Agile Testing in Yahoo.pptx
My Experiments In Agile Testing in Yahoo.pptxMy Experiments In Agile Testing in Yahoo.pptx
My Experiments In Agile Testing in Yahoo.pptxBaiju Joseph
 
A New Model For Testing
A New Model For TestingA New Model For Testing
A New Model For TestingTEST Huddle
 
Lean, Kanban and TFS
Lean, Kanban and TFSLean, Kanban and TFS
Lean, Kanban and TFSImaginet
 
Agile testing experiments
Agile testing experimentsAgile testing experiments
Agile testing experimentsBaiju Joseph
 
Scrum Journey In Healthcare Day Of Agile
Scrum Journey In Healthcare   Day Of AgileScrum Journey In Healthcare   Day Of Agile
Scrum Journey In Healthcare Day Of Agilealstonhodge
 
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012Imaginet
 
Intro to Scrum - Heidi Araya
Intro to Scrum  - Heidi ArayaIntro to Scrum  - Heidi Araya
Intro to Scrum - Heidi Arayaagilemaine
 

Similar to Agile Testing Best Practices (20)

DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangersDCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
 
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit TestingOvercoming the Obstacles, Pitfalls, and Dangers of Unit Testing
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
 
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and DangersAutomated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
 
Advancing Testing Using Axioms
Advancing Testing Using AxiomsAdvancing Testing Using Axioms
Advancing Testing Using Axioms
 
Delhi it professionals
Delhi it professionalsDelhi it professionals
Delhi it professionals
 
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance Company
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance CompanyAgile Odyssey: Case Study of Agile Adoption within A Health Insurance Company
Agile Odyssey: Case Study of Agile Adoption within A Health Insurance Company
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
"DevOps > CI+CD "
"DevOps > CI+CD ""DevOps > CI+CD "
"DevOps > CI+CD "
 
Ml2 production
Ml2 productionMl2 production
Ml2 production
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with Puppet
 
My Experiments In Agile Testing in Yahoo.pptx
My Experiments In Agile Testing in Yahoo.pptxMy Experiments In Agile Testing in Yahoo.pptx
My Experiments In Agile Testing in Yahoo.pptx
 
New model
New modelNew model
New model
 
A New Model For Testing
A New Model For TestingA New Model For Testing
A New Model For Testing
 
Lean, Kanban and TFS
Lean, Kanban and TFSLean, Kanban and TFS
Lean, Kanban and TFS
 
Agile testing experiments
Agile testing experimentsAgile testing experiments
Agile testing experiments
 
Scrum Journey In Healthcare Day Of Agile
Scrum Journey In Healthcare   Day Of AgileScrum Journey In Healthcare   Day Of Agile
Scrum Journey In Healthcare Day Of Agile
 
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
 
Agile ux fullday-uxpa2016
Agile ux fullday-uxpa2016Agile ux fullday-uxpa2016
Agile ux fullday-uxpa2016
 
Intro to Scrum - Heidi Araya
Intro to Scrum  - Heidi ArayaIntro to Scrum  - Heidi Araya
Intro to Scrum - Heidi Araya
 

More from Stephen Ritchie

Overview of .NET Best Practices
Overview of .NET Best PracticesOverview of .NET Best Practices
Overview of .NET Best PracticesStephen Ritchie
 
Lightweight Documentation
Lightweight DocumentationLightweight Documentation
Lightweight DocumentationStephen Ritchie
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Stephen Ritchie
 
Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11Stephen Ritchie
 
Lightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile ApproachLightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile ApproachStephen Ritchie
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftStephen Ritchie
 
Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Stephen Ritchie
 
Test Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftTest Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftStephen Ritchie
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftStephen Ritchie
 
Continuous Integration DCAEC12
Continuous Integration DCAEC12Continuous Integration DCAEC12
Continuous Integration DCAEC12Stephen Ritchie
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best PracticesStephen Ritchie
 
Advanced Code Analysis with .NET
Advanced Code Analysis with .NETAdvanced Code Analysis with .NET
Advanced Code Analysis with .NETStephen Ritchie
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best PracticesStephen Ritchie
 
Advanced Code Analysis In .NET
Advanced Code Analysis In .NETAdvanced Code Analysis In .NET
Advanced Code Analysis In .NETStephen Ritchie
 

More from Stephen Ritchie (15)

Overview of .NET Best Practices
Overview of .NET Best PracticesOverview of .NET Best Practices
Overview of .NET Best Practices
 
Lightweight Documentation
Lightweight DocumentationLightweight Documentation
Lightweight Documentation
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
 
DevOps Requires Agility
DevOps Requires AgilityDevOps Requires Agility
DevOps Requires Agility
 
Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11Continuous Integration - NoVA CodeCamp 2014-10-11
Continuous Integration - NoVA CodeCamp 2014-10-11
 
Lightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile ApproachLightweight Documentation: An Agile Approach
Lightweight Documentation: An Agile Approach
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923Dc scrum agile_eng_20130923
Dc scrum agile_eng_20130923
 
Test Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master CraftTest Driven Development: Blueprint, Toolbox, and Master Craft
Test Driven Development: Blueprint, Toolbox, and Master Craft
 
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master CraftContinuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Blueprint, Toolbox, Master Craft
 
Continuous Integration DCAEC12
Continuous Integration DCAEC12Continuous Integration DCAEC12
Continuous Integration DCAEC12
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
 
Advanced Code Analysis with .NET
Advanced Code Analysis with .NETAdvanced Code Analysis with .NET
Advanced Code Analysis with .NET
 
An Overview of .NET Best Practices
An Overview of .NET Best PracticesAn Overview of .NET Best Practices
An Overview of .NET Best Practices
 
Advanced Code Analysis In .NET
Advanced Code Analysis In .NETAdvanced Code Analysis In .NET
Advanced Code Analysis In .NET
 

Agile Testing Best Practices

  • 1. Agile Testing Best Practices Stephen Ritchie DCAST March Meeting 19-Mar-2013
  • 2. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting -2-
  • 3. Motivation Why Test Software? Excella Consulting
  • 4.
  • 5. Chrysler New Yorker Excella Consulting
  • 6. Motivation Why Write Automated Tests? Excella Consulting
  • 7. Achieve Desired Results • Software costs too much • Users demand quality • Testing takes too long • New features take too long Excella Consulting
  • 8. Microscope: Visibility and Insight Excella Consulting
  • 9. Smoke Detector: Problem Detection Excella Consulting
  • 10. Weather Satellite: Advanced Warning Excella Consulting
  • 11. Automated Tests Make Sure Software Works As Intended
  • 12. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 12 -
  • 13. Agile Test Pyramid: Vision Testers Automated Engineers Google “Agile Test Pyramid” http://bit.ly/10Qubsy Excella Consulting
  • 14. Agile Test Pyramid: Reality Ice-Cream Cone Anti-Pattern http://bit.ly/10QpUFG Excella Consulting
  • 15. Agile Test Quadrants Excella Consulting
  • 16. Principles 1. Unit Test Developer Tests “Intention Checking” Excella Consulting
  • 17. Principles 2. Automate • Always running • Can't be bargained with • Can't be reasoned with • Tests don't feel pity or remorse or fear • Absolutely will not stop, ever, until you deliver a quality software product. Excella Consulting
  • 18. Principles 2. Automate • CI Server • Per Commit • Overnight Functional • Smoke Testing • Stability Testing • Performance/Load • Automate Deployments • Project “Dashboard” Excella Consulting
  • 19. Principles 3. Zero Configuration* I can run your tests, You can run mine. * One-time configuration is okay Excella Consulting
  • 20. Principles 4. Fast All tests run time efficiently Excella Consulting
  • 21. Principles 5. Clear Results Pass/Fail Focused Test Isolates Issue Excella Consulting
  • 22. Principles 6. Easy to Maintain Conventional Brief Excella Consulting
  • 23. Principles 7. Timely Test-Driven Development (TDD) Test As-It’s-Built Test As-It’s-Fixed Excella Consulting
  • 24. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 24 -
  • 25. Requirements, Requirements, Requirements Obstacle 1 •Too Abstract •Changing •Over Specification Excella Consulting
  • 26.
  • 27. Specification by Example Examples & Feature Files Excella Consulting
  • 28. One Primary Assert To Rule Them All One Primary Assert Excella Consulting
  • 29. Time Crunch Obstacle 2 Time Crunch Excella Consulting
  • 30. Four Ways to Fake Time Fake Time • Virtual Machine • Isolate The System • Inspect The Clock • Dummy IClock Excella Consulting
  • 31. Dummy Real System Clock Clock IClock Interface System Under Test
  • 32. Database Killed The Integration Test Obstacle 3 Database Integration Excella Consulting
  • 33. Fixture Setup and Data Arrangement Excella Consulting
  • 34. Fixture Setup and Data Arrangement • Schema Migration – RoundhousE – Flyway Db – Liquibase • Data Arrangement – DbUnit & NDbUnit Excella Consulting
  • 35. Now We Have Too Much Test Code Obstacle 4 Explosion of Test Code Excella Consulting
  • 36. Monitor Test Code Growth Rate Control Growth • Monitor The Ratio • Data-Drive Tests • Boundary Analysis Excella Consulting
  • 37.
  • 38. Bad Coupling Obstacle 5 Unhelpful Reuse Unhelpful Repetition Unhelpful Coupling Excella Consulting
  • 39. In Test Code, Do Repeat Yourself ... Do Repeat Yourself Test Code Is Different • Avoid Inheritance Reuse • Use “Context” Helpers • Repetition Is Better Than Coupling Excella Consulting
  • 40.
  • 41. Agenda 1 Motivation 2 Principles 3 Obstacles Excella Consulting - 41 -
  • 42. Of Course It’s Safe … After You Excella Consulting
  • 43. Shameless Self Promotion Time! • “Best Practices” Initiative • Tips and Tricks • Generate Ideas • Quantifying Value • Biases & Aversions • Tools & Technologies • Avoid Making the Same Mistake Once. Excella Consulting
  • 44. Code and Slides • Code: https://github.com/ruthlesshelp • Slides: http://www.slideshare.net/ruthlesshelp Excella Consulting
  • 45. Contact Me • Email: stephen.ritchie@excella.com • Twitter: @ruthlesshelp • Blog: http://ruthlesslyhelpful.net • LinkedIn: http://www.linkedin.com/in/sritchie Excella Consulting