AGA: An Accelerated Greedy Additional Algorithm for Test Case Prioritization

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...

Full description

Saved in:
Bibliographic Details
Published inIEEE transactions on software engineering Vol. 48; no. 12; pp. 5102 - 5119
Main Authors Li, Feng, Zhou, Jianyi, Li, Yinzhu, Hao, Dan, Zhang, Lu
Format Journal Article
LanguageEnglish
Published New York IEEE 01.12.2022
IEEE Computer Society
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary: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 <inline-formula><tex-math notation="LaTeX">\mathcal {O}(m^2n)</tex-math> <mml:math><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi>m</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mi>n</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="hao-ieq1-3137929.gif"/> </inline-formula> to <inline-formula><tex-math notation="LaTeX">\mathcal {O}(kmn)</tex-math> <mml:math><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mi>m</mml:mi><mml:mi>n</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math><inline-graphic xlink:href="hao-ieq2-3137929.gif"/> </inline-formula> when <inline-formula><tex-math notation="LaTeX">n > m</tex-math> <mml:math><mml:mrow><mml:mi>n</mml:mi><mml:mo>></mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:math><inline-graphic xlink:href="hao-ieq3-3137929.gif"/> </inline-formula>, where <inline-formula><tex-math notation="LaTeX">m</tex-math> <mml:math><mml:mi>m</mml:mi></mml:math><inline-graphic xlink:href="hao-ieq4-3137929.gif"/> </inline-formula> is the number of test cases, <inline-formula><tex-math notation="LaTeX">n</tex-math> <mml:math><mml:mi>n</mml:mi></mml:math><inline-graphic xlink:href="hao-ieq5-3137929.gif"/> </inline-formula> is the number of program elements, and <inline-formula><tex-math notation="LaTeX">k</tex-math> <mml:math><mml:mi>k</mml:mi></mml:math><inline-graphic xlink:href="hao-ieq6-3137929.gif"/> </inline-formula> 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.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:0098-5589
1939-3520
DOI:10.1109/TSE.2021.3137929