As software organizations introduce object-oriented methods and languages into their software development practices, more systematic testing methods for object-oriented programs have been sought after extensively.
In this paper, we present a testing method for a class in object-oriented programs. A class is a set of objects with common attributes and common behaviour. Our proposed testing method is a specification-based testing which uses the finite state machine(FSM) to specify a class. FSM is mainly used as a specification of a class in object-oriented analysis and design methodolodies, because FSM can model the dynamic behaviour of a class well. However, states and transitions of FSM used in object-oriented analysis and design does not have formal definition and semantics. In order to use FSM in the class testing, we formally define FSM into TOF(Test-Oriented Form). TOF, which is an extended type of FSM, is composed of states, transitions, and variables. In this paper, we present a semi-automatic test case generation algorithm for TOF.