Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Fall 04 Midterm 2 Review: O-O Testing
(a) A Class as units for unit testing because it is the "smallest stand-alone unit for testing". All the operations and state behaviors of the class should be tested. "Intra-method, inter-method, and intra-class testing approaches can be used."
(b) The impact Encapsulation has on testing is that it hides information making it harder and more complicated to completely test the class. The testing "requires a complete report on the states of an object". The possibility that states change easily makes it more difficult. It is harder because of the "lack of visibility of states". Not only does behavior gets encapsulated by the object, its states are also encapsulated.
(c) Unit testing tests the specific methods of the class and how those methods interact with each other to implement a functionality. It also "tests public method interactions through different sequences of calls to such methods".
(d) "A method which has been tested in a superclass must be retested when it uses variables modified by subclass methods or when it calls other methods redefined by a subclass".
All quotes are from lecture slide 8-OOTesting.ppt.
Link to this Page