SlideShare uma empresa Scribd logo
1 de 32
Quality Assurance
          and Developer Testing
                                     Edward Hieatt, VP Engineering
                                     Ian McFarland, VP Technology




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
What’s the goal?


             • To develop software quickly, cheaply, with
               the lowest defect rates possible




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
In practice, we want...
             • Ability to deploy new releases frequently
                   o   at a bare minimum, once per iteration/sprint
                  o    ideally, as each new feature is finished
             • Confidence that everything we build has a very low defect
               rate
             • Confidence that adding features/performing refactorings -
               won't introduce defects
             • Minimal firefighting/bug fixing - focus on new features
             • Keep code flexible enough to keep feature cost constant
             • Sleep well at night


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
The Old Way
             • Write code
             • Deploy to QA
             • QA finds and reports bugs
             • Development fixes bugs
             • Deploy to QA
             • QA finds bugs
             • Development fixes bugs, repeat
             • QA doesn't find anymore bugs
             • Deploy to production


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Who’s responsible for
                    Quality?
             •QA’ers are responsible
             •Quality tested after development is
              complete
             •Developer-QA team relationship is
              loose & adversarial
             •Automated tests are an afterthought

Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
The Result
             • Ever-increasing percentage of development time
               spent on bug fixing and firefighting
             • Ever-decreasing percentage available for feature
               development
             • Increasing fear that new features will inject bugs
             • Architecture changes become prohibitively
               expensive
             • Performance concerns conflict with stability concerns
             • Eventually, feature production grinds to a halt


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Rethinking our attitudes
                 torward testing
             • Everyone is responsible for quality
                   o Developers                responsible for the quality of their code
                   o 'Customer'               responsible for accepting work
                   o QA       operates at a higher level of abstraction
             • Reduce the cost of defects
                   o Move   defect detection as early in lifecycle as
                      possible
             • Make quality transparent
                   o Make         bug detection easy


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Quality as the focal point

             • Tests are the core of the development process
             • Test all the time, not just at the end
             • Automate everything
             • Invest in making it fast and easy to run tests 
             • Write automated tests before we write the code
             • Make build status visible to the entire team
             • Run regression suites at every check-in


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Kind of Tests




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Kind of Tests
               • Unit Tests
               • Functional Tests
               • Acceptance Tests
               • Smoke Tests
               • Integration Tests
               • End-to-End tests
               • Scenario Tests
               • System Tests
               • UI Tests
               • Manual tests
               • Exploratory Tests
               • Regression Tests
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Kind of Tests
               • Unit Tests
               • Functional Tests
               • Acceptance Tests
               • Smoke Tests
               • Integration Tests
               • End-to-End tests
               • Scenario Tests
               • System Tests
               • UI Tests
               • Manual tests
               • Exploratory Tests
               • Regression Tests
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Testing Frameworks

               •Domain Specific Languages (DSLs)
               •FIT and FITnesse
               •DSLs and FIT let PMs, analysts and QA
                    write more and better tests



Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Test Isolation
Where’s the Bug?
      Test Fixture       Client


                          View

                     Controller

                        Model


                     Database
Where’s the Bug?
                        Client


                         View

                   Controller

         Test Fixture   Model


                    Database
Where’s the Bug?
      Test Fixture            Client


                               View

                         Controller

               Test Fixture   Model


                          Database
Isolation

•Tests at different granularities help you
  more quickly identify the source of the
  problem
•Good test coverage tells you what’s wrong
  as quickly as possible
The Food Pyramid




                                                                                     Confidence in System as a Whole Increases
                        Test Isolation, Focus, Speed Increases




                                                                     Scenario
                                                                       Tests



                                                                    Functional
                                                                      Tests



                                                                 Integration Tests




                                                                    Unit Tests




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Testing as part of
                            Development
               •Test-Driven Development
               •Red-Green-Refactor
               •No code before a red test demands it
               •Outside-in vs. Inside-out
               •Fast test run frequently
               •Continuous Integration
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
TDD Example




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
A Typical Day at Pivotal

             • Standup - team communication
             • Pair-up
             • Pair pops next story from stack in Tracker
             • Update from RCS
             • Test-drive story [repeat]



Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Test-Driving a Story
             • Write   functional test (test is red)
             • Write unit tests [repeat]:
                • Write unit test (test is red)
                • Fix unit test by writing code (test is green)
                • Refactor (tests are green)
             • Rerun functional test (test is green)
             • Run all tests (tests are green)
             • Update from RCS
             • Run all tests (tests are green)
             • Check in
             • Mark story finished
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
How do we get there?




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Action Plan


               •Stop the bleeding
               •Transition to testability
               •Retrofit coverage where needed


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Stop the bleeding

               •Write a test every time a new defect is
                    detected, to isolate the test
               •Test all new code
                •Refactor touch points with old code for
                        testability



Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Transition to
                                        Testability

               •Characterization/black box tests first
               •Refactor for testability
               •Gradually work down to unit tests in
                    legacy code




Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Retrofit coverage
               •Make retrofitting tests part of everyday
                    work
                   •Don’t “stop” and cover all your old code
                        at once
               •Measure coverage as you go
                •Have goals and measure progress
               •Understand what coverage you have
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Steady State


               •Maintain Testability
               •Continuously improve test suite


Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Maintaining Testability
               •...requires vigilance
               •It’s easy to slip into old habits...
                •when there’s time pressure
                •when you’re tired
                •when you’re soloing
               •When it’s hard to write tests, do it more
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Maintaining Testability

               •Keep code amenable to testing
               •Keep coverage high, and focused
               •Keep the test corpus small
                •Less is more, assuming your coverage is
                        complete
               •Don’t punt on hard testing problems
Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
Continuous
                                    Improvement
               •Test Speed
               •Test Clarity
               •Test Quality
               •Test Readability
               •Remove stale tests

Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
The role of QA
                           on an Agile team
               • Different pair of eyes
               • Can focus on exploratory testing and test
                    planning
               • Catch gaps in requirements and coverage
               • Should write additional coverage
               • Less monkey work, more brain work
               • Any bug discovered by QA must have an
                    automated regression test case written

Copyright © 2008 Pivotal Labs, Inc. All rights reserved.

Mais conteúdo relacionado

Mais procurados

Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
Daniel
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
Mairbek Khadikov
 
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex EnvironmentsDr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
AgileSparks
 

Mais procurados (20)

Continuous Delivery: why ? where to start ? how to scale ?
Continuous Delivery: why ? where to start ? how to scale ?Continuous Delivery: why ? where to start ? how to scale ?
Continuous Delivery: why ? where to start ? how to scale ?
 
Backward thinking design qa system for quality goals
Backward thinking   design qa system for quality goalsBackward thinking   design qa system for quality goals
Backward thinking design qa system for quality goals
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 
Four Keys to Efficient DevOps
Four Keys to Efficient DevOpsFour Keys to Efficient DevOps
Four Keys to Efficient DevOps
 
CI/CD for mobile at HERE
CI/CD for mobile at HERECI/CD for mobile at HERE
CI/CD for mobile at HERE
 
Continuous testing for devops
Continuous testing for devopsContinuous testing for devops
Continuous testing for devops
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValueDevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality Loopback
 
Continuous testing webinar 041017 slideshare
Continuous testing webinar 041017 slideshareContinuous testing webinar 041017 slideshare
Continuous testing webinar 041017 slideshare
 
The 10 Commandments of Release Engineering
The 10 Commandments of Release EngineeringThe 10 Commandments of Release Engineering
The 10 Commandments of Release Engineering
 
What is Continuous Integration and Continuous Delivery
What is Continuous Integration and Continuous Delivery What is Continuous Integration and Continuous Delivery
What is Continuous Integration and Continuous Delivery
 
Drive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test AutomationDrive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test Automation
 
Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009Enabling Agile Testing Through Continuous Integration Agile2009
Enabling Agile Testing Through Continuous Integration Agile2009
 
The Eclipse Way
The Eclipse WayThe Eclipse Way
The Eclipse Way
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
 
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex EnvironmentsDr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
Dr. Ronen Bar-Nahor - Optimizing Agile Testing in Complex Environments
 
Differences between Testing in Waterfall and Agile
Differences between Testing in Waterfall and AgileDifferences between Testing in Waterfall and Agile
Differences between Testing in Waterfall and Agile
 
Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?Are Your Continuous Tests Too Fragile for Agile?
Are Your Continuous Tests Too Fragile for Agile?
 
Continuous Integration, Continuous Quality, Continuous Delivery
Continuous Integration, Continuous Quality, Continuous DeliveryContinuous Integration, Continuous Quality, Continuous Delivery
Continuous Integration, Continuous Quality, Continuous Delivery
 
Seven Deadly Saves To Security With Integrations
Seven Deadly Saves To Security With IntegrationsSeven Deadly Saves To Security With Integrations
Seven Deadly Saves To Security With Integrations
 

Semelhante a Pivotal Labs Open View Presentation Quality Assurance And Developer Testing

2009_06_08 The Lean Startup Tokyo edition
2009_06_08 The Lean Startup Tokyo edition2009_06_08 The Lean Startup Tokyo edition
2009_06_08 The Lean Startup Tokyo edition
Eric Ries
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
Naresh Jain
 
Gabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsGabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web Applications
Francesco Fullone
 

Semelhante a Pivotal Labs Open View Presentation Quality Assurance And Developer Testing (20)

ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall ProjectsICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
Exploring No Mans Land with Keyword-Driven Testing
Exploring No Mans Land with Keyword-Driven TestingExploring No Mans Land with Keyword-Driven Testing
Exploring No Mans Land with Keyword-Driven Testing
 
2009_06_08 The Lean Startup Tokyo edition
2009_06_08 The Lean Startup Tokyo edition2009_06_08 The Lean Startup Tokyo edition
2009_06_08 The Lean Startup Tokyo edition
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
 
Groovy Testing Aug2009
Groovy Testing Aug2009Groovy Testing Aug2009
Groovy Testing Aug2009
 
Perf Intro Ppt
Perf Intro PptPerf Intro Ppt
Perf Intro Ppt
 
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
 
Faster apps. faster time to market. faster mean time to repair
Faster apps. faster time to market. faster mean time to repairFaster apps. faster time to market. faster mean time to repair
Faster apps. faster time to market. faster mean time to repair
 
Agile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityAgile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic Quality
 
TEA Presentation V 0.3
TEA Presentation V 0.3TEA Presentation V 0.3
TEA Presentation V 0.3
 
The DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It RightThe DevOps Dance - Shift Left, Shift Right - Get It Right
The DevOps Dance - Shift Left, Shift Right - Get It Right
 
Gabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web ApplicationsGabriele Lana: Testing Web Applications
Gabriele Lana: Testing Web Applications
 
Neil Tompson - SoftTest Ireland
Neil Tompson - SoftTest IrelandNeil Tompson - SoftTest Ireland
Neil Tompson - SoftTest Ireland
 
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAUTest Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
Releasing fast code - The DevOps approach
Releasing fast code - The DevOps approachReleasing fast code - The DevOps approach
Releasing fast code - The DevOps approach
 
Software Quality Plan
Software Quality PlanSoftware Quality Plan
Software Quality Plan
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Pivotal Labs Open View Presentation Quality Assurance And Developer Testing

  • 1. Quality Assurance and Developer Testing Edward Hieatt, VP Engineering Ian McFarland, VP Technology Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 2. What’s the goal? • To develop software quickly, cheaply, with the lowest defect rates possible Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 3. In practice, we want... • Ability to deploy new releases frequently o at a bare minimum, once per iteration/sprint o ideally, as each new feature is finished • Confidence that everything we build has a very low defect rate • Confidence that adding features/performing refactorings - won't introduce defects • Minimal firefighting/bug fixing - focus on new features • Keep code flexible enough to keep feature cost constant • Sleep well at night Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 4. The Old Way • Write code • Deploy to QA • QA finds and reports bugs • Development fixes bugs • Deploy to QA • QA finds bugs • Development fixes bugs, repeat • QA doesn't find anymore bugs • Deploy to production Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 5. Who’s responsible for Quality? •QA’ers are responsible •Quality tested after development is complete •Developer-QA team relationship is loose & adversarial •Automated tests are an afterthought Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 6. The Result • Ever-increasing percentage of development time spent on bug fixing and firefighting • Ever-decreasing percentage available for feature development • Increasing fear that new features will inject bugs • Architecture changes become prohibitively expensive • Performance concerns conflict with stability concerns • Eventually, feature production grinds to a halt Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 7. Rethinking our attitudes torward testing • Everyone is responsible for quality o Developers responsible for the quality of their code o 'Customer' responsible for accepting work o QA operates at a higher level of abstraction • Reduce the cost of defects o Move defect detection as early in lifecycle as possible • Make quality transparent o Make bug detection easy Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 8. Quality as the focal point • Tests are the core of the development process • Test all the time, not just at the end • Automate everything • Invest in making it fast and easy to run tests  • Write automated tests before we write the code • Make build status visible to the entire team • Run regression suites at every check-in Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 9. Kind of Tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 10. Kind of Tests • Unit Tests • Functional Tests • Acceptance Tests • Smoke Tests • Integration Tests • End-to-End tests • Scenario Tests • System Tests • UI Tests • Manual tests • Exploratory Tests • Regression Tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 11. Kind of Tests • Unit Tests • Functional Tests • Acceptance Tests • Smoke Tests • Integration Tests • End-to-End tests • Scenario Tests • System Tests • UI Tests • Manual tests • Exploratory Tests • Regression Tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 12. Testing Frameworks •Domain Specific Languages (DSLs) •FIT and FITnesse •DSLs and FIT let PMs, analysts and QA write more and better tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 14. Where’s the Bug? Test Fixture Client View Controller Model Database
  • 15. Where’s the Bug? Client View Controller Test Fixture Model Database
  • 16. Where’s the Bug? Test Fixture Client View Controller Test Fixture Model Database
  • 17. Isolation •Tests at different granularities help you more quickly identify the source of the problem •Good test coverage tells you what’s wrong as quickly as possible
  • 18. The Food Pyramid Confidence in System as a Whole Increases Test Isolation, Focus, Speed Increases Scenario Tests Functional Tests Integration Tests Unit Tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 19. Testing as part of Development •Test-Driven Development •Red-Green-Refactor •No code before a red test demands it •Outside-in vs. Inside-out •Fast test run frequently •Continuous Integration Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 20. TDD Example Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 21. A Typical Day at Pivotal • Standup - team communication • Pair-up • Pair pops next story from stack in Tracker • Update from RCS • Test-drive story [repeat] Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 22. Test-Driving a Story • Write functional test (test is red) • Write unit tests [repeat]: • Write unit test (test is red) • Fix unit test by writing code (test is green) • Refactor (tests are green) • Rerun functional test (test is green) • Run all tests (tests are green) • Update from RCS • Run all tests (tests are green) • Check in • Mark story finished Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 23. How do we get there? Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 24. Action Plan •Stop the bleeding •Transition to testability •Retrofit coverage where needed Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 25. Stop the bleeding •Write a test every time a new defect is detected, to isolate the test •Test all new code •Refactor touch points with old code for testability Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 26. Transition to Testability •Characterization/black box tests first •Refactor for testability •Gradually work down to unit tests in legacy code Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 27. Retrofit coverage •Make retrofitting tests part of everyday work •Don’t “stop” and cover all your old code at once •Measure coverage as you go •Have goals and measure progress •Understand what coverage you have Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 28. Steady State •Maintain Testability •Continuously improve test suite Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 29. Maintaining Testability •...requires vigilance •It’s easy to slip into old habits... •when there’s time pressure •when you’re tired •when you’re soloing •When it’s hard to write tests, do it more Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 30. Maintaining Testability •Keep code amenable to testing •Keep coverage high, and focused •Keep the test corpus small •Less is more, assuming your coverage is complete •Don’t punt on hard testing problems Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 31. Continuous Improvement •Test Speed •Test Clarity •Test Quality •Test Readability •Remove stale tests Copyright © 2008 Pivotal Labs, Inc. All rights reserved.
  • 32. The role of QA on an Agile team • Different pair of eyes • Can focus on exploratory testing and test planning • Catch gaps in requirements and coverage • Should write additional coverage • Less monkey work, more brain work • Any bug discovered by QA must have an automated regression test case written Copyright © 2008 Pivotal Labs, Inc. All rights reserved.