Machine Learning Regression Techniques for Test Case Prioritization in Continuous Integration Environment
Authors:
- 1 March 2022
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 196-206
Abstract
Test Case Prioritization (TCP) techniques are a key factor in reducing the regression testing costs even more when Continuous Integration (CI) practices are adopted. TCP approaches based on failure history have been adopted in this context because they are more suitable for CI environment constraints: test budget and test case volatility, that is, test cases may be added or removed over the CI cycles. Promising approaches are based on Reinforcement Learning (RL), which learns with past prioritization, guided by a reward function. In this work, we introduce a TCP approach for CI environments based on the sliding window method, which can be instantiated with different Machine Learning (ML) algorithms. Unlike other ML approaches, it does not require retraining the model to perform the prioritization and any code analysis. As an alternative for the RL approaches, we apply the Random Forest (RF) algorithm and a Long Short Term Memory (LSTM) deep learning network in our evaluation. We use three time budgets and eleven systems. The results show the applicability of the approach considering the prioritization time and the time between the CI cycles. Both algorithms take just a few seconds to execute. The RF algorithm obtained the best performance for more restrictive budgets compared to the RL approaches described in the literature. Considering all systems and budgets, RF reaches Normalized Average Percentage of Faults Detected (NAPFD) values that are the best or statistically equivalent to the best ones in around 72% of the cases, and the LSTM network in 55% of them. Moreover, we discuss some implications of our results for the usage of the algorithms evaluated.Keywords
Funding Information
- CAPES (88887.501291/2020-00,88882.382199/2019-01,88887.501314/2020-00)
- CNPq (305968/2018-1)
This publication has 28 references indexed in Scilit:
- Continuous software engineering: A roadmap and agendaJournal of Systems and Software, 2017
- Multi-perspective Regression Test Prioritization for Time-Constrained Environments2015
- GENI: A federated testbed for innovative network experimentsComputer Networks, 2014
- Regression testing minimization, selection and prioritization: a surveySoftware Testing, Verification and Reliability, 2012
- Machine Learning for Sequential Data: A Review2002
- Long Short-Term MemoryNeural Computation, 1997
- Use of Ranks in One-Criterion Variance AnalysisJournal of the American Statistical Association, 1952
- Some aspects of the sequential design of experimentsBulletin of the American Mathematical Society, 1952
- On a Test of Whether one of Two Random Variables is Stochastically Larger than the OtherThe Annals of Mathematical Statistics, 1947
- A Comparison of Alternative Tests of Significance for the Problem of $m$ RankingsThe Annals of Mathematical Statistics, 1940