REDUNET: reducing test suites by integrating set cover and network-based optimization

The availability of effective test suites is critical for the development and maintenance of reliable software systems. To increase test effectiveness, software developers tend to employ larger and larger test suites. The recent availability of software tools for automatic test generation makes building large test suites affordable, therefore contributing to accelerating this trend. However, large test suites, though more effective, are resources and time consuming and therefore cannot be executed frequently. Reducing them without decreasing code coverage is a needed compromise between efficiency and effectiveness of the test, hence enabling a more regular check of the software under development. We propose a novel approach, namely REDUNET, to reduce a test suite while keeping the same code coverage. We integrate this approach in a complete framework for the automatic generation of efficient and effective test suites, which includes test suite generation, code coverage analysis, and test suite reduction. Our approach formulates the test suite reduction as a set cover problem and applies integer linear programming and a network-based optimisation, which takes advantage of the properties of the control flow graph. We find the optimal set of test cases that keeps the same code coverage in fractions of seconds on real software projects and test suites generated automatically by Randoop. The results on ten real software systems show that the proposed approach finds the optimal minimisation and achieves up to 90% reduction and more than 50% reduction on all systems under analysis. On the largest project our reduction algorithm performs more than three times faster than both integer linear programming alone and the state-of-the-art heuristic Harrold Gupta Soffa.

[1]  Gregory M. Kapfhammer,et al.  An empirical study of incorporating cost into test suite reduction and prioritization , 2009, SAC '09.

[2]  Arnaud Gotlieb,et al.  FLOWER: optimal test suite reduction as a network maximum flow , 2014, ISSTA 2014.

[3]  Alessandro Orso,et al.  MINTS: A general framework and tool for supporting test-suite minimization , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[4]  Darko Marinov,et al.  Comparing and combining test-suite reduction and regression test selection , 2015, ESEC/SIGSOFT FSE.

[5]  Joseph Robert Horgan,et al.  Effect of Test Set Minimization on Fault Detection Effectiveness , 1995, 1995 17th International Conference on Software Engineering.

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

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

[8]  Gordon Fraser,et al.  Do Automatically Generated Unit Tests Find Real Faults? An Empirical Study of Effectiveness and Challenges (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[9]  Durga Prasad Mohapatra,et al.  A Slice-Based Change Impact Analysis for Regression Test Case Prioritization of Object-Oriented Programs , 2016, Adv. Softw. Eng..

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

[11]  Hyunsook Do Recent Advances in Regression Testing Techniques , 2016, Adv. Comput..

[12]  Shengwei Xu,et al.  Test Suite Reduction Using Weighted Set Covering Techniques , 2012, 2012 13th ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing.

[13]  Darko Marinov,et al.  Balancing trade-offs in test-suite reduction , 2014, SIGSOFT FSE.

[14]  Hilde van der Togt,et al.  Publisher's Note , 2003, J. Netw. Comput. Appl..

[15]  Michael D. Ernst,et al.  Randoop: feedback-directed random testing for Java , 2007, OOPSLA '07.

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

[17]  Andrea Arcuri,et al.  A Theoretical and Empirical Analysis of the Role of Test Sequence Length in Software Testing for Structural Coverage , 2012, IEEE Transactions on Software Engineering.

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

[19]  Radziah Mohamad,et al.  Effective Regression Test Case Selection , 2017, ACM Comput. Surv..

[20]  Qi Luo,et al.  Assessing Test Case Prioritization on Real Faults and Mutants , 2018, 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[21]  Gregg Rothermel,et al.  Prioritizing test cases for regression testing , 2000, ISSTA '00.

[22]  Antonia Bertolino,et al.  Scalable Approaches for Test Suite Reduction , 2019, 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE).

[23]  Christian Murphy,et al.  Automatic Test Case Generation and Test Suite Reduction for Closed-Loop Controller Software , 2013 .

[24]  Feng Duan,et al.  Combinatorial Testing: Theory and Practice , 2015, Adv. Comput..

[25]  Gregg Rothermel,et al.  Empirical studies of test‐suite reduction , 2002, Softw. Test. Verification Reliab..

[26]  Vijay V. Vazirani,et al.  Approximation Algorithms , 2001, Springer Berlin Heidelberg.

[27]  Andy Podgurski,et al.  JavaPDG: A New Platform for Program Dependence Analysis , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation.

[28]  Rajiv Gupta,et al.  A methodology for controlling the size of a test suite , 1990, Proceedings. Conference on Software Maintenance 1990.

[29]  Durga Prasad Mohapatra,et al.  An Automated Analysis of the Branch Coverage and Energy Consumption Using Concolic Testing , 2016, Arabian Journal for Science and Engineering.

[30]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[31]  Joseph Robert Horgan,et al.  Effect of Test Set Minimization on Fault Detection Effectiveness , 1995, 1995 17th International Conference on Software Engineering.

[32]  D. P. Mohapatra,et al.  Regression test suite minimization using integer linear programming model , 2017, Softw. Pract. Exp..

[33]  Bharti Suri,et al.  Test Suite Reduction by Mutation Testing Mapped to Set Cover Problem , 2016, ICTCS.

[34]  Andrea Fornaia,et al.  A Network-Based Approach for Reducing Test Suites While Maintaining Code Coverage , 2019, COMPLEX NETWORKS.

[35]  Neelam Gupta,et al.  A concept analysis inspired greedy algorithm for test suite minimization , 2005, PASTE '05.

[36]  Baowen Xu,et al.  A Degraded ILP Approach for Test Suite Reduction , 2008, SEKE.

[37]  Giuseppe Scanniello,et al.  An empirical study of inadequate and adequate test suite reduction approaches , 2018, ESEM.

[38]  Giuliano Antoniol,et al.  Clustering support for inadequate test suite reduction , 2018, 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER).