基于Q-gram的自适应随机测试:设想成为现实
Adaptive Random Testing with Q-grams: The Illusion Comes True
AI总结:
针对传统自适应随机测试距离计算开销大、可扩展性差的问题,提出基于q-gram聚合的ART框架,将复杂度从二次降为线性,在6个Web应用基准上的目标覆盖能力显著优于随机测试和传统距离法ART。
摘要:
自适应随机测试(Adaptive Random Testing,ART)一直饱受批评,尤其是其计算效率低下的问题,Arcuri和Briand曾着重指出这一点。他们的分析阐明,随着测试执行次数增加,ART需要进行二次方数量级的距离计算,这限制了它在需要大量测试来发现故障的场景中的可扩展性。仿真结果也佐证了这一点,表明这些距离计算的计算开销往往超过了ART带来的收益。尽管已有多种ART变体试图降低这类成本,但它们通常以牺牲故障检测能力为代价,缺乏复杂度保证,或者仅适用于特定输入类型,例如数值或离散数据。本文提出了一种新型自适应随机测试框架,用过往执行的紧凑聚合结果(比如统计先前运行中观测到的q-gram数量)替代成对距离计算。随后测试用例选择会利用这类聚合数据衡量多样性(例如q-gram的熵),从而将计算复杂度从二次方降至线性。在包含6个Web应用的基准上开展的实验表明,基于q-gram的ART覆盖的唯一目标数平均是随机测试的4倍,是使用传统距离方法的ART的3.5倍。
英文摘要:
Adaptive Random Testing (ART) has faced criticism, particularly for its computational inefficiency, as highlighted by Arcuri and Briand. Their analysis clarified how ART requires a quadratic number of distance computations as the number of test executions increases, which limits its scalability in scenarios requiring extensive testing to uncover faults. Simulation results support this, showing that the computational overhead of these distance calculations often outweighs ART's benefits. While various ART variants have attempted to reduce these costs, they frequently do so at the expense of fault detection, lack complexity guarantees, or are restricted to specific input types, such as numerical or discrete data. In this paper, we introduce a novel framework for adaptive random testing that replaces pairwise distance computations with a compact aggregation of past executions, such as counting the q-grams observed in previous runs. Test case selection then leverages this aggregated data to measure diversity (e.g., entropy of q-grams), allowing us to reduce the computational complexity from quadratic to linear. Experiments with a benchmark of six web applications, show that ART with q-grams covers, on average, 4x more unique targets than random testing, and 3.5x more than ART using traditional distance-based methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。