Automatic Construction of a Class State-based Testing Model using Method Specifications

J. Al Dallal and P. Sorenson (Canada)

Keywords

class behavior, class testing, contracts, methodspecifications, specification-based testing, state-basedmodel.

Abstract

Object-oriented software is well suited to state-based testing. A class behavior can be expressed in a state transition model. State transition model consists of states and transitions and can be represented using State Transition Diagrams (STD) or UML statecharts. State transition model can be easily understood and is widely used in specification-based testing techniques. Method specifications include the preconditions and postconditions of class methods. Despite the fact that method specifications determine the specifications for the class behaviors, researchers seem to limit the method specification use to support the automated detection of software failures and the isolation of faults, and to generate test cases to test class methods. Hand-construction of state specification model of the class behavior is expensive, error-prone, and may result in constructing an inconsistent model with the specifications of the class methods, which misleads verification results. In this paper, we introduce a novel technique to synthesize the state-transition model of the sequential class behavior from the specifications of the class methods. As a result, to test a sequential class behavior, it is required only to have the specifications of the class methods instead of requiring in addition to that a verified testing model. Finally, a tool that supports the proposed technique is introduced.

Important Links:



Go Back