Mining Test Oracles for Test Inputs Generated from Java Bytecode

Search-based test generation can automatically produce a large volume of test inputs. However, it is difficult to define the test oracle for each of the test inputs. This paper presents a mining approach to building a decision tree model according to the test inputs generated from Java bytecode. It converts Java bytecode into the Jimple representation, extracts predicates from the control flow graph of the Jimple code, and uses these predicates as attributes for organizing training data to build a decision tree. Our case studies show that the mining approach generated accurate behavioral models and that test oracles derived from these models were able to kill 94.67% of the mutants with injected faults.

[1]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[2]  Abraham Kandel,et al.  Using Data Mining For Automated Software Testing , 2004, Int. J. Softw. Eng. Knowl. Eng..

[3]  Bernard M. E. Moret,et al.  Decision Trees and Diagrams , 1982, CSUR.

[4]  Gregg Rothermel,et al.  An experimental determination of sufficient mutant operators , 1996, TSEM.

[5]  Phil McMinn,et al.  Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[6]  Laurie Hendren,et al.  Jimple: Simplifying Java Bytecode for Analyses and Transformations , 1998 .

[7]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[8]  Johannes Mayer,et al.  Test Oracles Using Statistical Methods , 2004, SOQUA/TECOS.