Rule-Based Test Input Generation from Bytecode

Search-based test generators, such as those using genetic algorithms and alternative variable methods, can automatically generate test inputs. They typically rely on fitness functions to calculate fitness scores for guiding the search process. This paper presents a novel rule-based testing (RBT) approach to automated generation of test inputs from Java byte code without using fitness functions. It extracts tagged paths from the control flow graph of given byte code, analyzes and monitors the predicates in the tagged paths at runtime, and generates test inputs using predefined rules. Our case studies show that RBT has outperformed the test input generators using genetic algorithms and alternative variable methods.

[1]  Lionel C. Briand,et al.  A Systematic Review of the Application and Empirical Investigation of Search-Based Test Case Generation , 2010, IEEE Transactions on Software Engineering.

[2]  Roy P. Pargas,et al.  Test‐data generation using genetic algorithms , 1999, Softw. Test. Verification Reliab..

[3]  Mark Harman,et al.  Input Domain Reduction through Irrelevant Variable Removal and Its Effect on Local, Global, and Hybrid Search-Based Structural Test Data Generation , 2012, IEEE Transactions on Software Engineering.

[4]  Gordon Fraser,et al.  Whole Test Suite Generation , 2013, IEEE Transactions on Software Engineering.

[5]  John H. Holland,et al.  Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence , 1992 .

[6]  Andrea Arcuri,et al.  Full Theoretical Runtime Analysis of Alternating Variable Method on the Triangle Classification Problem , 2009, 2009 1st International Symposium on Search Based Software Engineering.

[7]  A. Jefferson Offutt,et al.  The dynamic domain reduction procedure for test data generation , 1999, Softw. Pract. Exp..

[8]  Sarfraz Khurshid,et al.  Test input generation using dynamic programming , 2012, SIGSOFT FSE.

[9]  Nicos Malevris,et al.  Reducing the Effects of Infeasible Paths in Branch Testing , 1989, Symposium on Testing, Analysis, and Verification.

[10]  Paul Jorgensen,et al.  Software Testing: A Craftman's Approach , 2001 .

[11]  Mark Harman,et al.  A Theoretical and Empirical Study of Search-Based Testing: Local, Global, and Hybrid Search , 2010, IEEE Transactions on Software Engineering.

[12]  J. Geelen ON HOW TO DRAW A GRAPH , 2012 .

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

[14]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[15]  McMinnPhil Search-based software test data generation: a survey , 2004 .

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

[17]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[18]  Sigrid Eldh Software Testing Techniques , 2007 .

[19]  Nikolai Tillmann,et al.  Pex-White Box Test Generation for .NET , 2008, TAP.

[20]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[21]  Phil McMinn,et al.  Search-Based Software Testing: Past, Present and Future , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[22]  Wasif Afzal,et al.  A systematic review of search-based testing for non-functional system properties , 2009, Inf. Softw. Technol..

[23]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

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

[25]  Joachim Wegener,et al.  Testing real-time systems using genetic algorithms , 1997, Software Quality Journal.

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

[27]  Paolo Tonella,et al.  Symbolic search-based testing , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).