A search-based framework for automatic test-set generation for MATLAB/Simulink models

Modern testing requires faults to be discovered at the earliest possible stage, i.e. specification or architecture design stage rather than at the coding stage, because the cost of fixing an error increases with the time between its introduction and detection. Testing is required to exercise high-level models. Simulink is a software package for modelling, simulating, and analysing system-level designs of dynamic systems. Simulink has been widely used in designing large-scale embedded systems, including engine controllers. A prominent feature of such systems is that they are of high complexity and with a need for high integrity. Thus, the verification and validation processes for such systems need to be stringent. Search-based test-data generation techniques have been widely used in code level testing. Testing of various functional and non-functional properties has been targeted, as has fulfilling certain structural coverage criteria. This work takes a step further to attempt test-data generation at the higher levels of abstraction offered by Simulink models. The thesis shows how search-based test-data generation techniques, taken largely from automated code-level testing, can be adapted for Simulink models and applied to generate test data that satisfy identified test aims. In this thesis, these aims are mainly concerned with analogues of code-level structural and fault-based coverage criteria. The presence of persistent state has been shown to be problematic at the code level and such difficulties remain when Simulink models are to be tested. In order to address this problem, a technique called tracing and deducing is introduced, which helps provide better guidance to the search. Test-set extraction techniques have been used for regression testing test selection. The work in this thesis extends the existing body of work to address a wider range of problems. The use of the test-set extraction techniques enables efficient test-sets to be provided. All the above techniques are finally encapsulated into a comprehensive testing framework, which enables test-sets that are both effective and efficient to be generated. A number of experiments show that the proposed techniques are suited to their tasks and that the framework effectively and efficiently generates test-sets for Simulink models.

[1]  Martin R. Woodward,et al.  Experience with Path Analysis and Testing of Programs , 1980, IEEE Transactions on Software Engineering.

[2]  Lee J. White,et al.  A Domain Strategy for Computer Program Testing , 1980, IEEE Transactions on Software Engineering.

[3]  M. R. Woodward,et al.  Errors in algebraic specifications and an experimental mutation testing tool , 1993, Softw. Eng. J..

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

[5]  Sartaj Sahni,et al.  Experiments with Simulated Annealing , 1985, DAC 1985.

[6]  Gregg Rothermel,et al.  An experimental evaluation of selective mutation , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[7]  Jonathan P. Bowen,et al.  Formalization of software testing criteria using the Z notation , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

[8]  A. Jefferson Offutt,et al.  An Experimental Evaluation of Data Flow and Mutation Testing , 1996 .

[9]  A. Jefferson Offutt,et al.  Investigations of the software testing coupling effect , 1992, TSEM.

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

[11]  Sanjoy Paul,et al.  Generating Conformance Test Sequences for Combined Control and Data Flow of Communication Protocols , 1992, PSTV.

[12]  Jeffrey Voas,et al.  Software Fault Injection , 1998 .

[13]  Monty Newborn Automated theorem proving - theory and practice , 2000 .

[14]  Emile H. L. Aarts,et al.  Simulated Annealing: Theory and Applications , 1987, Mathematics and Its Applications.

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

[16]  W. Eric Wong,et al.  An empirical comparison of data flow and mutation‐based test adequacy criteria , 1994, Softw. Test. Verification Reliab..

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

[18]  Larry Joe Morell A theory of error-based testing , 1983 .

[19]  Mirko Conrad,et al.  Test case design based on Z and the classification-tree method , 1997, First IEEE International Conference on Formal Engineering Methods.

[20]  Alexander L. Wolf,et al.  Software testing at the architectural level , 1996, ISAW '96.

[21]  Vladimir N. Fleyshgakker,et al.  Improved serial algorithms for mutation analysis , 1993, ISSTA '93.

[22]  Hon Wai Leong,et al.  SIMULATED-ANNEALING CHANNEL ROUTER. , 1985 .

[23]  D. Richard Kuhn Fault classes and error detection capability of specification-based testing , 1999, TSEM.

[24]  Hasan Ural,et al.  Formal methods for test sequence generation , 1992, Comput. Commun..

[25]  J. McDermid,et al.  Test Data Generation for Product Lines – A Mutation Testing Approach , 2004 .

[26]  John A. Clark,et al.  Search-based mutation testing for Simulink models , 2005, GECCO '05.

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

[28]  Paulo César Masiero,et al.  A reachability tree for statecharts and analysis of some properties , 1994, Inf. Softw. Technol..

[29]  Matthias Grochtmann,et al.  Systematic Testing of Real-Time Systems , 2000 .

[30]  Darrel C. Ince,et al.  The Automatic Generation of Test Data , 1987, Comput. J..

[31]  A. Jefferson Offutt,et al.  Using compiler optimization techniques to detect equivalent mutants , 1994, Softw. Test. Verification Reliab..

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

[33]  Khaled El-Fakih,et al.  Natural optimization algorithms for optimal regression testing , 1997, Proceedings Twenty-First Annual International Computer Software and Applications Conference (COMPSAC'97).

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

[35]  Stefan Wappler,et al.  Using evolutionary algorithms for the unit testing of object-oriented software , 2005, GECCO '05.

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

[37]  John Wordsworth Software development with Z - a practical approach to formal methods in software engineering , 1992, International computer science series.

[38]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..

[39]  A. Jefferson Offutt,et al.  Automatically detecting equivalent mutants and infeasible paths , 1997 .

[40]  Leonardo Bottaci,et al.  Efficiency of mutation operators and selective mutation strategies: an empirical study , 1999, Softw. Test. Verification Reliab..

[41]  Harold W. Thimbleby,et al.  The directed Chinese Postman Problem , 2003, Softw. Pract. Exp..

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

[43]  James L. Peterson,et al.  Petri net theory and the modeling of systems , 1981 .

[44]  Eugene H. Spafford,et al.  Extending mutation testing to find environmental bugs , 1990, Softw. Pract. Exp..

[45]  Mary Shaw,et al.  Software architecture - perspectives on an emerging discipline , 1996 .

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

[47]  A. Jefferson Offutt,et al.  An Empirical Evaluation of Weak Mutation , 1994, IEEE Trans. Software Eng..

[48]  Steven G. Louie,et al.  A Monte carlo simulated annealing approach to optimization over continuous variables , 1984 .

[49]  Phil McMinn,et al.  Hybridizing Evolutionary Testing with the Chaining Approach , 2004, GECCO.

[50]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[51]  Patrick Siarry,et al.  Enhanced simulated annealing for globally minimizing functions of many-continuous variables , 1997, TOMS.

[52]  Ming T. Liu,et al.  Generating test cases for EFSM with given fault models , 1993, IEEE INFOCOM '93 The Conference on Computer Communications, Proceedings.

[53]  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).

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

[55]  Krishan K. Sabnani,et al.  A Protocol Test Generation Procedure , 1988, Comput. Networks.

[56]  M. R. Woodward,et al.  From weak to strong, dead or alive? an analysis of some mutation testing issues , 1988, [1988] Proceedings. Second Workshop on Software Testing, Verification, and Analysis.

[57]  Alistair I. Mees,et al.  Convergence of an annealing algorithm , 1986, Math. Program..

[58]  C. Reeves Modern heuristic techniques for combinatorial problems , 1993 .