Search{Based Testing

This thesis is concerned with the problem of automatic test data generation for structural testing criteria, in particular the branch coverage adequacy criterion, using search–based techniques. The primary objective of this thesis is to advance the current state–of–the–art in automated search– based structural testing. Despite the large body of work within the field of search–based testing, the accompanying literature remains without convincing solutions for several important problems, including: support for pointers, dynamic data structures, and loop–assigned flag variables. Furthermore, relatively little work has been done to extend search–based testing to multi–objective problem formulations. One of the obstacles for the wider uptake of search–based testing has been the lack of publicly available tools, which may have contributed to the lack of empirical studies carried out on real–world systems. This thesis presents AUSTIN, a prototype structural test data generation tool for the C language. The tool is built on top of the CIL framework and combines a hill climber with a custom constraint solver for pointer type inputs. AUSTIN has been applied to five large open source applications, as well as eight non– trivial, machine generated C functions drawn from three real–world embedded software modules from the automotive sector. Furthermore, AUSTIN has been compared to a state–of–the–art Evolutionary Testing Framework and a dynamic symbolic execution tool, CUTE. In all cases AUSTIN was shown to be competitive, both in terms of branch coverage and efficiency. To address the problem of loop–assigned flags, this thesis presents a testability transformation along with a tool that transforms programs with loop– assigned flags into flag–free equivalents, so that existing search–based test data generation approaches can successfully be applied. The thesis concludes by introducing multi–objective branch coverage. It presents results from a case study of the twin objectives of branch coverage and dynamic memory consumption for both real and synthetic programs.

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

[2]  N. Schraudolph,et al.  Dynamic Parameter Encoding for Genetic Algorithms , 1992, Machine Learning.

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

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

[5]  Tim Littlefair,et al.  An investigation into the use of software code metrics in the industrial software development environment , 2001 .

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

[7]  Mohammad Alshraideh,et al.  Using Program Data-State Diversity in Test Data Search , 2006, Testing: Academic & Industrial Conference - Practice And Research Techniques (TAIC PART'06).

[8]  James Miller,et al.  Automatic test data generation using genetic algorithm and program dependence graphs , 2006, Inf. Softw. Technol..

[9]  Boris Beizer,et al.  Software Testing Techniques , 1983 .

[10]  Leonardo Bottaci Instrumenting Programs With Flag Variables For Test Data Search By Genetic Algorithms , 2002, GECCO.

[11]  Carlo Ghezzi,et al.  Using symbolic execution for verifying safety-critical systems , 2001, ESEC/FSE-9.

[12]  Koushik Sen DART: Directed Automated Random Testing , 2009, Haifa Verification Conference.

[13]  Stefan Wappler,et al.  Automatic generation of object oriented unit tests using genetic programming , 2008 .

[14]  Mario Jino,et al.  Automatic Test Data Generation for Program Paths Using Genetic Algorithms , 2002, Int. J. Softw. Eng. Knowl. Eng..

[15]  Marc Schoenauer,et al.  Bringing evolutionary computation to industrial applications with guide , 2009, GECCO.

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

[17]  Yoonsik Cheon,et al.  A specification-based fitness function for evolutionary testing of object-oriented programs , 2006, GECCO '06.

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

[19]  Mark Harman,et al.  Handling dynamic data structures in search based testing , 2008, GECCO '08.

[20]  Nigel James Tracey,et al.  A search-based automated test-data generation framework for safety-critical software , 2000 .

[21]  Bin Wang,et al.  Evolutionary testing of unstructured programs in the presence of flag problems , 2005, 12th Asia-Pacific Software Engineering Conference (APSEC'05).

[22]  Neil D. Jones,et al.  Program Flow Analysis: Theory and Application , 1981 .

[23]  Kalyanmoy Deb,et al.  A fast and elitist multiobjective genetic algorithm: NSGA-II , 2002, IEEE Trans. Evol. Comput..

[24]  Tao Xie,et al.  Evacon: a framework for integrating evolutionary and concolic testing for object-oriented programs , 2007, ASE.

[25]  Baowen Xu,et al.  Configuration Strategies for Evolutionary Testing , 2005, COMPSAC.

[26]  Paolo Tonella,et al.  Evolutionary testing of classes , 2004, ISSTA '04.

[27]  Nikolai Tillmann,et al.  Automating Software Testing Using Program Analysis , 2008, IEEE Software.

[28]  Martin S. Feather,et al.  A System for Assisting Program Transformation , 1982, TOPL.

[29]  Gary McGraw,et al.  Generating Software Test Data by Evolution , 2001, IEEE Trans. Software Eng..

[30]  Carlos A. Coello Coello,et al.  Handling constraints using multiobjective optimization concepts , 2004 .

[31]  Patrice Godefroid Random testing for security: blackbox vs. whitebox fuzzing , 2007, RT '07.

[32]  Mark Harman,et al.  Evolutionary testing in the presence of loop-assigned flags: a testability transformation approach , 2004, ISSTA '04.

[33]  Philip McMinn,et al.  Evolutionary search for test data in the presence of state behaviour , 2005 .

[34]  Mark Harman,et al.  Pareto efficient multi-objective test case selection , 2007, ISSTA '07.

[35]  Mark David Weiser,et al.  Program slices: formal, psychological, and practical investigations of an automatic program abstraction method , 1979 .

[36]  Phil McMinn,et al.  IGUANA: Input Generation Using Automated Novel Algorithms. A Plug and Play Research Tool , 2007 .

[37]  John A. Clark,et al.  Automated test‐data generation for exception conditions , 2000 .

[38]  Néstor Cataño Combining Symbolic Execution and Model Checking to Reduce Dynamic Program Analysis Overhead , 2005, Rev. Colomb. de Computación.

[39]  Phil McMinn,et al.  Evolutionary Testing Using an Extended Chaining Approach , 2006, Evolutionary Computation.

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

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

[42]  Bruno Dutertre,et al.  A Fast Linear-Arithmetic Solver for DPLL(T) , 2006, CAV.

[43]  Kalyanmoy Deb,et al.  A Fast Elitist Non-dominated Sorting Genetic Algorithm for Multi-objective Optimisation: NSGA-II , 2000, PPSN.

[44]  Joachim Wegener,et al.  A Comparison of Static Analysis and Evolutionary Testing for the Verification of Timing Constraints , 2004, Real-Time Systems.

[45]  Mark Harman,et al.  Automated Test Data Generation for Coverage: Haven't We Solved This Problem Yet? , 2009, 2009 Testing: Academic and Industrial Conference - Practice and Research Techniques.

[46]  Paolo Toth,et al.  Heuristic algorithms for the multiple knapsack problem , 1981, Computing.

[47]  Baowen Xu,et al.  Application of Genetic Algorithms in Software Testing , 2007 .

[48]  G. Ruxton The unequal variance t-test is an underused alternative to Student's t-test and the Mann–Whitney U test , 2006 .

[49]  Heinz Mühlenbein,et al.  Predictive Models for the Breeder Genetic Algorithm I. Continuous Parameter Optimization , 1993, Evolutionary Computation.

[50]  Enrique Alba,et al.  Software Testing with Evolutionary Strategies , 2005, RISE.

[51]  José Javier Dolado,et al.  A tabu search algorithm for structural software testing , 2008, Comput. Oper. Res..

[52]  James E. Baker,et al.  Reducing Bias and Inefficienry in the Selection Algorithm , 1987, ICGA.

[53]  James Miller,et al.  Towards a benchmark for the evaluation of software testing techniques , 1995, Inf. Softw. Technol..

[54]  Bogdan Korel,et al.  Dynamic method for software test data generation , 1992, Softw. Test. Verification Reliab..

[55]  Tanja E. J. Vos,et al.  Evolutionary White-Box Software Test with the EvoTest Framework: A Progress Report , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[56]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[57]  Patrice Godefroid,et al.  Software partitioning for effective automated unit testing , 2006, EMSOFT '06.

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

[59]  Zohar Manna,et al.  The evolution of programs: a system for automatic program modification , 1977, POPL '77.

[60]  Joachim Wegener,et al.  Evolutionary test environment for automatic structural testing , 2001, Inf. Softw. Technol..

[61]  Joachim Wegener,et al.  Evolutionary Testing of Embedded Systems , 2003 .

[62]  Myra B. Cohen,et al.  Constructing test suites for interaction testing , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[63]  Mary Lou Soffa,et al.  TimeAware test suite prioritization , 2006, ISSTA '06.

[64]  Mark Harman,et al.  The Current State and Future of Search Based Software Engineering , 2007, Future of Software Engineering (FOSE '07).

[65]  Marc Roper Computer aided software testing using genetic algorithms , 1997 .

[66]  Mark Harman,et al.  The impact of input domain reduction on search-based test data generation , 2007, ESEC-FSE '07.

[67]  Sarfraz Khurshid,et al.  Exploring very large state spaces using genetic algorithms , 2004, International Journal on Software Tools for Technology Transfer.

[68]  Joachim Wegener,et al.  Automatic Test Data Generation For Structural Testing Of Embedded Software Systems By Evolutionary Testing , 2002, GECCO.

[69]  Rupak Majumdar,et al.  Hybrid Concolic Testing , 2007, 29th International Conference on Software Engineering (ICSE'07).

[70]  Mark Harman,et al.  FlagRemover: A testability transformation for transforming loop-assigned flags , 2011, TSEM.

[71]  André Baresel,et al.  Evolutionary Testing of Flag Conditions , 2003, GECCO.

[72]  Joachim Wegener,et al.  Evaluation of Different Fitness Functions for the Evolutionary Testing of an Autonomous Parking System , 2004, GECCO.

[73]  Andreas S. Andreou,et al.  Automatic, evolutionary test data generation for dynamic software testing , 2008, J. Syst. Softw..

[74]  Koushik Sen,et al.  CUTE and jCUTE: Concolic Unit Testing and Explicit Path Model-Checking Tools , 2006, CAV.

[75]  Andreas Windisch,et al.  Evolutionary Structural Testing of Software with Pointers , 2008, 2008 IEEE International Conference on Software Testing Verification and Validation Workshop.

[76]  Florentin Ipate,et al.  Functional Search-based Testing from State Machines , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

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

[78]  Mark Harman,et al.  Empirical evaluation of a nesting testability transformation for evolutionary testing , 2009, TSEM.

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

[80]  Alden H. Wright,et al.  Genetic Algorithms for Real Parameter Optimization , 1990, FOGA.

[81]  J. David Schaffer,et al.  Representation and Hidden Bias: Gray vs. Binary Coding for Genetic Algorithms , 1988, ML.

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

[83]  Michael Friedman,et al.  Software Assessment: Reliability, Safety, Testability , 1995 .

[84]  Eugenia Díaz,et al.  A scatter search approach for automated branch coverage in software testing , 2007 .

[85]  Nikolai Tillmann,et al.  DySy: dynamic symbolic execution for invariant inference , 2008, ICSE.

[86]  Mark Harman,et al.  A multi-objective approach to search-based test data generation , 2007, GECCO '07.

[87]  James Miller,et al.  Genetic Algorithms and the Automatic Generation ofTest , 1995 .

[88]  David L. Spooner,et al.  Automatic Generation of Floating-Point Test Data , 1976, IEEE Transactions on Software Engineering.

[89]  J. Voas,et al.  Software Testability: The New Verification , 1995, IEEE Softw..

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

[91]  Dawson R. Engler,et al.  Execution Generated Test Cases: How to Make Systems Code Crash Itself , 2005, SPIN.

[92]  J. Wegener,et al.  Improving Evolutionary Testing in the Presence of Function-Assigned Flags , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).

[93]  John A. Clark,et al.  Metrics are fitness functions too , 2004 .

[94]  Bogdan Korel,et al.  The chaining approach for software test data generation , 1996, TSEM.

[95]  Nikolai Tillmann,et al.  Unit tests reloaded: parameterized unit testing with symbolic execution , 2006, IEEE Software.

[96]  John A. Clark,et al.  Formulating software engineering as a search problem , 2003, IEE Proc. Softw..

[97]  Patrice Godefroid,et al.  Compositional dynamic test generation , 2007, POPL '07.

[98]  Y. L. Traon,et al.  From genetic to bacteriological algorithms for mutation‐based testing , 2005, Softw. Test. Verification Reliab..

[99]  Ying Qin,et al.  Fitness calculation approach for the switch-case construct in evolutionary testing , 2008, GECCO '08.

[100]  Mark Harman,et al.  Reformulating software engineering as a search problem , 2003 .

[101]  Arnaud Gotlieb,et al.  Symbolic execution of floating-point computations: Research Articles , 2006 .

[102]  L. Darrell Whitley,et al.  The GENITOR Algorithm and Selection Pressure: Why Rank-Based Allocation of Reproductive Trials is Best , 1989, ICGA.

[103]  Gilbert Syswerda,et al.  A Study of Reproduction in Generational and Steady State Genetic Algorithms , 1990, FOGA.

[104]  Gilbert Syswerda,et al.  Uniform Crossover in Genetic Algorithms , 1989, ICGA.

[105]  Ramón Sagarna Almandoz An optimization approach for software test data generation: applications of estimation of distribution algorithms and scatter search , 2007 .

[106]  Xin Yao,et al.  Estimation of distribution algorithms for testing object oriented software , 2007, 2007 IEEE Congress on Evolutionary Computation.

[107]  Bruno Marre,et al.  PathCrawler: Automatic Generation of Path Tests by Combining Static and Dynamic Analysis , 2005, EDCC.

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

[109]  Joachim Wegener,et al.  Evaluating Evolutionary Testability with Software-Measurements , 2004, GECCO.

[110]  Koushik Sen,et al.  Heuristics for Scalable Dynamic Test Generation , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.