Test Case Selection and Prioritization Using Machine Learning: A Systematic Literature Review

Regression testing is an essential activity to assure that software code changes do not adversely affect existing functionalities. With the wide adoption of Continuous Integration (CI) in software projects, which increases the frequency of running software builds, running all tests can be time-consuming and resource-intensive. To alleviate that problem, Test case Selection and Prioritization (TSP) techniques have been proposed to improve regression testing by selecting and prioritizing test cases in order to provide early feedback to developers. In recent years, researchers have relied on Machine Learning (ML) techniques to achieve effective TSP (ML-based TSP). Such techniques help combine information about test cases, from partial and imperfect sources, into accurate prediction models. This work conducts a systematic literature review focused on ML-based TSP techniques, aiming to perform an in-depth analysis of the state of the art, thus gaining insights regarding future avenues of research. To that end, we analyze 29 primary studies published from 2006 to 2020, which have been identified through a systematic and documented process. This paper addresses five research questions addressing variations in ML-based TSP techniques and feature sets for training and testing ML models, alternative metrics used for evaluating the techniques, the performance of techniques, and the reproducibility of the published studies.

[1]  Hadi Hemmati,et al.  Studying Test Case Failure Prediction for Test Case Prioritization , 2017, PROMISE.

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

[3]  Statistical Methods in the Atmospheric Sciences , 2019 .

[4]  Baowen Xu,et al.  Using semi-supervised clustering to improve regression test selection techniques , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[5]  Filip Radlinski,et al.  A support vector method for optimizing average precision , 2007, SIGIR.

[6]  Paolo Tonella,et al.  Using the Case-Based Ranking Methodology for Test Case Prioritization , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[7]  Marc Roper,et al.  Separating passing and failing test executions by clustering anomalies , 2017, Software Quality Journal.

[8]  Mark Harman,et al.  Clustering test cases to achieve effective and scalable prioritisation incorporating expert knowledge , 2009, ISSTA.

[9]  H. Robbins Some aspects of the sequential design of experiments , 1952 .

[10]  Lei Xiao,et al.  Reinforcement Learning Based Test Case Prioritization for Enhancing the Security of Software , 2020, 2020 IEEE 7th International Conference on Data Science and Advanced Analytics (DSAA).

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

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

[13]  N. Cliff Dominance statistics: Ordinal analyses to answer ordinal questions. , 1993 .

[14]  Robert Hirschfeld,et al.  RTPTorrent: An Open-source Dataset for Evaluating Regression Test Prioritization , 2020, 2020 IEEE/ACM 17th International Conference on Mining Software Repositories (MSR).

[15]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[16]  Sherin M. Moussa,et al.  Cluster‐based test cases prioritization and selection technique for agile regression testing , 2017, J. Softw. Evol. Process..

[17]  Yang Feng,et al.  Using Weighted Attributes to Improve Cluster Test Selection , 2012, 2012 IEEE Sixth International Conference on Software Security and Reliability.

[18]  W. Briggs Statistical Methods in the Atmospheric Sciences , 2007 .

[19]  R. Hirschfeld,et al.  RTPTorrent , 2020, Proceedings of the 17th International Conference on Mining Software Repositories.

[20]  Lu Zhang,et al.  Optimizing test prioritization via test distribution analysis , 2018, ESEC/SIGSOFT FSE.

[21]  Gregg Rothermel,et al.  On the Use of Mutation Faults in Empirical Assessments of Test Case Prioritization Techniques , 2006, IEEE Transactions on Software Engineering.

[22]  RothermelGregg,et al.  Prioritizing Test Cases For Regression Testing , 2001 .

[23]  Annibale Panichella,et al.  Run, Forest, Run? On Randomization and Reproducibility in Predictive Software Engineering , 2020, ArXiv.

[24]  Michael D. Ernst,et al.  Defects4J: a database of existing faults to enable controlled testing studies for Java programs , 2014, ISSTA 2014.

[25]  Lukas Rosenbauer,et al.  XCS as a reinforcement learning approach to automatic test case prioritization , 2020, GECCO Companion.

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

[27]  Carlos Soubervielle-Montalvo,et al.  Source code metrics: A systematic mapping study , 2017, J. Syst. Softw..

[28]  Richard S. Sutton,et al.  Reinforcement Learning: An Introduction , 1998, IEEE Trans. Neural Networks.

[29]  Sandro Schulze,et al.  System-Level Test Case Prioritization Using Machine Learning , 2016, 2016 15th IEEE International Conference on Machine Learning and Applications (ICMLA).

[30]  Ayse Basar Bener,et al.  An Improvement to Test Case Failure Prediction in the Context of Test Case Prioritization , 2018, PROMISE.

[31]  Myra B. Cohen,et al.  Combinatorial Interaction Regression Testing: A Study of Test Case Generation and Prioritization , 2007, 2007 IEEE International Conference on Software Maintenance.

[32]  Seyed-Hassan Mirian-Hosseinabadi,et al.  Incorporating fault-proneness estimations into coverage-based test case prioritization methods , 2019, Inf. Softw. Technol..

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

[34]  Rafael Serapilha Durelli,et al.  Machine Learning Applied to Software Testing: A Systematic Mapping Study , 2019, IEEE Transactions on Reliability.

[35]  Dayang N. A. Jawawi,et al.  Test case prioritization approaches in regression testing: A systematic literature review , 2018, Inf. Softw. Technol..

[36]  Hinrich Schütze,et al.  Book Reviews: Foundations of Statistical Natural Language Processing , 1999, CL.

[37]  Silvia Regina Vergilio,et al.  Test Case Prioritization in Continuous Integration environments: A systematic mapping study , 2020, Inf. Softw. Technol..

[38]  Balaji Varanasi,et al.  Continuous Integration , 2019, Introducing Maven.

[39]  Muhammad Fermi Pasha,et al.  Recurrent Neural Network for Web Services Performance Forecasting, Ranking and Regression Testing , 2019, 2019 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC).

[40]  Nagwa Lotfy Badr,et al.  A Framework for Continuous Regression and Integration Testing in IoT Systems Based on Deep Learning and Search-Based Techniques , 2020, IEEE Access.

[41]  Morten Mossige,et al.  Reinforcement learning for automatic test case prioritization and selection in continuous integration , 2017, ISSTA.

[42]  Yuan Zhang,et al.  On Incremental Learning for Gradient Boosting Decision Trees , 2019, Neural Processing Letters.

[43]  Ming-Wei Chang,et al.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding , 2019, NAACL.

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

[45]  Taher Ahmed Ghaleb,et al.  An empirical study of the long duration of continuous integration builds , 2019, Empirical Software Engineering.

[46]  Thorsten Joachims,et al.  Optimizing search engines using clickthrough data , 2002, KDD.

[47]  Trevor Hastie,et al.  An Introduction to Statistical Learning , 2013, Springer Texts in Statistics.

[48]  Uri Alon,et al.  code2vec: learning distributed representations of code , 2018, Proc. ACM Program. Lang..

[49]  Silvia Regina Vergilio,et al.  A Multi-Armed Bandit Approach for Test Case Prioritization in Continuous Integration Environments , 2020 .

[50]  M. Stone Cross‐Validatory Choice and Assessment of Statistical Predictions , 1976 .

[51]  Xiaocheng Feng,et al.  CodeBERT: A Pre-Trained Model for Programming and Natural Languages , 2020, EMNLP.

[52]  Usman Qamar,et al.  Weight and Cluster Based Test case Prioritization Technique , 2019, 2019 IEEE 10th Annual Information Technology, Electronics and Mobile Communication Conference (IEMCON).

[53]  Jackson A. Prado Lima,et al.  Multi-Armed Bandit Test Case Prioritization in Continuous Integration Environments: A Trade-off Analysis , 2020, SAST.

[54]  Georgios Gousios,et al.  TravisTorrent: Synthesizing Travis CI and GitHub for Full-Stack Research on Continuous Integration , 2017, 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR).

[55]  Hosney Jahan,et al.  Version specific test case prioritization approach based on artificial neural network , 2019, J. Intell. Fuzzy Syst..

[56]  Stewart W. Wilson Classifier Fitness Based on Accuracy , 1995, Evolutionary Computation.

[57]  Pearl Brereton,et al.  Systematic literature reviews in software engineering - A systematic literature review , 2009, Inf. Softw. Technol..

[58]  Barbara Kitchenham,et al.  Procedures for Performing Systematic Reviews , 2004 .

[59]  Ladan Tahvildari,et al.  An Empirical Study on Bayesian Network-based Approach for Test Case Prioritization , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[60]  Yoram Singer,et al.  An Efficient Boosting Algorithm for Combining Preferences by , 2013 .

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

[62]  Roberto Pietrantuono,et al.  Learning-to-Rank vs Ranking-to-Learn: Strategies for Regression Testing in Continuous Integration , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE).

[63]  Anne M. Denton,et al.  A clustering approach to improving test case prioritization: An industrial case study , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[64]  Sousuke Amasaki,et al.  A Comparative Study of Vectorization-Based Static Test Case Prioritization Methods , 2020, 2020 46th Euromicro Conference on Software Engineering and Advanced Applications (SEAA).

[65]  Golmei Shaheamlung,et al.  A comprehensive review for test case prioritization in Software Engineering , 2020, 2020 International Conference on Intelligent Engineering and Management (ICIEM).

[66]  Georgios Gousios,et al.  Oops, My Tests Broke the Build: An Explorative Analysis of Travis CI with GitHub , 2017, 2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR).

[67]  Chen Zhang,et al.  A Dynamic Test Cluster Sampling Strategy by Leveraging Execution Spectra Information , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

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

[69]  Hang Li Learning to Rank for Information Retrieval and Natural Language Processing , 2011, Synthesis Lectures on Human Language Technologies.