[论文解读] Comparative Study of Machine Learning Test Case Prioritization for Continuous Integration Testing
本研究使用真实工业数据集,评估了在持续集成(CI)环境中用于测试用例优先级排序的机器学习模型——LambdaRank、SVM、GBDT 和 ANN 的表现。研究发现,模型性能显著受测试历史长度(最佳范围:40%–60%)和时间预算的影响:在时间约束较紧时,LambdaRank 在故障检测有效性方面表现最佳;而 ANN 虽然在排序时间上最快,但对历史长度最为敏感。
There is a growing body of research indicating the potential of machine learning to tackle complex software testing challenges. One such challenge pertains to continuous integration testing, which is highly time-constrained, and generates a large amount of data coming from iterative code commits and test runs. In such a setting, we can use plentiful test data for training machine learning predictors to identify test cases able to speed up the detection of regression bugs introduced during code integration. However, different machine learning models can have different fault prediction performance depending on the context and the parameters of continuous integration testing, for example variable time budget available for continuous integration cycles, or the size of test execution history used for learning to prioritize failing test cases. Existing studies on test case prioritization rarely study both of these factors, which are essential for the continuous integration practice. In this study we perform a comprehensive comparison of the fault prediction performance of machine learning approaches that have shown the best performance on test case prioritization tasks in the literature. We evaluate the accuracy of the classifiers in predicting fault-detecting tests for different values of the continuous integration time budget and with different length of test history used for training the classifiers. In evaluation, we use real-world industrial datasets from a continuous integration practice. The results show that different machine learning models have different performance for different size of test history used for model training and for different time budget available for test case execution. Our results imply that machine learning approaches for test prioritization in continuous integration testing should be carefully configured to achieve optimal performance.
研究动机与目标
- 评估基于机器学习的测试优先级排序在 CI 环境中的故障预测有效性和时间效率。
- 研究用于训练的测试执行历史长度对机器学习模型性能的影响。
- 分析不同时间预算对基于机器学习的测试优先级排序方法有效性的影响。
- 在真实 CI 环境中,对比机器学习模型(LambdaRank、SVM、GBDT、ANN)与启发式方法(ROCKET、Random)的表现。
- 为工业 CI 流水线中配置机器学习模型以实现最佳性能提供实证指导。
提出的方法
- 本研究使用来自 Cisco、ABB 和 Google 的真实工业数据集进行机器学习模型的训练与评估。
- 使用不同长度的测试执行历史(从可用数据的 10% 到 100%)训练四种机器学习模型——LambdaRank(学习排序)、SVM、GBDT 和 ANN。
- 通过 APFD(故障检测平均精度)评估测试用例优先级排序效果,以衡量故障检测的有效性。
- 通过 TDFF(首次故障检测时间)、TDLF(最后一次故障检测时间)、TRAIN(模型训练时间)和 PART(优先级算法运行时间)衡量时间效率。
- 在不同时间预算级别(B1–B5)下对模型进行比较,以反映不同 CI 周期的约束条件。
- 在三个工业数据集上进行实验,以确保研究结果的现实相关性和可推广性。

实验结果
研究问题
- RQ1用于训练的测试执行历史长度如何影响基于机器学习的测试优先级排序模型的故障预测性能?
- RQ2在 CI 周期中,不同时间预算下各机器学习模型的表现如何?
- RQ3哪种机器学习模型在 CI 测试中实现了故障检测有效性与时间效率的最佳平衡?
- RQ4基于机器学习的方法与启发式基线(ROCKET 和 Random)在故障检测效果和运行时间方面有何差异?
主要发现
- 训练机器学习模型的最佳测试历史长度位于可用执行历史的 40% 至 60% 之间,性能在此范围内达到峰值。
- ANN 模型对较老的历史记录最不敏感,在不同历史长度下表现稳定,但在历史较短时性能最差。
- 在时间预算较短时,LambdaRank(LRN)实现了最高的故障检测有效性,其 APFD 得分最佳,优于所有其他机器学习模型。
- 尽管 ANN 的排序时间最快,但在短时间预算下其故障检测性能最差。
- 在首次故障检测时间(TDFF)方面,LambdaRank 和 SVM 表现最佳,而 Random 表现最差。
- ANN 模型的排序时间(PART)最快,其次为 GBDT 和 LRN,而 Random 因其简单性成为最快的选择。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。