Summary


Class testing corresponds to unit testing in a traditional testing process. Execution-based class testing requires the identification of test cases, the development of a test driver to apply the test cases against instances of the CUT, and the execution of the test driver. So far we have described testing of fairly simple classes those whose instances do not interact significantly with other instances.

Test cases are identified and generated from the class specification and implementation. We have shown how to identify test case requirements from preconditions and postconditions as well as from state transition diagrams. Adding interaction test cases improves code coverage.

We have presented a design for a test driver based on the implementation of a tester class for each class to be tested. We have described in detail a design based on Tester classes that we have used successfully. Benefits of our design include a clean organization using an abstract Tester class to capture behavior and code common to all class test drivers, and support for different people working on testing and development. As we will show in Chapter 7, the use of tester classes provides an additional benefit in the context of testing classes related by inheritance.



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