Estimating software testing complexity

Context: Complexity measures provide us some information about software artifacts. A measure of the difficulty of testing a piece of code could be very useful to take control about the test phase. Objective: The aim in this paper is the definition of a new measure of the difficulty for a computer to generate test cases, we call it Branch Coverage Expectation (BCE). We also analyze the most common complexity measures and the most important features of a program. With this analysis we are trying to discover whether there exists a relationship between them and the code coverage of an automatically generated test suite. Method: The definition of this measure is based on a Markov model of the program. This model is used not only to compute the BCE, but also to provide an estimation of the number of test cases needed to reach a given coverage level in the program. In order to check our proposal, we perform a theoretical validation and we carry out an empirical validation study using 2600 test programs. Results: The results show that the previously existing measures are not so useful to estimate the difficulty of testing a program, because they are not highly correlated with the code coverage. Our proposed measure is much more correlated with the code coverage than the existing complexity measures. Conclusion: The high correlation of our measure with the code coverage suggests that the BCE measure is a very promising way of measuring the difficulty to automatically test a program. Our proposed measure is useful for predicting the behavior of an automatic test case generator.

[1]  FerrerJavier,et al.  Evolutionary algorithms for the multi-objective test data generation problem , 2012 .

[2]  Ahmed E. Hassan,et al.  Predicting faults using the complexity of code changes , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[3]  Tu Honglei,et al.  The Research on Software Metrics and Software Complexity Metrics , 2009, 2009 International Forum on Computer Science-Technology and Applications.

[4]  Giancarlo Succi,et al.  Open Source Development, Communities and Quality: IFIP 20th World Computer Congress, Working Group 2.3 on Open Source Software, September 7-10, 2008, ... in Information and Communication Technology) , 2011 .

[5]  Myra B. Cohen,et al.  An Orchestrated Survey on Automated Software Test Case Generation I , 2013 .

[6]  Peter S. May,et al.  Test data generation : two evolutionary approaches to mutation testing , 2007 .

[7]  William Thomson,et al.  Mathematical and physical papers , 1880 .

[8]  Yuming Zhou,et al.  On the ability of complexity metrics to predict fault-prone classes in object-oriented systems , 2010, J. Syst. Softw..

[9]  Tom DeMarco,et al.  Controlling Software Projects: Management, Measurement, and Estimates , 1986 .

[10]  Mark Harman,et al.  AUSTIN: An open source tool for search based software testing of C programs , 2013, Inf. Softw. Technol..

[11]  Maurice H. Halstead,et al.  Elements of software science , 1977 .

[12]  Nicos Malevris,et al.  The collateral coverage of data flow criteria when branch testing , 2006, Inf. Softw. Technol..

[13]  Ellis Horowitz,et al.  Software Cost Estimation with COCOMO II , 2000 .

[14]  Myra B. Cohen,et al.  An orchestrated survey of methodologies for automated software test case generation , 2013, J. Syst. Softw..

[15]  Giancarlo Succi,et al.  Open Source Development, Communities and Quality, IFIP 20th World Computer Congress, Working Group 2.3 on Open Source Software, OSS 2008, September 7-10, 2008, Milano, Italy , 2008, OSS.

[16]  Zbigniew Michalewicz,et al.  Handbook of Evolutionary Computation , 1997 .

[17]  E. Alba,et al.  Correlation Between Static Measures and Code Coverage in Evolutionary Test Data Generation , 2010 .

[18]  G. Myers,et al.  The Art of Software Testing: Myers/Art , 2012 .

[19]  Taghi M. Khoshgoftaar,et al.  Predicting Software Development Errors Using Software Complexity Metrics , 1990, IEEE J. Sel. Areas Commun..

[20]  Ana Filipa Nogueira,et al.  Predicting software complexity by means of evolutionary testing , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[21]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[22]  Bryan F. Jones,et al.  Automatic structural testing using genetic algorithms , 1996, Softw. Eng. J..

[23]  Shari Lawrence Pfleeger,et al.  Towards a Framework for Software Measurement Validation , 1995, IEEE Trans. Software Eng..

[24]  Andrea Arcuri,et al.  Evolutionary repair of faulty software , 2011, Appl. Soft Comput..

[25]  Enrique Alba,et al.  Evolutionary algorithms for the multi‐objective test data generation problem , 2012, Softw. Pract. Exp..

[26]  H. Helmholtz,et al.  Mathematical and Physical Papers , 1885, Nature.

[27]  Bill Curtis,et al.  Third time charm: Stronger prediction of programmer performance by software complexity metrics , 1979, ICSE 1979.

[28]  Alok Mishra,et al.  Experience in Predicting Fault-Prone Software Modules Using Complexity Metrics , 2012 .

[29]  Soma Sekhara Babu Lam,et al.  Automated Generation of Independent Paths and Test Suite Optimization Using Artificial Bee Colony , 2012 .

[30]  Mark Dixon An Objective Measure of Code Quality , 2008 .

[31]  Hisashi Kobayashi,et al.  Probability, Random Processes, and Statistical Analysis: Moment-generating function and characteristic function , 2011 .

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

[33]  Victor R. Basili,et al.  Software errors and complexity: an empirical investigation0 , 1984, CACM.

[34]  Antonia Bertolino,et al.  How Many Paths are Needed for Branch Testing? , 1996, J. Syst. Softw..

[35]  Lionel C. Briand,et al.  A Systematic Review of the Application and Empirical Investigation of Search-Based Test Case Generation , 2010, IEEE Transactions on Software Engineering.

[36]  William Turin,et al.  Probability, Random Processes, and Statistical Analysis: Statistical inference , 2011 .

[37]  Gregory Tassey,et al.  Prepared for what , 2007 .

[38]  Victor R. Basili,et al.  Software errors and complexity: an empirical investigation , 1993 .

[39]  Elaine J. Weyuker,et al.  Evaluating Software Complexity Measures , 2010, IEEE Trans. Software Eng..

[40]  Aarnout Brombacher,et al.  Probability... , 2009, Qual. Reliab. Eng. Int..

[41]  Sanjay Misra,et al.  Evaluation and comparison of cognitive complexity measure , 2007, SOEN.

[42]  Paul Piwowarski,et al.  A nesting level complexity measure , 1982, SIGP.