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

AGA:一种加速的贪婪附加测试用例优先算法

AGA: An Accelerated Greedy Additional Algorithm for Test Case Prioritization

Feng Li, Jianyi Zhou, Yinzhu Li, Dan Hao, Lu Zhang

摘要:

近年来,许多测试用例优先级(TCP)技术被提出来加快故障检测的过程。然而,很少有工作考虑到这些技术的效率问题。在本文中,我们的目标贪婪附加(GA)算法,这已被广泛认为是有效的,但效率较低,并试图提高其效率,同时保持有效性。在我们的加速GA(AGA)算法中,我们使用一些额外的数据结构来减少GA算法中的冗余数据访问,从而当$n > m$时,时间复杂度从$\mathcal{O}(m^2n)$降低到$\mathcal{O}(kmn)$,其中$m$是测试用例的数量,$n$是程序元素的数量,$k$是迭代次数。此外,我们观察了迭代次数对我们数据集上的优先级排序效率的影响,并建议在AGA算法中使用特定的迭代次数以进一步提高效率。我们对55个开源主题进行了实验。特别是,我们实现了两种广泛使用的输入格式,邻接矩阵和邻接表的每一个TCP算法。由于基于邻接矩阵的TCP算法的效率不如基于邻接表的TCP算法,因此主要对基于邻接表的TCP算法进行结果分析。结果表明,AGA的平均加速比是GA的5.95倍,而平均故障检测率(APFD)与GA的平均效率相当。此外,我们进行了一个工业案例研究,收集了22个主题,从百度,发现平均加速比AGA是44.27倍,这表明实际使用的AGA在现实世界的场景。

英文摘要:

In recent years, many test case prioritization (TCP) techniques have been proposed to speed up the process of fault detection. However, little work has taken the efficiency problem of these techniques into account. In this paper, we target the Greedy Additional (GA) algorithm, which has been widely recognized to be effective but less efficient, and try to improve its efficiency while preserving effectiveness. In our Accelerated GA (AGA) algorithm, we use some extra data structures to reduce redundant data accesses in the GA algorithm and thus the time complexity is reduced from $\mathcal{O}(m^2n)$ to $\mathcal{O}(kmn)$ when $n > m$, where $m$ is the number of test cases, $n$ is the number of program elements, and $k$ is the iteration number. Moreover, we observe the impact of iteration numbers on prioritization efficiency on our dataset and propose to use a specific iteration number in the AGA algorithm to further improve the efficiency. We conducted experiments on 55 open-source subjects. In particular, we implemented each TCP algorithm with two kinds of widely-used input formats, adjacency matrix and adjacency list. Since a TCP algorithm with adjacency matrix is less efficient than the algorithm with adjacency list, the result analysis is mainly conducted based on TCP algorithms with adjacency list. The results show that AGA achieves 5.95X speedup ratio over GA on average, while it achieves the same average effectiveness as GA in terms of Average Percentage of Fault Detected (APFD). Moreover, we conducted an industrial case study on 22 subjects, collected from Baidu, and find that the average speedup ratio of AGA over GA is 44.27X, which indicates the practical usage of AGA in real-world scenarios.

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

↑