SVV 04 Ch04-AgileTest v3
SVV 04 Ch04-AgileTest v3
Testing
(2nd edition)
Chapter 4
http://www.cs.gmu.edu/~offutt/softwaretest/
August 2014
Note
This is the modified version of the original textbook slide
for SWE 202 course.
Time
Original Revision
Introduction to Software Testing, Edition 2 (Ch 4) © Ammann & Offutt 3
Traditional Assumptions
1. Modeling and analysis can identify potential problems
early in development
2. Savings implied by the cost-of-change curve justify the
cost of modeling and analysis over the life of the project
These are true if requirements are always complete and
current
But those annoying customers keep changing their minds!
– Humans are naturally good at approximating
– But pretty bad at perfecting
These two assumptions have made software engineering
frustrating and difficult for decades
Thus, agile methods …
Introduction to Software Testing, Edition 2 (Ch 4) © Ammann & Offutt 4
Why Be Agile?
Agile methods start by recognizing that neither
assumption is valid for many current software projects
Response to first assumption
– Software engineers are not good at developing requirements
• We do not anticipate many changes
• Many of the changes we do anticipate are not needed
Response to second assumption
– Requirements (and other “non-executable artifacts”) tend to go
out of date very quickly
• We seldom take time to update them
• Many current software projects change continuously
Change
Tests software &
Acceptance archived Refactor
Test
Continue adding
(Passing) TDD tests until TDD
acceptance test Test 2
passes Change
software & Refactoring avoids
Refactor maintenance debt
Introduction to Software Testing, Edition 2 (Ch 4) © Ammann & Offutt 15
Adding TDD to Existing Systems
Most of today’s software is legacy
– No legacy tests
– Legacy requirements hopelessly outdated
– Designs, if they were ever written down, lost
For most of these systems;
– The software must be changed.
– Tests must be applied.
Two common needs for testing legacy systems:
– Sometimes we need to refactor legacy code,
– Sometimes we need to change the functionality of legacy code.