Automated Test Driver Generation for Java Components

Whereas object-orientation is established as a major paradigm for software development, testing methods specifically targeted towards object-oriented, classbased languages are less common. We propose a testing framework for objectoriented programs, based on the observable trace semantics of class components, i.e., for black-box testing. In particular, we propose a test specification language which allows to describe the behavior of the component under test in terms of the expected interaction traces between the component and the tester. The specification language is tailor-made for the programming language Java e.g., in that it reflects the nested call and return structure of thread-based interactions at the interface. From a given trace specification, a testing environment is automatically synthesized such that component and environment represent an executable closed program. The design of the specification language is a careful balance between two goals: using programming constructs in the style of Java helps the programmer to specify the interaction without having to learn a completely new specification notation. On the other hand, additional expressions not provided in Java itself allow to specify the desired trace behavior in a concise, abstract way, hiding the intricacies of the required synchonization code at the lower-level programming language.