A Theoretical and Empirical Analysis of the Role of Test Sequence Length in Software Testing for Structural Coverage

In the presence of an internal state, often a sequence of function calls is required to test software. In fact, to cover a particular branch of the code, a sequence of previous function calls might be required to put the internal state in the appropriate configuration. Internal states are not only present in object-oriented software, but also in procedural software (e.g., static variables in C programs). In the literature, there are many techniques to test this type of software. However, to the best of our knowledge, the properties related to the choice of the length of these sequences have received only a little attention in the literature. In this paper, we analyze the role that the length plays in software testing, in particular branch coverage. We show that, on “difficult” software testing benchmarks, longer test sequences make their testing trivial. Hence, we argue that the choice of the length of the test sequences is very important in software testing. Theoretical analyses and empirical studies on widely used benchmarks and on an industrial software are carried out to support our claims.

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

[2]  Mark Harman,et al.  A theoretical & empirical analysis of evolutionary testing and hill climbing for structural test data generation , 2007, ISSTA '07.

[3]  Andrea Arcuri,et al.  It Does Matter How You Normalise the Branch Distance in Search Based Software Testing , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[4]  Lionel C. Briand,et al.  Black-Box System Testing of Real-Time Embedded Systems Using Random and Search-Based Testing , 2010, ICTSS.

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

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

[7]  Per Kristian Lehre,et al.  Theoretical Runtime Analyses of Search Algorithms on the Test Data Generation for the Triangle Classification Problem , 2008, 2008 IEEE International Conference on Software Testing Verification and Validation Workshop.

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

[9]  Ronald L. Rivest,et al.  Introduction to Algorithms, Second Edition , 2001 .

[10]  Per Kristian Lehre,et al.  Runtime analysis of (1+l) EA on computing unique input output sequences , 2007, 2007 IEEE Congress on Evolutionary Computation.

[11]  David Notkin,et al.  Rostra: a framework for detecting redundant object-oriented unit tests , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[12]  Francisco Fernández de Vega,et al.  Test Case Evaluation and Input Domain Reduction strategies for the Evolutionary Testing of Object-Oriented software , 2009, Inf. Softw. Technol..

[13]  Joachim Wegener,et al.  Evolutionary unit testing of object-oriented software using strongly-typed genetic programming , 2006, GECCO '06.

[14]  Andrea Arcuri,et al.  Insight knowledge in search based software testing , 2009, GECCO.

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

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

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

[18]  Andrea Arcuri,et al.  Theoretical Analysis of Local Search in Software Testing , 2009, SAGA.

[19]  McMinnPhil Search-based software test data generation: a survey , 2004 .

[20]  Simeon C. Ntafos,et al.  An Evaluation of Random Testing , 1984, IEEE Transactions on Software Engineering.

[21]  Sarfraz Khurshid,et al.  Test input generation with java PathFinder , 2004, ISSTA '04.

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

[23]  Alex Groce,et al.  Random Test Run Length and Effectiveness , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

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

[25]  Per Kristian Lehre,et al.  Crossover Can Be Constructive When Computing Unique Input Output Sequences , 2008, SEAL.

[26]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[27]  Angelo Gargantini,et al.  Experiments on the test case length in specification based test case generation , 2009, 2009 ICSE Workshop on Automation of Software Test.

[28]  Andreas Zeller,et al.  Efficient unit test case minimization , 2007, ASE '07.

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

[30]  Andrea Arcuri Longer is Better: On the Role of Test Sequence Length in Software Testing , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[31]  Lionel C. Briand,et al.  Formal analysis of the effectiveness and predictability of random testing , 2010, ISSTA '10.

[32]  Francisco Fernández de Vega,et al.  Enabling Object Reuse on Genetic Programming-Based Approaches to Object-Oriented Evolutionary Testing , 2010, EuroGP.

[33]  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.

[34]  Per Kristian Lehre,et al.  Runtime analysis of search heuristics on software engineering problems , 2009, Frontiers of Computer Science in China.

[35]  Yuanyuan Zhang,et al.  Search Based Software Engineering: A Comprehensive Analysis and Review of Trends Techniques and Applications , 2009 .

[36]  Corina S. Pasareanu,et al.  Test input generation for java containers using state matching , 2006, ISSTA '06.

[37]  Xin Yao,et al.  Time complexity of evolutionary algorithms for combinatorial optimization: A decade of results , 2007, Int. J. Autom. Comput..

[38]  X. Yao,et al.  Theoretical Runtime Analysis in Search Based Software Engineering , 2009 .

[39]  Rajeev Motwani,et al.  Randomized Algorithms , 1995, SIGA.

[40]  Andrea Arcuri,et al.  Full Theoretical Runtime Analysis of Alternating Variable Method on the Triangle Classification Problem , 2009, 2009 1st International Symposium on Search Based Software Engineering.

[41]  Luciano Baresi,et al.  TestFul: An Evolutionary Test Approach for Java , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.