arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.13168cs.SE
收藏

持续集成环境中可扩展且准确的测试用例优先级排序

Scalable and Accurate Test Case Prioritization in Continuous Integration Contexts

Ahmadreza Saboor Yaraghi, Mojtaba Bagherzadeh, Nafiseh Kahani, Lionel Briand

AI总结:

针对持续集成中回归测试耗时且现有机器学习TCP技术评估不足的问题,提出一种捕获CI数据源的模型,定义综合特征集,并在25个开源系统上收集数据,全面评估了基于ML的TCP的有效性及权衡。

摘要:

持续集成(CI)需要高效的回归测试,以确保软件质量,同时不显著延迟其CI构建。这就有必要采用减少回归测试时间的技术,例如测试用例优先级排序(TCP)技术,该技术对测试用例的执行进行优先级排序,以尽早检测故障。许多最近的TCP研究采用各种机器学习(ML)技术来处理CI的动态和复杂特性。然而,它们中的大多数使用有限数量的特征来训练ML模型,并在一些项目上评估这些模型,而由于这些项目的回归测试时间短和失败构建数量少,在这些项目上应用TCP几乎没有实际意义。\n在这项工作中,我们首先在概念层面上定义了一个数据模型,用于捕获典型CI环境中的数据源及其关系。其次,基于该数据模型,我们定义了一套涵盖相关研究以前使用的所有特征的综合特征集。第三,我们开发了方法和工具,为25个开源软件系统收集所定义的特征,这些系统具有足够的失败构建,且其回归测试至少需要五分钟。第四,依靠包含综合特征集的收集数据集,我们回答了四个研究问题,涉及数据收集时间、基于ML的TCP的有效性、特征对有效性的影响、基于ML的TCP模型随时间的衰减,以及数据收集时间与基于ML的TCP技术有效性之间的权衡。

英文摘要:

Continuous Integration (CI) requires efficient regression testing to ensure software quality without significantly delaying its CI builds. This warrants the need for techniques to reduce regression testing time, such as Test Case Prioritization (TCP) techniques that prioritize the execution of test cases to detect faults as early as possible. Many recent TCP studies employ various Machine Learning (ML) techniques to deal with the dynamic and complex nature of CI. However, most of them use a limited number of features for training ML models and evaluate the models on subjects for which the application of TCP makes little practical sense, due to their small regression testing time and low number of failed builds. In this work, we first define, at a conceptual level, a data model that captures data sources and their relations in a typical CI environment. Second, based on this data model, we define a comprehensive set of features that covers all features previously used by related studies. Third, we develop methods and tools to collect the defined features for 25 open-source software systems with enough failed builds and whose regression testing takes at least five minutes. Fourth, relying on the collected dataset containing a comprehensive feature set, we answer four research questions concerning data collection time, the effectiveness of ML-based TCP, the impact of the features on effectiveness, the decay of ML-based TCP models over time, and the trade-off between data collection time and the effectiveness of ML-based TCP techniques.

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

↑