AI 中文总结
针对现有黑盒测试套件最小化方法非确定性导致结果不一致的问题,提出DTM框架,通过树型相似度与三种确定性算法实现测试套件缩减,在Defects4J数据集上表现优于现有方法且结果一致。
AI 中文摘要
黑盒测试套件最小化(TSM)技术可在无需访问生产代码的情况下降低测试成本,但现有有效方法依赖进化搜索算法,会引入非确定性,导致不同运行结果不一致,削弱自动化测试流水线的可靠性。本文提出DTM(黑盒测试套件最小化的确定性方法),该框架在保证测试套件缩减效果与效率的同时实现确定性缩减。DTM将测试用例转换为抽象语法树,采用四种树型度量计算成对相似度;子集选择阶段使用三种确定性算法:改进型最小生成树、谱聚类与动态规划。在包含661个缺陷版本的Defects4J的16个Java项目上对DTM进行评估,实验结果显示,DTM平均准确率达0.74,执行时间仅0.98分钟,优于所有最先进方法,且多次运行结果始终一致,确保完全确定性。
英文摘要
Black-box Test Suite Minimization (TSM) techniques reduce testing costs without requiring access to production code. However, existing effective approaches rely on evolutionary search algorithms, introducing non-determinism that produces inconsistent results across runs, undermining reliability in automated testing pipelines. We propose DTM (Deterministic approaches for black-box Test suite Minimization), a framework that ensures deterministic test suite reduction while preserving effectiveness and efficiency. DTM converts test cases into Abstract Syntax Trees and computes pairwise similarities using four tree-based measures. For subset selection, it employs three deterministic algorithms: Modified Minimum Spanning Tree, Spectral Clustering, and Dynamic Programming. We evaluated DTM on 16 Java projects from Defects4J with 661 buggy versions. Experimental results show that DTM achieved an average accuracy of 0.74 with an execution time of just 0.98 minutes, outperforming all state-of-the-art approaches. Moreover, it consistently produced identical results across multiple runs, ensuring full determinism.