TitleFinding the needles in the haystack: Generating legal test inputs for object-oriented programs
Publication TypeConference Paper
Year of Publication2006
AuthorsArtzi S, Ernst MD, Kieżun A, Pacheco C, Perkins JH
Conference NameM-TOOS: 1st Workshop on Model-Based Testing and Object-Oriented Systems
Pagination27–34
Date or Month PublishedOctober
Conference LocationPortland, OR, USA
AbstractA test input for an object-oriented program typically consists of a sequence of method calls that use the API defined by the program under test. Generating legal test inputs can be challenging because, for some programs, the set of legal method sequences is much smaller than the set of all possible sequences; without a formal specification of legal sequences, an input generator is bound to produce mostly illegal sequences. \par We propose a scalable technique that combines dynamic analysis with random testing to help an input generator create legal test inputs without a formal specification, even for programs in which most sequences are illegal. The technique uses an example execution of the program to infer a model of legal call sequences, and uses the model to guide a random input generator towards legal but behaviorally-diverse sequences. \par We have implemented our technique for Java, in a tool called Palulu, and evaluated its effectiveness in creating legal inputs for real programs. Our experimental results indicate that the technique is effective and scalable. Our preliminary evaluation indicates that the technique can quickly generate legal sequences for complex inputs: in a case study, Palulu created legal test inputs in seconds for a set of complex classes, for which it took an expert thirty minutes to generate a single legal input.
Downloadshttps://homes.cs.washington.edu/~mernst/pubs/oo-test-gen-mtoos2006.pdf PDF
Citation KeyArtziEKPP2006