Parallel test generation and execution with Korat

We present novel algorithms for parallel testing of code that takes structurally complex test inputs. The algorithms build on the Korat algorithm for constraint-based generation of structurally complex test inputs. Given an imperative predicate that specifies the desired structural constraints and a finitization that bounds the desired input size, Korat performs a systematic search to generate all test inputs (within the bounds) that satisfy the constraints. We present how to generate test inputs with a parallel search in Korat and how to execute test inputs in parallel, both off-line (when the inputs are saved on disk) and on-line (when execution immediately follows generation). The inputs that Korat generates enable bounded-exhaustive testing that checks the code under test exhaustively for all inputs within the given bounds. We also describe a novel methodology for reducing the number of equivalent inputs that Korat can generate. Our development of parallel Korat and the methodology for reducing equivalent inputs are motivated by testing an application developed at Google. The experimental results on running parallel Korat across up to 1024 machines on the Google's infrastructure show that parallel test generation and execution can achieve significant speedup, up to 543.55 times.

[1]  Neil J. A. Sloane,et al.  The encyclopedia of integer sequences , 1995 .

[2]  Sarfraz Khurshid,et al.  TestEra: Specification-Based Testing of Java Programs Using SAT , 2004, Automated Software Engineering.

[3]  Radu Iosif Exploiting heap symmetries in explicit-state model checking of software , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[4]  Sarfraz Khurshid,et al.  Generating structurally complex tests from declarative constraints , 2004 .

[5]  Willem Visser,et al.  Addressing dynamic issues of program model checking , 2001, SPIN '01.

[6]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[7]  Sasa Misailovic,et al.  Generating Test Inputs for Fault-Tree Analyzers using Imperative Predicates , 2007 .

[8]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[9]  C. V. Ramamoorthy,et al.  On the Automated Generation of Program Test Data , 1976, IEEE Transactions on Software Engineering.

[10]  Lubos Brim,et al.  Parallel breadth-first search LTL model-checking , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[11]  Sarfraz Khurshid,et al.  A Case for Efficient Solution Enumeration , 2003, SAT.

[12]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[13]  Dharma P. Agrawal,et al.  A Randomized Parallel Backtracking Algorithm , 1988, IEEE Trans. Computers.

[14]  Michael D. Jones,et al.  Parallel search for LTL violations , 2003, International Journal on Software Tools for Technology Transfer.

[15]  Elaine J. Weyuker,et al.  Theories of Program Testing and the Application of Revealing Subdomains , 1980, IEEE Transactions on Software Engineering.

[16]  David L. Dill,et al.  Parallelizing the Murϕ Verifier , 2001, Formal Methods Syst. Des..

[17]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[18]  GhemawatSanjay,et al.  The Google file system , 2003 .

[19]  Igor L. Markov,et al.  Solving difficult SAT instances in the presence of symmetry , 2002, Proceedings 2002 Design Automation Conference (IEEE Cat. No.02CH37324).

[20]  Arnaud Gotlieb,et al.  Automatic test data generation using constraint solving techniques , 1998, ISSTA '98.

[21]  Flavio Lerda,et al.  Distributed-Memory Model Checking with SPIN , 1999, SPIN.

[22]  Sigrid Eldh Software Testing Techniques , 2007 .

[23]  Vipin Kumar,et al.  State of the Art in Parallel Search Techniques for Discrete Optimization Problems , 1999, IEEE Trans. Knowl. Data Eng..

[24]  David Notkin,et al.  Rostra: a framework for detecting redundant object-oriented unit tests , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[25]  J. C. Huang,et al.  An Approach to Program Testing , 1975, CSUR.

[26]  Sarfraz Khurshid,et al.  Checking Java implementation of a naming architecture using Testera , 2001, Workshop on Software Model Checking @ CAV.

[27]  David L. Dill,et al.  Parallelizing the Murphi Verifier , 1997, CAV.

[28]  Sarfraz Khurshid,et al.  Software assurance by bounded exhaustive testing , 2004, IEEE Transactions on Software Engineering.

[29]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[30]  Daniel Jackson,et al.  Software Abstractions - Logic, Language, and Analysis , 2006 .

[31]  Darko Marinov,et al.  Automatic testing of software with structurally complex inputs , 2005 .

[32]  Matthew B. Dwyer,et al.  Parallel Randomized State-Space Search , 2007, 29th International Conference on Software Engineering (ICSE'07).

[33]  Sarfraz Khurshid,et al.  Korat: A Tool for Generating Structurally Complex Test Inputs , 2007, 29th International Conference on Software Engineering (ICSE'07).

[34]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[35]  James M. Crawford,et al.  Symmetry-Breaking Predicates for Search Problems , 1996, KR.

[36]  Lori A. Clarke,et al.  A System to Generate Test Data and Symbolically Execute Programs , 1976, IEEE Transactions on Software Engineering.

[37]  Sarfraz Khurshid,et al.  An Evaluation of Exhaustive Testing for Data Structures , 2003 .

[38]  W. M. McKeeman,et al.  Differential Testing for Software , 1998, Digit. Tech. J..

[39]  Ganesh Gopalakrishnan,et al.  A Distributed Partial Order Reduction Algorithm , 2002, FORTE.

[40]  Margus Veanes,et al.  Online testing with model programs , 2005, ESEC/FSE-13.

[41]  Richard M. Karp,et al.  Randomized parallel algorithms for backtrack search and branch-and-bound computation , 1993, JACM.

[42]  Barbara Liskov,et al.  Program Development in Java - Abstraction, Specification, and Object-Oriented Design , 1986 .

[43]  Rahul Kumar,et al.  Load Balancing Parallel Explicit State Model Checking , 2005, PDMC.

[44]  Bogdan Korel,et al.  Automated test data generation for programs with procedures , 1996, ISSTA '96.