Test Case Prioritization: A Snowballing Literature Review and TCPFramework with Approach Combinators
Organizations: Wroclaw University of Science and Technology, Wroclaw, Poland
Abstract
Context: Test case prioritization (TCP) is a technique widely used by software development organizations to accelerate regression testing. Objectives: We aim to systematize existing TCP knowledge and to propose and empirically evaluate a new TCP approach. Methods: We conduct a snowballing review (SR) on TCP, implement acomprehensive platform for TCP research (TCPFramework), analyze existing evaluation metrics and propose two new ones (\rAPFDc{} and ATR), and develop afamily of ensemble TCP methods called approach combinators. Results: The SR helped identify 324 studies related to TCP. The techniques proposed in our study were evaluated on the RTPTorrent dataset, consistently outperforming their base approaches across the majority of subject programs, and achieving performance comparable to the current state of the art for heuristical algorithms (in terms of \rAPFDc{}, NTR, and ATR), while using a distinct approach. Conclusions: The proposed methods can be used efficiently for TCP, reducing the time spent on regression testing by up to 2.7%. Approach combinators offer significant potential for improvements in future TCP research, due to their composability.
Figures & tables
| Review stage | Evaluated entries | Identified papers |
|---|---|---|
| (duplicates included) | (new and unique) | |
| Initial papers | — | 4 |
| Start set | 440 | ∗ 3 |
| Iteration #1: Backward | 274 | 104 |
| Iteration #1: Forward | 222 | 60 |
| Iteration #2: Backward | 6 734 | 111 |
| Year | Study reference | Years covered | Identified works |
|---|---|---|---|
| 2012 | Singh et al. (2012) | 1997 – 2011 | 65 |
| 2013 | Catal and Mishra (2013) | 2001 – 2011 | 120 |
| 2017 | de S. Campos Junior et al. (2017) | 1999 – 2016 | 90 |
| 2018 | Khatibsyarbini et al. (2018) | 1999 – 2016 | 80 |
| 2020 | de Castro-Cabrera et al. (2020) | 2017 – 2019 | 320 |
| 2020 | Prado Lima and Vergilio (2020) | 2009 – 2019 | 35 |
| Research decision | Related SR publications | How SR informed the decision |
|---|---|---|
| Dataset: RTPTorrent | ( Mattis et al., 2020 ) | SRRQ1 revealed dataset fragmentation (SIR, GSDTSR, Defects4j, Paint Control, BigFaultMatrix, etc.); RTPTorrent is the only dataset with a dedicated methodological paper addressing data quality issues. |
| Baseline: ROCKET | ( Marijan et al., 2013 ) , ( Marijan, 2023 ) , ( Prado Lima and Vergilio, 2020 ) | SRRQ2: ROCKET is the second most widely used TCP baseline after random ordering; performs comparably to or better than many ML-based methods. |
| Baseline: DBP | ( Zhou et al., 2021 ) | Identified through SR as a recent heuristic method meeting inclusion criteria for baseline selection. |
| Baseline: DFE | ( Kim and Porter, 2002 ) , ( Mattis et al., 2020 ) | Used as a non-trivial baseline in RTPTorrent; represents simple exponential-smoothing TCP approaches. |
| Approach combinators (RQ1) | ( Huang et al., 2021 ) , ( Cao et al., 2022 ) , ( Mondal and Nasre, 2021 ) , ( Hassan et al., 2024 ) | SR identified a gap: prior attempts at combining TCP methods were limited to ML-based approaches (requiring training) or simple voting schemes; no training-free combinators existed. |
| Metric: NTR | ( Prado Lima and Vergilio, 2022 ) , ( Zhao et al., 2023 ) | SR identified NTR as suitable for evaluating CI applicability; inspired the proposed ATR metric addressing its limitations. |
| Measure | Computable | Normalized ∗ | Awareness | |||
|---|---|---|---|---|---|---|
| Failure | Cost | Severity | Constraint | |||
| APFD ( Rothermel et al., 1999 ) | failed cycles | |||||
| ( Elbaum et al., 2001 ) | failed cycles | |||||
| (simple) | failed cycles | |||||
| NAPFD ( Qu et al., 2007 ) | failed cycles | |||||
| ( Zhao et al., 2023 ) | failed cycles | |||||
| Model | Existing methods | Justification |
|---|---|---|
| P1 | FoldFailsOrder ExeTimeOrder RecentnessOrder | We want to prioritize cases based on three criteria: historical failures, execution efficiency, and expected result variability. We thus promote cases that failed in previous executions (FoldFailsOrder), are quick to execute (ExeTimeOrder), and are likely to produce unstable results due to their recent introduction (RecentnessOrder). |
| P2 | FailDensityOrder ExeTimeOrder RecentnessOrder | FailDensityOrder tends to perform well in later testing cycles; however, it is unstable in early cycles, as it relies on the ratio of two estimated averages. We thus want to interpolate it with prioritizers that demonstrate stable performance early on. In our preliminary experiments, ExeTimeOrder and RecentnessOrder both have this quality. |
| P3 | FoldFailsOrder ExeTimeOrder CodeDistOrder | The total strategy of FoldFailsOrder yields large clusters of cases with identical scores, which limits its effectiveness. We hypothesize that breaking these ties is beneficial. Prioritizers that produce distinct scores are best for tiebreaking. Both ExeTimeOrder and CodeDistOrder satisfy this property and are thus well-suited. |
| Subject program | Count of CI cycles | Failure percentage | Average number of test cases | Total time spent in CI |
|---|---|---|---|---|
| LittleProxy | 427 | 6.6% | 25.6 | 59 h |
| HikariCP | 1 577 | 5.3% | 14.1 | 76 h |
| jade4j | 931 | 9.1% | 38.5 | 52 h |
| wicket-bootstrap | 904 | 2.7% | 42.9 | 53 h |
| titan | 941 | 10.4% | 41.7 | 1 215 h |
| dynjs | 935 | 1.7% | 73.3 | 229 h |
| Number | Question | Metrics |
| RQ1: | Can approach combinators beat their sub-approaches in terms of effectiveness? | — |
| • RQ1.1: | Can mixers beat their sub-approaches in terms of effectiveness? | |
| • RQ1.2: | Can interpolators beat their sub-approaches in terms of effectiveness? | |
| • RQ1.3: | Can tiebreakers beat their base approaches in terms of effectiveness? | |
| RQ2: | What is the performance of the proposed approaches? | — |
| • RQ2.1: | What is the effectiveness of the proposed approaches? |
| Subject program | RQ1.1: Mixers vs. sub-methods | |||||
|---|---|---|---|---|---|---|
| FoldFails | Recent | ExeTime | P1.1 | P1.2 | P1.3 | |
| LittleProxy | .697 | .375 | .501 | .584 | .639 | .628 |
| HikariCP | .749 | .530 | .666 | .719 | .846 | .831 |
| jade4j | .661 | .805 | .657 | .652 | .857 | .681 |
| wicket-bootstrap | .748 | .727 | .495 | .756 | .833 | .833 |
| titan | .896 | .431 | .287 | .844 | .856 | .856 |
| Subject program | RQ1.3: ExeTime breaking | ||
|---|---|---|---|
| TotalFails | ExeTime | P3.1 | |
| LittleProxy | .678 | .501 | .716 |
| HikariCP | .583 | .666 | .596 |
| jade4j | .606 | .657 | .617 |
| wicket-bootstrap | .744 | .495 | .898 |
| titan | .888 | .287 | .899 |
| Subject program | RQ2: Baselines | |||||||
|---|---|---|---|---|---|---|---|---|
| B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | |
| ( Rothermel et al., 1999 ) | ( Zhou et al., 2021 ) | ( Rothermel et al., 1999 ) | ( Fazlalizadeh et al., 2009 ) | ( Kim and Porter, 2002 ) | — | ( Marijan et al., 2013 ) | ||
| LittleProxy | .453 | .424 | .558 | .470 | .659 | .694 | .584 | .426 |
| HikariCP | .570 | .462 | .446 | .527 | .744 | .775 | .793 | .535 |
| jade4j | .226 | .485 | .566 | .769 | .661 | .887 | .570 | .842 |
| wicket-bootstrap | .009 | .529 | .514 | .741 | .892 | .747 | .855 | .783 |
| Subject program | RQ2.2: Approaches (NTR) | |||||
|---|---|---|---|---|---|---|
| B3 | B5 | B7 | P1.2 | P2 | P3.1 | |
| ( Rothermel et al., 1999 ) | ( Kim and Porter, 2002 ) | ( Marijan et al., 2013 ) | ours | |||
| LittleProxy | .440 | .521 | .513 | .564 | .617 | .570 |
| HikariCP | .608 | .634 | .796 | .835 | .635 | .590 |
| jade4j | .807 | .750 | .863 | .900 | .904 | .630 |
| wicket-bootstrap | .472 | .807 | .768 | .747 | .746 | .824 |
Automated Software Testing
Automated software testing uses tools and algorithms to generate, run, and evaluate tests that find defects and prevent regressions.
See all 134 papers