Test Data Generation for Software Testing Based on Quantum-Inspired Genetic Algorithm

The quality of test data has an important impact on the effect of software testing, so test data generation has always been a key task for finding the potential faults in program code. In structural testing, the primary goal is to cover some kinds of structure elements with some specific inputs. Search-based test data generation provides a rational way to handle this difficult problem. In the past, some well-known meta-heuristic search algorithms have been successfully utilized to solve this issue. In this paper, we introduce a variant of genetic algorithm (GA), called quantum-inspired genetic algorithm (QIGA), to generate the test data with stronger coverage ability. In this new algorithm, the traditional binary bit is replaced by a quantum bit (Q-bit) to enlarge the search space so as to avoid falling into local optimal solution. On the other hand, some other strategies such as quantum rotation gate and catastrophe operation are also used to improve algorithm efficiency and quality of test data. In addition, experimental analysis on eight real-world programs is performed to validate the effectiveness of our method. The results show that QIGA-based method can generate test data with higher coverage in much smaller convergence generations than GA-based method. More importantly, our proposed method is more robust for algorithm parameter change.

[1]  Joachim Wegener,et al.  Applying particle swarm optimization to software testing , 2007, GECCO '07.

[2]  Jinwei Gu,et al.  A novel competitive co-evolutionary quantum genetic algorithm for stochastic job shop scheduling problem , 2010, Comput. Oper. Res..

[3]  Ling Yuan,et al.  A Quantum-inspired Genetic Algorithm for Data Clustering , 2009 .

[4]  Antonia Bertolino,et al.  Software Testing Research: Achievements, Challenges, Dreams , 2007, Future of Software Engineering (FOSE '07).

[5]  André Baresel,et al.  Fitness Function Design To Improve Evolutionary Structural Testing , 2002, GECCO.

[6]  Mark Harman,et al.  Testability transformation , 2004, IEEE Transactions on Software Engineering.

[7]  A. Jefferson Offutt,et al.  Book review: Introduction to Software Testing written by Paul Amman & Jeff Offutt. and published by CUP, 2008, 978-0-521-88038 322 pp., 0-471-20282-7 , 2008, SOEN.

[8]  N. Malevris,et al.  Reducing the effects of infeasible paths in branch testing , 1989 .

[9]  Gary McGraw,et al.  Genetic algorithms for dynamic test data generation , 1997, Proceedings 12th IEEE International Conference Automated Software Engineering.

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

[11]  Ajit Narayanan,et al.  Quantum-inspired genetic algorithms , 1996, Proceedings of IEEE International Conference on Evolutionary Computation.

[12]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .

[13]  Jong-Hwan Kim,et al.  Quantum-inspired evolutionary algorithm for a class of combinatorial optimization , 2002, IEEE Trans. Evol. Comput..

[14]  John A. Clark,et al.  An automated framework for structural test-data generation , 1998, Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No.98EX239).

[15]  Abdelhamid Bouchachia,et al.  An Immune Genetic Algorithm for Software Test Data Generation , 2007, 7th International Conference on Hybrid Intelligent Systems (HIS 2007).

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

[17]  Mark Harman,et al.  Search Algorithms for Regression Test Case Prioritization , 2007, IEEE Transactions on Software Engineering.

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

[19]  Goldberg,et al.  Genetic algorithms , 1993, Robust Control Systems with Genetic Algorithms.

[20]  Rajesh Krishnamoorthi,et al.  Regression Test Suite Prioritization using Genetic Algorithms , 2009 .

[21]  Peter Grogono,et al.  Using a genetic algorithm and formal concept analysis to generate branch coverage test data automatically , 2004 .

[22]  Francisco Fernández de Vega,et al.  An Evolutionary Approach for Performing Structural Unit-Testing on Third-Party Object-Oriented Java Software , 2007, NICSO.

[23]  Bryan F. Jones,et al.  Automatic structural testing using genetic algorithms , 1996, Softw. Eng. J..

[24]  Anthony Brabazon,et al.  Quantum-Inspired Evolutionary Algorithms for Calibration of the VG Option Pricing Model , 2007, EvoWorkshops.

[25]  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.

[26]  Harmen-Hinrich Sthamer,et al.  The automatic generation of software test data using genetic algorithms , 1995 .

[27]  Jong-Hwan Kim,et al.  Quantum-inspired Multiobjective Evolutionary Algorithm for Multiobjective 0/1 Knapsack Problems , 2006, 2006 IEEE International Conference on Evolutionary Computation.

[28]  Tsong Yueh Chen,et al.  Adaptive Random Testing: The ART of test case diversity , 2010, J. Syst. Softw..

[29]  Giuliano Antoniol,et al.  Automatic mutation test input data generation via ant colony , 2007, GECCO '07.

[30]  Dun-Wei Gong,et al.  Testability transformation based on equivalence of target statements , 2011, Neural Computing and Applications.

[31]  Enrique Alba,et al.  Evolutionary algorithms for the multi‐objective test data generation problem , 2012, Softw. Pract. Exp..

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

[33]  Gexiang Zhang,et al.  Quantum-inspired evolutionary algorithms: a survey and empirical study , 2011, J. Heuristics.

[34]  Xin Yao,et al.  Search based software testing of object-oriented containers , 2008, Inf. Sci..

[35]  Michael A. Hennell,et al.  The causes and effects of infeasible paths in computer programs , 1985, ICSE '85.

[36]  Roy P. Pargas,et al.  Test‐data generation using genetic algorithms , 1999 .

[37]  Giuliano Antoniol,et al.  Keynote Paper: Search Based Software Testing for Software Security: Breaking Code to Make it Safer , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[38]  Antonia Bertolino,et al.  A case study in branch testing automation , 1997, J. Syst. Softw..

[39]  Enrique Alba,et al.  Observations in using parallel and sequential evolutionary algorithms for automatic software testing , 2008, Comput. Oper. Res..