2009-07-01
Java Test Driver Generation from Object-Oriented Interaction Traces
Publication
Publication
Presented at the
International Workshop on Harnessing Theories for Tool Support in Software, Istanbul
In the context of test-driven development for object-oriented programs, mock objects are increasingly used
for unit testing. Several Java mock object frameworks exist, which all have in common that mock objects,
realizing the test environment, are directly specied at the Java program level. Though using directly the
programming language may facilitate acceptance by software developers at rst sight, the entailed syntax
noise sometimes distracts from the actual test specication, speaking about interaction traces.
We propose a Java-like test specication language, which allows to describe the behavior of the test harness
in terms of the expected interaction traces between the program and its environment. The language is
tailor-made for Java, e.g., in that it re
ects the nested calls and return structure of thread-based interaction
at the interface. From a given trace specication, a testing environment, i.e., a set of classes for mock
objects, is synthesized.
The design of the specication language is a careful balance between two goals: using programming constructs
in Java-like notation helps the programmer to specify the interaction without having to learn a
completely new specication notation. On the other hand, additional expressions in the specication language
allow to specify the desired trace behavior in a concise, abstract way, hiding the intricacies of the
required synchronization code at the lower-level programming language.
Additional Metadata | |
---|---|
, , , , | |
Elsevier B.V. | |
Electronic Notes in Theoretical Computer Science | |
MOBI-J (vervolg) | |
International Workshop on Harnessing Theories for Tool Support in Software | |
Organisation | Computer Security |
Bonsangue, M., de Boer, F., Grüner, A., & Steffen, M. (2009). Java Test Driver Generation from Object-Oriented Interaction Traces. In Procedings of the 2nd International Workshop on Harnessing Theories for Tool Support in Software (TTSS 2008) (pp. 33–47). Elsevier B.V. |