Search-based test case implantation for testing untested configurations

Abstract Context Modern large-scale software systems are highly configurable, and thus require a large number of test cases to be implemented and revised for testing a variety of system configurations. This makes testing highly configurable systems very expensive and time-consuming. Objective Driven by our industrial collaboration with a video conferencing company, we aim to automatically analyze and implant existing test cases (i.e., an original test suite) to test the untested configurations. Method We propose a search-based test case implantation approach (named as SBI) consisting of two key components: 1) Test case analyzer that statically analyzes each test case in the original test suite to obtain the program dependence graph for test case statements and 2) Test case implanter that uses multi-objective search to select suitable test cases for implantation using three operators, i.e., selection, crossover, and mutation (at the test suite level) and implants the selected test cases using a mutation operator at the test case level including three operations (i.e., addition, modification, and deletion). Results We empirically evaluated SBI with an industrial case study and an open source case study by comparing the implanted test suites produced by three variants of SBI with the original test suite using evaluation metrics such as statement coverage (SC), branch coverage (BC), and mutation score (MS). Results show that for both the case studies, the test suites implanted by the three variants of SBI performed significantly better than the original test suites. The best variant of SBI achieved on average 19.3% higher coverage of configuration variable values for both the case studies. Moreover, for the open source case study, the best variant of SBI managed to improve SC, BC, and MS with 5.0%, 7.9%, and 3.2%, respectively. Conclusion SBI can be applied to automatically implant a test suite with the aim of testing untested configurations and thus achieving higher configuration coverage.

[1]  He Jiang,et al.  Feature based problem hardness understanding for requirements engineering , 2017, Science China Information Sciences.

[2]  Myra B. Cohen,et al.  Covering Arrays for Efficient Fault Characterization in Complex Configuration Spaces , 2006, IEEE Trans. Software Eng..

[3]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[4]  S. Shapiro,et al.  An Analysis of Variance Test for Normality (Complete Samples) , 1965 .

[5]  Lothar Thiele,et al.  Multiobjective evolutionary algorithms: a comparative case study and the strength Pareto approach , 1999, IEEE Trans. Evol. Comput..

[6]  Antonio Ruiz Cortés,et al.  Multi-objective test case prioritization in highly configurable systems: A case study , 2016, J. Syst. Softw..

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

[8]  Shuai Wang,et al.  REMAP: Using Rule Mining and Multi-objective Search for Dynamic Test Case Prioritization , 2018, 2018 IEEE 11th International Conference on Software Testing, Verification and Validation (ICST).

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

[10]  Myra B. Cohen,et al.  Configuration-aware regression testing: an empirical study of sampling and prioritization , 2008, ISSTA '08.

[11]  Don S. Batory,et al.  Improving Refactoring Speed by 10X , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[12]  Adam A. Porter,et al.  Using symbolic evaluation to understand behavior in configurable software systems , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[13]  Reid Holmes,et al.  Coverage is not strongly correlated with test suite effectiveness , 2014, ICSE.

[14]  Shuai Wang,et al.  Search-Based Cost-Effective Test Case Selection within a Time Budget: An Empirical Study , 2016, GECCO.

[15]  Lothar Thiele,et al.  A Tutorial on the Performance Assessment of Stochastic Multiobjective Optimizers , 2006 .

[16]  Martin Rinard,et al.  Automatic Error Elimination by Multi-Application Code Transfer , 2014 .

[17]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984 .

[18]  Tim Menzies,et al.  On the value of user preferences in search-based software engineering: A case study in software product lines , 2013, 2013 35th International Conference on Software Engineering (ICSE).

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

[20]  Myra B. Cohen,et al.  Directed test suite augmentation: techniques and tradeoffs , 2010, FSE '10.

[21]  Hans A. Hansson,et al.  A Survey on Testing for Cyber Physical System , 2015, ICTSS.

[22]  Hareton K. N. Leung,et al.  A survey of combinatorial testing , 2011, CSUR.

[23]  Kristen Walcott-Justice,et al.  Empirically Evaluating the Quality of Automatically Generated and Manually Written Test Suites , 2014, 2014 14th International Conference on Quality Software.

[24]  H. B. Mann,et al.  On a Test of Whether one of Two Random Variables is Stochastically Larger than the Other , 1947 .

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

[26]  Enrique Alba,et al.  Solving Three-Objective Optimization Problems Using a New Hybrid Cellular Genetic Algorithm , 2008, PPSN.

[27]  Abdel Salam Sayyad,et al.  Pareto-optimal search-based software engineering (POSBSE): A literature survey , 2013, 2013 2nd International Workshop on Realizing Artificial Intelligence Synergies in Software Engineering (RAISE).

[28]  Alex Groce,et al.  Code coverage for suite evaluation by developers , 2014, ICSE.

[29]  Shuai Wang,et al.  Enhancing Test Case Prioritization in an Industrial Setting with Resource Awareness and Multi-objective Search , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[30]  Mark Harman,et al.  Test data regeneration: generating new test data from existing test data , 2012, Softw. Test. Verification Reliab..

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

[32]  Enrique Alba,et al.  SMPSO: A new PSO-based metaheuristic for multi-objective optimization , 2009, 2009 IEEE Symposium on Computational Intelligence in Multi-Criteria Decision-Making(MCDM).

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

[34]  David W. Coit,et al.  Multi-objective optimization using genetic algorithms: A tutorial , 2006, Reliab. Eng. Syst. Saf..

[35]  Gordon Fraser,et al.  EvoSuite: automatic test suite generation for object-oriented software , 2011, ESEC/FSE '11.

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

[37]  Andy Zaidman,et al.  Test Code Quality and Its Relation to Issue Handling Performance , 2014, IEEE Transactions on Software Engineering.

[38]  Gregg Rothermel,et al.  Test case prioritization: an empirical study , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[39]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

[40]  Shuai Wang,et al.  Empowering Testing Activities with Modeling - Achievements and Insights from Nine Years of Collaboration with Cisco , 2017, MODELSWARD.

[41]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[42]  Sarah Smith Heckman,et al.  A cross-tool communication study on program analysis tool notifications , 2016, SIGSOFT FSE.

[43]  Reid Holmes,et al.  Using fault history to improve mutation reduction , 2013, ESEC/FSE 2013.

[44]  Jianjun Zhao APPLYING PROGRAM DEPENDENCE ANALYSIS TO JAVA SOFTWARE , 2007 .

[45]  Shaukat Ali,et al.  Mining cross product line rules with multi-objective search and machine learning , 2017, GECCO.

[46]  Lu Zhang,et al.  Predictive Mutation Testing , 2016, IEEE Transactions on Software Engineering.

[47]  B. Kitchenham,et al.  Case Studies for Method and Tool Evaluation , 1995, IEEE Softw..

[48]  Myra B. Cohen,et al.  Interaction testing of highly-configurable systems in the presence of constraints , 2007, ISSTA '07.

[49]  Mark Harman,et al.  Multi-objective Software Effort Estimation , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[50]  Mark Weiser,et al.  Program Slicing , 1981, IEEE Transactions on Software Engineering.

[51]  Mark Harman,et al.  Using Genetic Improvement and Code Transplants to Specialise a C++ Program to a Problem Class , 2014, EuroGP.

[52]  Jacob Swanson A SELF-ADAPTIVE FRAMEWORK FOR FAILURE AVOIDANCE IN CONFIGURABLE SOFTWARE , 2014 .

[53]  Mark Harman,et al.  Using hybrid algorithm for Pareto efficient multi-objective test suite minimisation , 2010, J. Syst. Softw..

[54]  Andy Schürr,et al.  Model-based pairwise testing for feature interaction coverage in software product line engineering , 2011, Software Quality Journal.

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

[56]  Shuai Wang,et al.  STIPI: Using Search to Prioritize Test Cases Based on Multi-objectives Derived from Industrial Practice , 2016, ICTSS.

[57]  Leslie Pérez Cáceres,et al.  Ant colony optimization on a limited budget of evaluations , 2015, Swarm Intelligence.

[58]  Yannis Smaragdakis,et al.  JCrasher: an automatic robustness tester for Java , 2004, Softw. Pract. Exp..

[59]  Jason Brownlee,et al.  Clever Algorithms: Nature-Inspired Programming Recipes , 2012 .

[60]  Mark Harman Making the Case for MORTO: Multi Objective Regression Test Optimization , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[61]  Enrique Alba,et al.  AbYSS: Adapting Scatter Search to Multiobjective Optimization , 2008, IEEE Transactions on Evolutionary Computation.

[62]  Anthony Ventresque,et al.  Demo: PIT a Practical Mutation Testing Tool for Java , 2016 .

[63]  Jacques Klein,et al.  Pairwise testing for software product lines: comparison of two approaches , 2012, Software Quality Journal.

[64]  Lionel C. Briand,et al.  A Search-Based OCL Constraint Solver for Model-Based Test Data Generation , 2011, 2011 11th International Conference on Quality Software.

[65]  Claire Le Goues,et al.  Automatically finding patches using genetic programming , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[66]  Mark Harman,et al.  Regression testing minimization, selection and prioritization: a survey , 2012, Softw. Test. Verification Reliab..

[67]  Michael D. Ernst,et al.  Are mutants a valid substitute for real faults in software testing? , 2014, SIGSOFT FSE.

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

[69]  Lionel C. Briand,et al.  A practical guide for using statistical tests to assess randomized algorithms in software engineering , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[70]  Yan Li,et al.  A Practical Guide to Select Quality Indicators for Assessing Pareto-Based Search Algorithms in Search-Based Software Engineering , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[71]  Myra B. Cohen,et al.  Continuous test suite augmentation in software product lines , 2013, SPLC '13.

[72]  Shuai Wang,et al.  UPMOA: An improved search algorithm to support user-preference multi-objective optimization , 2015, 2015 IEEE 26th International Symposium on Software Reliability Engineering (ISSRE).

[73]  Austen Rainer,et al.  Case Study Research in Software Engineering - Guidelines and Examples , 2012 .

[74]  David J. Sheskin,et al.  Handbook of Parametric and Nonparametric Statistical Procedures , 1997 .

[75]  Thomas Stützle,et al.  Computational results for an automatically tuned CMA-ES with increasing population size on the CEC’05 benchmark set , 2012, Soft Computing.

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

[77]  Arnaud Gotlieb,et al.  Multi-objective test prioritization in software product line testing: an industrial case study , 2014, SPLC.

[78]  D. Richard Kuhn,et al.  Software fault interactions and implications for software testing , 2004, IEEE Transactions on Software Engineering.

[79]  Mark Harman,et al.  Automated software transplantation , 2015, ISSTA.

[80]  Jeff Yu Lei,et al.  Combinatorial Software Testing , 2009, Computer.

[81]  Bogdan Korel,et al.  Automated regression test generation , 1998, ISSTA '98.

[82]  Bruno Legeard,et al.  Boundary coverage criteria for test generation from formal models , 2004, 15th International Symposium on Software Reliability Engineering.

[83]  Antonio J. Nebro,et al.  jMetal: A Java framework for multi-objective optimization , 2011, Adv. Eng. Softw..

[84]  Joost Visser,et al.  A Practical Model for Measuring Maintainability , 2007 .

[85]  Arnaud Gotlieb,et al.  Cost-effective test suite minimization in product lines using search techniques , 2015, J. Syst. Softw..

[86]  Shuai Wang,et al.  CBGA-ES: A Cluster-Based Genetic Algorithm with Elitist Selection for Supporting Multi-Objective Test Optimization , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[87]  A. Vargha,et al.  A Critique and Improvement of the CL Common Language Effect Size Statistics of McGraw and Wong , 2000 .

[88]  Shuai Wang,et al.  CBGA-ES+: A Cluster-Based Genetic Algorithm with Non-Dominated Elitist Selection for Supporting Multi-Objective Test Optimization , 2018, IEEE Transactions on Software Engineering.

[89]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[90]  Nikolai Tillmann,et al.  Guided test generation for coverage criteria , 2010, 2010 IEEE International Conference on Software Maintenance.

[91]  Gordon Fraser,et al.  Evolutionary Generation of Whole Test Suites , 2011, 2011 11th International Conference on Quality Software.

[92]  Susan Horwitz,et al.  Using Slicing to Identify Duplication in Source Code , 2001, SAS.

[93]  Alessandro Orso,et al.  Test-Suite Augmentation for Evolving Software , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[94]  Yu Lei,et al.  In-parameter-order: a test generation strategy for pairwise testing , 1998, Proceedings Third IEEE International High-Assurance Systems Engineering Symposium (Cat. No.98EX231).

[95]  Shaukat Ali,et al.  Evaluating Normalization Functions with Search Algorithms for Solving OCL Constraints , 2014, ICTSS.