ACM Home Page
Please provide us with feedback. Feedback
Korat: automated testing based on Java predicates
Full text PdfPdf (171 KB)
Source International Symposium on Software Testing and Analysis archive
Proceedings of the 2002 ACM SIGSOFT international symposium on Software testing and analysis table of contents
Roma, Italy
SESSION: Specification-based testing table of contents
Pages: 123 - 133  
Year of Publication: 2002
ISBN ~ ISSN:0163-5948 , 1-58113-562-9
Also published in ...
Authors
Chandrasekhar Boyapati  MIT Laboratory for Computer Science, Cambridge, MA
Sarfraz Khurshid  MIT Laboratory for Computer Science, Cambridge, MA
Darko Marinov  MIT Laboratory for Computer Science, Cambridge, MA
Sponsor
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 25,   Downloads (12 Months): 121,   Citation Count: 73
Additional Information:

abstract   references   cited by   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/566172.566191
What is a DOI?

ABSTRACT

This paper presents Korat, a novel framework for automated testing of Java programs. Given a formal specification for a method, Korat uses the method precondition to automatically generate all (nonisomorphic) test cases up to a given small size. Korat then executes the method on each test case, and uses the method postcondition as a test oracle to check the correctness of each output.To generate test cases for a method, Korat constructs a Java predicate (i.e., a method that returns a boolean) from the method's pre-condition. The heart of Korat is a technique for automatic test case generation: given a predicate and a bound on the size of its inputs, Korat generates all (nonisomorphic) inputs for which the predicate returns true. Korat exhaustively explores the bounded input space of the predicate but does so efficiently by monitoring the predicate's executions and pruning large portions of the search space.This paper illustrates the use of Korat for testing several data structures, including some from the Java Collections Framework. The experimental results show that it is feasible to generate test cases from Java predicates, even when the search space for inputs is very large. This paper also compares Korat with a testing framework based on declarative specifications. Contrary to our initial expectation, the experiments show that Korat generates test cases much faster than the declarative framework.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
T. Ball, D. Hoffman, F. Ruskey, R. Webber, and L. J. White. State generation and automated class testing. Software Testing, Verification & Reliability, 10(3):149-170, 2000.
 
3
K. Bech and E. Gamma. Test infected: Programmers love writing tests. Java Report, 3(7), July 1998.
 
4
5
 
6
Y. Cheon and G. T. Leavens. A simple and practical approach to unit testing: The JML and JUnit way. Technical Report 01-12, Department of Computer Science, Iowa State University, Nov. 2001.
7
 
8
 
9
 
10
D. L. Detlefs, K. R. M. Leino, G. Nelson, and J. B. Saxe. Extended static checking. Research Report 159, Compaq Systems Research Center, 1998.
 
11
12
13
 
14
 
15
16
17
18
19
 
20
G. T. Leavens, A. L. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. Technical Report TR 98-06i, Department of Computer Science, Iowa State University, June 1998. (last revision: Aug 2001).
 
21
 
22
 
23
24
 
25
J. Offutt and A. Abdurazik. Generating tests from UML specifications. In Proc. Second International Conference on the Unified Modeling Language, Oct. 1999.
 
26
27
 
28
 
29
I. Shlyakhter. Generating effective symmetry-breaking predicates for search problems. In Proc. Workshop on Theory and Applications of Satisfiability Testing, June 2001.
 
30
N. J. A. Sloane, S. Plouffe, J. M. Borwein, and R. M. Corless. The encyclopedia of integer sequences. SIAM Review, 38(2), 1996. http://www.research.att.com/~njas/sequences/Seis.html.
 
31
 
32

CITED BY  73
Collaborative Colleagues:
Chandrasekhar Boyapati: colleagues
Sarfraz Khurshid: colleagues
Darko Marinov: colleagues