Chapter 5. Class Testing Basics


  • Want to know what to consider when testing a class? See Class Testing.

  • Want to know how to identify test cases for testing a class? See Constructing Test Cases.

  • Want to know a good way to implement a test driver for a class? See Constructing a Test Driver.

In this chapter we describe how to test a single class. The techniques we describe in this chapter will be applied in later chapters when we discuss testing object interactions and testing classes in an inheritance hierarchy. For this discussion, we assume the code for a class has been written and needs to be tested. Our primary focus is on classes whose instances do not collaborate extensively with any other instance. We will use the Velocity and PuckSupply classes from Brickles to illustrate. We will address the testing of more complex classes in the next two chapters.



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