Test case prioritization (TCP) aims to reorder the regression test suite with a goal of increasing the fault detection rate. Various TCP techniques have been proposed based on different prioritization strategies. Among them, the greedy-based techniques are the most widely-used TCP techniques. However, existing greedy-based techniques usually reorder all candidate test cases in prioritization iterations, resulting in both efficiency and effectiveness problems. In this paper, we propose a generic partial attention mechanism, which adopts the previous priority values (i.e., the number of additionally-covered code units) to avoid considering all candidate test cases. Incorporating the mechanism with the additional-greedy strategy, we implement a novel coverage-based TCP technique based on partition ordering (OCP). OCP first groups the candidate test cases into different partitions and updates the partitions on the descending order. We conduct a comprehensive experiment on 19 versions of Java programs and 30 versions of C programs to compare the effectiveness and efficiency of OCP with six state-of-the-art TCP techniques: total-greedy, additional-greedy, lexicographical-greedy, unify-greedy, art-based, and search-based. The experimental results show that OCP achieves a better fault detection rate than the state-of-the-arts. Moreover, the time costs of OCP are found to achieve 85%-99% improvement than most state-of-the-arts.
翻译:测试优先化(TCP)旨在重新排列回归测试套件,目的是提高发现误差率;根据不同的优先化战略提出了各种TCP技术;其中,贪婪型技术是最广泛使用的TCP技术;然而,现有的贪婪型技术通常在排序迭代中重新排列所有候选测试案例,结果产生效率和有效性问题。在本文件中,我们提议一个通用部分关注机制,采用以前的优先值(即额外覆盖的代码单位数目),以避免考虑所有候选测试案例;将该机制与额外基因战略相结合,我们采用基于分区定购的新型基于覆盖的TCP技术(OCP)。OCP首先将候选测试案例分组到不同的分区,更新降序的分区。我们对19个版本的爪哇方案和30个版本的C方案进行了全面实验,以将OCP的效益和效率与6种基于最先进的TCP技术相比较:总基因、额外基因、分类-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-地图-比结果-地图-地图-地图-地图-地图-地图-比结果-地图-地图-地图-地图-测试-结果-结果-发现-结果-结果-结果-比结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-比结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-比结果-结果-结果-结果-结果-结果-结果-比-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-比-结果-比-结果-比结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-结果-比-比-结果-和结果-结果-比-结果-结果-比-比-实验-实验-结果-和结果-实验-实验-实验-实验-比-比-比-比-实验-实验-实验-