Beating Random Test Case Prioritization

Existing test case prioritization (TCP) techniques have limitations when applied to real-world projects, because these techniques require certain information to be made available before they can be applied. For example, the family of input-based TCP techniques are based on test case values or test script strings; other techniques use test coverage, test history, program structure, or requirements information. Existing techniques also cannot guarantee to always be more effective than random prioritization (RP) that does not have any precondition. As a result, RP remains the most applicable and most fundamental TCP technique. This paper proposes an extremely simple, effective, and efficient way to prioritize test cases through the introduction of a dispersity metric. Our technique is as applicable as RP. We conduct empirical studies using 43 different versions of 15 real-world projects. Empirical results show that our technique is more effective than RP. Our algorithm has a linear computational complexity and, therefore, provides a practical solution to the problem of prioritizing very large test suites (such as those containing hundreds of thousands, or millions, of test cases), where the execution time of conventional nonlinear prioritization algorithms can be prohibitive. Our technique also provides a practical solution to TCP when neither input-based nor execution-based techniques are applicable due to lack of information.

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

[2]  Gregg Rothermel,et al.  A Unified Test Case Prioritization Approach , 2014, ACM Trans. Softw. Eng. Methodol..

[3]  Phyllis G. Frankl,et al.  Empirical evaluation of the textual differencing regression testing technique , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

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

[5]  Tsong Yueh Chen,et al.  Mirror adaptive random testing , 2004, Inf. Softw. Technol..

[6]  Alexandre Petrenko,et al.  Using String Distances for Test Case Prioritisation , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[7]  Gregg Rothermel,et al.  A methodology for testing spreadsheets , 2001, TSEM.

[8]  P. Lachenbruch Statistical Power Analysis for the Behavioral Sciences (2nd ed.) , 1989 .

[9]  T. J. Breen,et al.  Biostatistical Analysis (2nd ed.). , 1986 .

[10]  Gregg Rothermel,et al.  A Static Approach to Prioritizing JUnit Test Cases , 2012, IEEE Transactions on Software Engineering.

[11]  Tao Xie,et al.  Learning for test prioritization: an industrial case study , 2016, SIGSOFT FSE.

[12]  Sarfraz Khurshid,et al.  Generalized Symbolic Execution for Model Checking and Testing , 2003, TACAS.

[13]  Kuan-Li Peng,et al.  A history-based cost-cognizant test case prioritization technique in regression testing , 2012, J. Syst. Softw..

[14]  Wing Kwong Chan,et al.  Input-based adaptive randomized test case prioritization: A local beam search approach , 2015, J. Syst. Softw..

[15]  Dave Towey,et al.  Forgetting Test Cases , 2006, 30th Annual International Computer Software and Applications Conference (COMPSAC'06).

[16]  Tsong Yueh Chen,et al.  Adaptive Random Testing in Detecting Layout Faults of Web Applications , 2018, Int. J. Softw. Eng. Knowl. Eng..

[17]  Tsong Yueh Chen,et al.  An upper bound on software testing effectiveness , 2008, TSEM.

[18]  A. Ghasemi,et al.  Normality Tests for Statistical Analysis: A Guide for Non-Statisticians , 2012, International journal of endocrinology and metabolism.

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

[20]  Julie Pallant,et al.  SPSS survival manual : a step by step guide to data analysis using SPSS for Windows , 2001, Behaviour Change.

[21]  Tsong Yueh Chen,et al.  Semi-Proving: An Integrated Method for Program Proving, Testing, and Debugging , 2011, IEEE Transactions on Software Engineering.

[22]  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).

[23]  Laurie A. Williams,et al.  System test case prioritization of new and regression test cases , 2005, 2005 International Symposium on Empirical Software Engineering, 2005..

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

[25]  Dave Towey,et al.  Restricted Random Testing: Adaptive Random Testing by Exclusion , 2006, Int. J. Softw. Eng. Knowl. Eng..

[26]  Giovanni Denaro,et al.  Static/Dynamic Test Case Generation For Software Upgrades via ARC-B and Deltatest , 2015, Validation of Evolving Software.

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

[28]  Gregg Rothermel,et al.  Incorporating varying test costs and fault severities into test case prioritization , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[29]  D. Altman,et al.  Statistics notes: The normal distribution , 1995, BMJ.

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

[31]  Huai Liu,et al.  Adaptive random testing through test profiles , 2011, Softw. Pract. Exp..

[32]  Thomas J. Ostrand,et al.  Experiments on the effectiveness of dataflow- and control-flow-based test adequacy criteria , 1994, Proceedings of 16th International Conference on Software Engineering.

[33]  Willy Susilo,et al.  On the Fault-Detection Capabilities of Adaptive Random Test Case Prioritization: Case Studies with Large Test Suites , 2012, 2012 45th Hawaii International Conference on System Sciences.

[34]  Stephane Durocher,et al.  Exploring Test Suite Diversification and Code Coverage in Multi-Objective Test Case Selection , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[35]  David M. Levine,et al.  Statistics for Managers Using Microsoft® Excel , 1997 .

[36]  Huai Liu,et al.  Adaptive random testing based on distribution metrics , 2009, J. Syst. Softw..

[37]  Benjamin Danglot Automatic Unit Test Amplification For DevOps , 2019 .

[38]  C. A. Boneau,et al.  The effects of violations of assumptions underlying the test. , 1960, Psychological bulletin.

[39]  Tsong Yueh Chen,et al.  On Favourable Conditions for Adaptive Random Testing , 2007, Int. J. Softw. Eng. Knowl. Eng..

[40]  Andy P. Field,et al.  Discovering Statistics Using Ibm Spss Statistics , 2017 .

[41]  Tsong Yueh Chen,et al.  On Adaptive Random Testing Through Iterative Partitioning , 2006, J. Inf. Sci. Eng..

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

[43]  Tao Xie,et al.  Applying Interface-Contract Mutation in Regression Testing of Component-Based Software , 2007, 2007 IEEE International Conference on Software Maintenance.

[44]  Willy Susilo,et al.  A cost-effective software testing strategy employing online feedback information , 2018, Inf. Sci..

[45]  Antonia Bertolino,et al.  FAST Approaches to Scalable Similarity-Based Test Case Prioritization , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[46]  Jacob Cohen Statistical Power Analysis for the Behavioral Sciences , 1969, The SAGE Encyclopedia of Research Design.

[47]  Jacek Czerwonka,et al.  Test case comparison and clustering using program profiles and static execution , 2009, ESEC/FSE '09.

[48]  Mauro Pezzè,et al.  Software testing and analysis - process, principles and techniques , 2007 .

[49]  Gregg Rothermel,et al.  Techniques for improving regression testing in continuous integration development environments , 2014, SIGSOFT FSE.

[50]  Marsha Chechik,et al.  Precise semantic history slicing through dynamic delta refinement , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[51]  Sarfraz Khurshid,et al.  An Information Retrieval Approach for Regression Test Prioritization Based on Program Changes , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[52]  Adam A. Porter,et al.  A history-based test prioritization technique for regression testing in resource constrained environments , 2002, ICSE '02.

[53]  Yannic Noller,et al.  Differential Program Analysis with Fuzzing and Symbolic Execution , 2018, 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[54]  Dave Towey,et al.  A revisit of three studies related to random testing , 2015, Science China Information Sciences.

[55]  J. Durlak How to select, calculate, and interpret effect sizes. , 2009, Journal of pediatric psychology.

[56]  Tsong Yueh Chen,et al.  Adaptive random testing through dynamic partitioning , 2004, Fourth International Conference onQuality Software, 2004. QSIC 2004. Proceedings..

[57]  Gregg Rothermel,et al.  Supporting Controlled Experimentation with Testing Techniques: An Infrastructure and its Potential Impact , 2005, Empirical Software Engineering.

[58]  James Miller,et al.  Centroidal Voronoi Tessellations- A New Approach to Random Testing , 2013, IEEE Transactions on Software Engineering.

[59]  Shari Lawrence Pfleeger,et al.  Preliminary Guidelines for Empirical Research in Software Engineering , 2002, IEEE Trans. Software Eng..

[60]  Myra B. Cohen,et al.  Constructing Interaction Test Suites for Highly-Configurable Systems in the Presence of Constraints: A Greedy Approach , 2008, IEEE Transactions on Software Engineering.

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

[62]  Alessandro Orso,et al.  Automated Behavioral Regression Testing , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[63]  Gustavo Soares,et al.  Automated Behavioral Testing of Refactoring Engines , 2013, IEEE Transactions on Software Engineering.

[64]  Scott E. Maxwell,et al.  On the Post Hoc Power in Testing Mean Differences , 2005 .

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

[66]  Huai Liu,et al.  A Cost-Effective Random Testing Method for Programs with Non-Numeric Inputs , 2016, IEEE Transactions on Computers.

[67]  Gregg Rothermel,et al.  Test Case Prioritization: A Family of Empirical Studies , 2002, IEEE Trans. Software Eng..

[68]  Irum Inayat,et al.  Requirements Dependencies-Based Test Case Prioritization for Extra-Functional Properties , 2019, 2019 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[69]  Ahmed E. Hassan,et al.  Static test case prioritization using topic models , 2014, Empirical Software Engineering.

[70]  A. Jefferson Offutt,et al.  Analyzing the validity of selective mutation with dominator mutants , 2016, SIGSOFT FSE.

[71]  Bogdan Korel,et al.  Application of system models in regression test suite prioritization , 2008, 2008 IEEE International Conference on Software Maintenance.

[72]  Lesson,et al.  The Normal Distribution , 2019, Essentials of Pattern Recognition.

[73]  Zhi Quan Zhou Using Coverage Information to Guide Test Case Selection in Adaptive Random Testing , 2010, 2010 IEEE 34th Annual Computer Software and Applications Conference Workshops.

[74]  A. Jefferson Offutt,et al.  Investigations of the software testing coupling effect , 1992, TSEM.