北京邮电大学学报

  • EI核心期刊

北京邮电大学学报 ›› 2023, Vol. 46 ›› Issue (4): 9-14.

• 论文 • 上一篇    下一篇

一种基于层次聚类的测试用例集约简方法

朱瑞文1,2,王雅文1,2,林欢1,李帅赟1,吴彦芳1   

  1. 1. 北京邮电大学 网络与交换技术国家重点实验室
    2. 广西密码学与信息安全重点实验室

  • 收稿日期:2022-04-11 修回日期:2022-06-07 出版日期:2023-08-28 发布日期:2023-08-24
  • 通讯作者: 王雅文 E-mail:wangyawen@bupt.edu.cn

Test Suite Reduction Method Based on Hierarchical Clustering

ZHU Ruiwen1,2, WANG Yawen1,2, LIN Huan1, LI Shuaiyun1, WU Yanfang1   

  • Received:2022-04-11 Revised:2022-06-07 Online:2023-08-28 Published:2023-08-24

摘要: 为降低测试用例集约简过程中故障检测能力的损失,减少偶然正确性现象对测试可靠性的不利影响提出了一种基于层次聚类的测试用例集约简方法,使用欧氏距离计算测试用例的相似性,得出相异矩阵作为聚类的输入;另外,基于变异测试能够提高测试用例集故障检测能力的特性,给出偶然正确性概率的计算公式,在结果簇中使用基于变异测试的测试用例选择算法获取约简后的测试用例集实验结果表明,所提方法比充分的和其他不充分的测试用例约简方法分别降低了 9.8% 12% 的故障检测能力的损失

关键词: 层次聚类, 测试用例集约简, 变异测试, 偶然正确性, 故障检测能力

Abstract: To reduce the loss of fault detection capability during the test suite reduction process and to minimize the negative impact of the coincidental correctness on test adequacy. A test suite reduction method is proposed based on hierarchical clustering, which uses Euclidean distance to calculate the similarity of test cases and derives the dissimilarity matrix as the input for clustering. In addition, based on the property that mutation testing can improve the fault detection ability of test suite, a formula for calculating the probability of coincidental correctness is given. The reduced test suite are obtained in the resultant clusters using the mutation testing-based test case selection algorithm. The experimental results show that the proposed method reduces the loss of fault detection capability by 9.8% and 12% compared to adequate and other inadequate test suite reduction methods, respectively.

Key words: hierarchical clustering, test suite reduction, mutation testing, coincidental correctness, fault detection capability

中图分类号: