Exercises


graphics/exercise.gif

7-1. Hierarchical, incremental testing (HIT) approaches testing with an idea that, with a little analysis, we can avoid retesting code that has already been tested. Select classes from an inheritance hierarchy on your project and perform a HIT analysis. Estimate the effort to implement enough test cases to fully test all classes in the hierarchy and compare that estimate with your HIT analysis effort.

7-2. Write a test driver for an abstract class with a small number of operations. Evaluate the effort needed to test the class using the three approaches described in the last part of this chapter.

7-3. Implement a PACT hierarchy of Tester classes for the classes in an inheritance hierarchy to which you have access. Modify the abstract class Tester described in Chapter 5 to be useful in your test environment. Enhancements can include measuring memory allocation, collecting timing information, and doing more sophisticated logging of results.



A Practical Guide to Testing Object-Oriented Software
A Practical Guide to Testing Object-Oriented Software
ISBN: 0201325640
EAN: 2147483647
Year: 2005
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net