arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.10899cs.SEcs.LG
收藏

面向持续集成测试的机器学习测试用例优先级划分方法比较研究

Comparative Study of Machine Learning Test Case Prioritization for Continuous Integration Testing

Simula Research Laboratory(西穆拉研究实验室)

Dusica Marijan

摘要:

越来越多的研究表明,机器学习有潜力解决复杂的软件测试挑战。其中一个挑战与持续集成测试有关,持续集成测试是高度时间约束的,并且会从迭代代码提交和测试运行中生成大量数据。在这样的设置中,我们可以使用大量的测试数据来训练机器学习预测器,以识别能够加速检测代码集成期间引入的回归错误的测试用例。然而,不同的机器学习模型可以具有不同的故障预测性能,这取决于连续集成测试的上下文和参数,例如可用于连续集成周期的可变时间预算,或者用于学习以优先化失败测试用例的测试执行历史的大小。现有的测试用例优先级的研究很少研究这两个因素,这是必不可少的持续集成实践。在这项研究中,我们进行了全面的比较故障预测性能的机器学习方法,在文献中的测试用例优先级任务表现出最好的性能。我们评估的准确性的分类器在预测故障检测测试的连续集成时间预算的不同值和不同长度的测试历史用于训练分类器。在评估中,我们使用来自持续集成实践的真实工业数据集。结果表明,不同的机器学习模型具有不同的性能,用于模型训练的测试历史的大小和不同的时间预算可用于测试用例的执行。我们的研究结果表明,机器学习方法的测试优先级在持续集成测试应仔细配置,以实现最佳性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑