June 27, 2007 | Component-Focused Testing | Back Next |
1 Study each tool
2 Extract functionality into subroutines in separate module
3 Rewrite tool as series of calls to subroutines from modules
4 Write test scripts that focus on individual subroutines
Run test scripts with prove
5 If tests create files, use a temporary directory
Use File::Temp
6 Measure coverage of module code by test suite
Use Devel::Cover
7 Refactor code to improve coverage, testability and maintainability
Home Last TOC | Copyright © 2007 James E Keenan | Back Next |