Title
Random Test Data Generation for Java Classes Annotated with JML Specifications
Abstract
The hidden states of objects create a barrier to designing and generating test data automatically. For example, the state of an object has to be established indirectly through a sequence of method invocations. For a non-trivial class, however, it is extremely difficult for a randomly-chosen sequence of method invocations to construct an object successfully, as each invocation has to satisfy the state invariants. Nonetheless, automated random testing can reduce the cost of testing dramatically and has strong potential for finding errors that are difficult to find in other ways because it eliminates the subjectiveness in constructing test data. We propose a new approach to generating test data automatically for Java classes annotated with JML specifications. The key idea underlying our approach is to construct an object incrementally in that each method call in the sequence is checked before the next call is chosen. We use JML's runtime assertion checker to check the validity of a method invocation. Other ingredients of our approach include object pooling and object equivalence checking. These are to increase the probability of constructing feasible call sequences and to remove redundancy among the successfully- built sequences. We have implemented our approach for JET, a fully-automated testing tool for Java, and our experiment with JET showed a promising result, 10 to 200% increase in the number of generated test cases.
Year
Venue
Keywords
2007
Software Engineering Research and Practice
pre and postconditions,runtime asser- tion checking,test data generator,random testing,jml language.,equivalence checking,test data generation,satisfiability
Field
DocType
Citations 
Formal equivalence checking,Object pool pattern,Random testing,Programming language,Computer science,Assertion,Test data,Test case,Java,Test data generation
Conference
13
PageRank 
References 
Authors
0.73
6
2
Name
Order
Citations
PageRank
Yoonsik Cheon177056.20
Carlos E. Rubio-Medrano2185.78