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 ...

Get A Practical Guide to Testing Object-Oriented Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.