Improving fault localization for Simulink models using search-based testing and prediction models

One promising way to improve the accuracy of fault localization based on statistical debugging is to increase diversity among test cases in the underlying test suite. In many practical situations, adding test cases is not a cost-free option because test oracles are developed manually or running test cases is expensive. Hence, we require to have test suites that are both diverse and small to improve debugging. In this paper, we focus on improving fault localization of Simulink models by generating test cases. We identify three test objectives that aim to increase test suite diversity. We use these objectives in a search-based algorithm to generate diversified but small test suites. To further minimize test suite sizes, we develop a prediction model to stop test generation when adding test cases is unlikely to improve fault localization. We evaluate our approach using three industrial subjects. Our results show (1) the three selected test objectives are able to significantly improve the accuracy of fault localization for small test suite sizes, and (2) our prediction model is able to maintain almost the same fault localization accuracy while reducing the average number of newly generated test cases by more than half.

[1]  Lionel C. Briand,et al.  Automated Test Suite Generation for Time-Continuous Simulink Models , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[2]  Experience report: the reactis validation tool , 2007, ICFP '07.

[3]  Lionel C. Briand,et al.  Testing advanced driver assistance systems using multi-objective search and neural networks , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[4]  Marcelo d'Amorim,et al.  Entropy-based test generation for improved fault localization , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[5]  R. Venkatesh,et al.  Test generation for large automotive models , 2012, 2012 IEEE International Conference on Industrial Technology.

[6]  S. Ramesh,et al.  Automatic test case generation from Simulink/Stateflow models using model checking , 2014, Softw. Test. Verification Reliab..

[7]  Jun Wei,et al.  Generating test cases to expose concurrency bugs in android applications , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[8]  Mark Harman,et al.  Optimizing for the Number of Tests Generated in Search Based Test Data Generation with an Application to the Oracle Cost Problem , 2010, 2010 Third International Conference on Software Testing, Verification, and Validation Workshops.

[9]  Michael D. Ernst,et al.  Scaling up automated test generation: Automatically generating maintainable regression unit tests for programs , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[10]  S. Ramesh,et al.  AutoMOTGen: Automatic Model Oriented Test Generator for Embedded Control Systems , 2008, CAV.

[11]  David Notkin,et al.  Symstra: A Framework for Generating Object-Oriented Unit Tests Using Symbolic Execution , 2005, TACAS.

[12]  S. Ramesh,et al.  An integrated test generation tool for enhanced coverage of Simulink/Stateflow models , 2012, 2012 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[13]  Lionel C. Briand,et al.  Search-based automated testing of continuous controllers: Framework, tool support, and case studies , 2015, Inf. Softw. Technol..

[14]  Alessandro Orso,et al.  Are automated debugging techniques actually helping programmers? , 2011, ISSTA '11.

[15]  I. K. Mak,et al.  Adaptive Random Testing , 2004, ASIAN.

[16]  Alberto Savoia,et al.  Differential testing: a new approach to change detection , 2007, ESEC-FSE '07.

[17]  José Carlos Bregieiro Ribeiro Search-based test case generation for object-oriented java software using strongly-typed genetic programming , 2008, GECCO '08.

[18]  Mary Jean Harrold,et al.  Empirical evaluation of the tarantula automatic fault-localization technique , 2005, ASE.

[19]  John T. Stasko,et al.  Visualization of test information to assist fault localization , 2002, ICSE '02.

[20]  Pascal Bouvry,et al.  Management of an academic HPC cluster: The UL experience , 2014, 2014 International Conference on High Performance Computing & Simulation (HPCS).

[21]  David Lo,et al.  Fusion fault localizers , 2014, ASE.

[22]  David Lo,et al.  Diversity maximization speedup for localizing faults in single-fault and multi-fault programs , 2016, Automated Software Engineering.

[23]  Bryan F. Jones,et al.  A Strategy for Using Genetic Algorithms to Automate Branch and Fault-Based Testing , 1998, Comput. J..

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

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

[26]  Alessandro Orso,et al.  BERT: BEhavioral Regression Testing , 2008, WODA '08.

[27]  Wei-Yin Loh,et al.  Classification and regression trees , 2011, WIREs Data Mining Knowl. Discov..

[28]  Steven P. Reiss,et al.  Fault localization with nearest neighbor queries , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[29]  Lionel C. Briand,et al.  Effective test suites for mixed discrete-continuous stateflow controllers , 2015, ESEC/SIGSOFT FSE.

[30]  A.J.C. van Gemund,et al.  On the Accuracy of Spectrum-based Fault Localization , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).

[31]  Yves Le Traon,et al.  Improving test suites for efficient fault localization , 2006, ICSE.

[32]  Emanuele Carpanzano,et al.  Model-Checking based Verification approach for advanced Industrial Automation solutions , 2010, 2010 IEEE 15th Conference on Emerging Technologies & Factory Automation (ETFA 2010).

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

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

[35]  I JordanMichael,et al.  Scalable statistical bug isolation , 2005 .

[36]  Gordon Fraser,et al.  Combining search-based and constraint-based testing , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[37]  Michael D. Ernst,et al.  Eclat: Automatic Generation and Classification of Test Inputs , 2005, ECOOP.

[38]  Frank Tip,et al.  Directed test generation for effective fault localization , 2010, ISSTA '10.

[39]  徐锋,et al.  基于 Stateflow 的电动汽车再生制动控制策略 , 2014 .

[40]  Koushik Sen,et al.  DART: directed automated random testing , 2005, PLDI '05.

[41]  H. Cleve,et al.  Locating causes of program failures , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[42]  Lei Zhao,et al.  A Crosstab-based Statistical Method for Effective Fault Localization , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[43]  Alexander Pretschner,et al.  8Cage: lightweight fault-based test generation for simulink , 2014, ASE.

[44]  S. Ramesh,et al.  Efficient coverage of parallel and hierarchical stateflow models for test case generation , 2012, Softw. Test. Verification Reliab..

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

[46]  Ronald Fagin,et al.  Comparing top k lists , 2003, SODA '03.

[47]  Tao Xie,et al.  Improving Structural Testing of Object-Oriented Programs via Integrating Evolutionary Testing and Symbolic Execution , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

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

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

[50]  James R. Cordy,et al.  Examining the co-evolution relationship between simulink models and their test cases , 2016, MiSE@ICSE.

[51]  Rance Cleaveland,et al.  An Instrumentation-Based Approach to Controller Model Validation , 2006, ASWSD.

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

[53]  S. Ramesh,et al.  Randomized directed testing (REDIRECT) for Simulink/Stateflow models , 2008, EMSOFT '08.

[54]  Raúl A. Santelices,et al.  Lightweight fault-localization using multiple coverage types , 2009, 2009 IEEE 31st International Conference on Software Engineering.

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

[56]  Lionel C. Briand,et al.  Localizing Multiple Faults in Simulink Models , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[57]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..

[58]  Robert Eschbach,et al.  SIMOTEST: A tool for automated testing of hybrid real-time Simulink models , 2011, ETFA2011.

[59]  David Lo,et al.  Will Fault Localization Work for These Failures? An Automated Approach to Predict Effectiveness of Fault Localization Tools , 2013, 2013 IEEE International Conference on Software Maintenance.

[60]  Alex Groce,et al.  Generating focused random tests using directed swarm testing , 2016, ISSTA.

[61]  Andreas Windisch Search-based test data generation from stateflow statecharts , 2010, GECCO '10.

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

[63]  Andreas Zeller,et al.  Mutation-Driven Generation of Unit Tests and Oracles , 2010, IEEE Transactions on Software Engineering.

[64]  Lubos Brim,et al.  Executing Model Checking Counterexamples in Simulink , 2012, 2012 Sixth International Symposium on Theoretical Aspects of Software Engineering.

[65]  Paweł Skruch,et al.  Model-Based Testing in Embedded Automotive Systems , 2011, Model-Based Testing for Embedded Systems.

[66]  Frank Tip,et al.  Finding bugs in dynamic web applications , 2008, ISSTA '08.

[67]  W. Eric Wong,et al.  The DStar Method for Effective Software Fault Localization , 2014, IEEE Transactions on Reliability.

[68]  Andreas Windisch,et al.  Search-based testing of complex simulink models containing stateflow diagrams , 2009, 2009 31st International Conference on Software Engineering - Companion Volume.

[69]  Alessandro Orso,et al.  Isolating failure causes through test case generation , 2012, ISSTA 2012.

[70]  John A. Clark,et al.  A search-based framework for automatic testing of MATLAB/Simulink models , 2008, J. Syst. Softw..

[71]  Pieter J. Mosterman,et al.  Model-Based Testing for Embedded Systems , 2011, Computational Analysis, Synthesis, & Design Dynamic Systems.

[72]  Daniel Kroening,et al.  Mutation-Based Test Case Generation for Simulink Models , 2009, FMCO.

[73]  M. Kendall A NEW MEASURE OF RANK CORRELATION , 1938 .

[74]  Lionel C. Briand,et al.  Simulink fault localization: an iterative statistical debugging approach , 2016, Softw. Test. Verification Reliab..

[75]  Chao Liu,et al.  SOBER: statistical model-based bug localization , 2005, ESEC/FSE-13.

[76]  Jochen Quante,et al.  Reengineering embedded automotive software , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

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

[78]  T. H. Tse,et al.  Adaptive Random Test Case Prioritization , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[79]  Gabor Karsai,et al.  Polyglot: modeling and analysis for multiple Statechart formalisms , 2011, ISSTA '11.

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

[81]  Michael I. Jordan,et al.  Scalable statistical bug isolation , 2005, PLDI '05.