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

高可配置系统演化过程中面向特征的测试用例选择与优先级排序

Feature-oriented Test Case Selection and Prioritization During the Evolution of Highly-Configurable Systems

Willian D. F. Mendonça, Wesley K. G. Assunção, Silvia R. Vergilio

AI总结:

针对高可配置系统演化中现有测试用例选择与排序方法依赖可变性模型、未考虑特征分布式实现的问题,提出FeaTestSelPrio方法,通过预处理器指令关联测试用例与特征实现,按受影响特征选例、按覆盖特征数排序,提升故障检测效果并大幅缩减测试时间。

摘要:

测试高可配置系统(Highly Configurable Systems, HCSs)是一项具有挑战性的任务,尤其是在存在特征添加、修改或移除的演化场景中,这会阻碍测试用例的选择与优先级排序工作。现有研究通常基于可变性模型开展,但该模型并非始终可用或保持更新。而仅有的少数现有方法依赖测试用例与变更文件(或代码行)之间的关联,未考虑特征的实现方式——特征通常分布在多个未变更的文件中。为克服这些局限,我们提出了FeaTestSelPrio,一种面向HCS的面向特征的测试用例选择与优先级排序方法。该方法利用HCS预处理器指令,将测试用例与特征实现关联起来,以根据每次提交中受变更影响的特征选择测试用例。随后,根据测试用例覆盖的特征数量对其进行优先级排序。与作为基线的面向变更文件的方法相比,我们的方法选择的测试数量更多,执行时间更长,但FeaTestSelPrio在故障检测方面表现更优。将该方法的执行时间与所选测试用例的执行时间相加后,与“全部重测”策略相比,我们实现了约50%的时间缩减。优先级排序步骤可在86%的存在故障的提交中降低平均测试预算。

英文摘要:

Testing Highly Configurable Systems (HCSs) is a challenging task, especially in an evolution scenario where features are added, changed, or removed, which hampers test case selection and prioritization. Existing work is usually based on the variability model, which is not always available or updated. Yet, the few existing approaches rely on links between test cases and changed files (or lines of code), not considering how features are implemented, usually spread over several and unchanged files. To overcome these limitations, we introduce FeaTestSelPrio, a feature-oriented test case selection and prioritization approach for HCSs. The approach links test cases to feature implementations, using HCS pre-processor directives, to select test cases based on features affected by changes in each commit. After, the test cases are prioritized according to the number of features they cover. Our approach selects a greater number of tests and takes longer to execute than a changed-file-oriented approach, used as baseline, but FeaTestSelPrio performs better regarding detected failures. By adding the approach execution time to the execution time of the selected test cases, we reached a reduction of $\approx$50%, in comparison with retest-all. The prioritization step allows reducing the average test budget in 86% of the failed commits.

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

↑