Testing Legacy Code
Please turn off all
What is Legacy Code?
Benefits of Test Driven Development are Well Known
But Not All Code Starts From a Clean Slate
Old Code Must be Maintained
Can We Apply Test First Techniques When
The Answer is Yes, We Can
You Need To Give Up a Few Things
Give Up #1: 100% Test Coverage
Give Up #2: Unit Tests
Give Up #3: Frequent context switches
What TDD ideas do we keep?
What technology do we keep?
Getting Started
Testing main() method
Add fixtures
What Tests do you Already Have?
Converting Existing Tests
Characterization Testing
Testing by Functional Division
What to Test?
Testing by Code Structure
Top Down
Code Coverage Measurements?
Code Coverage Tools
How code coverage works
A Code Coverage Report
Package Level Coverage
Line Level Coverage
Auto generating tests
Static Analysis
Test or debug?
How to decide
Refactoring
Summing Up
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche