作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 体系结构与软件技术 • 上一篇    下一篇

基于二分K-means的测试用例集约简方法

汪文靖 1,2,冯瑞 1,2   

  1. (1.复旦大学 计算机科学技术学院,上海 201203; 2.上海视频技术与系统工程研究中心,上海 201203)
  • 收稿日期:2015-11-09 出版日期:2016-12-15 发布日期:2016-12-15
  • 作者简介:汪文靖(1990—),男,硕士研究生,主研方向为软件测试、模式识别、机器学习;冯瑞,研究员。
  • 基金资助:
    国家科技支撑计划项目(2013BAH09F01);上海市科委科技创新行动计划项目(14511106900)。

Test Suite Reduction Method Based on Bisecting K-means

WANG Wenjing  1,2,FENG Rui  1,2   

  1. (1.School of Computer Science and Technology,Fudan University,Shanghai 201203,China; 2.Shanghai Engineering Research Center for Video Technology and System,Shanghai 201203,China)
  • Received:2015-11-09 Online:2016-12-15 Published:2016-12-15

摘要:

测试用例集约简是软件测试中的重要研究问题之一,目的是以尽量少的测试用例达到测试目标。为此,提出一种新的测试用例集约简方法。应用二分K-means聚类算法对回归测试的测试用例集进行约简,以白盒测试的路径覆盖为准则,对每个测试用例进行量化,使每个用例变成一个点。以黑盒测试的功能需求数作为聚类数,在聚类结果的每一簇中,按照离中心点的距离进行排序,依次从每一簇中选择测试用例,直至满足所有测试需求,得到约简的测试用例集。实验结果表明,该方法能有效地减小测试用例集的规模,降低用例集检错率。

关键词: 测试用例集约简, 软件测试, 二分K-means聚类算法, 黑盒测试, 白盒测试, 检错率

Abstract:

Test suite reduction is an important research questions in software test,its purpose is to test as little as possible to achieve the test objective.This paper presents a test suite reduction method based on bisecting K-means.It uses the bisecting K-means clustering algorithm to reduce regression test suite.Regarding the path coverage of white box test as a criterion,each test case is quantified,so that each case becomes a point,the number of black box test functional needs is taken as the number of clusters,each cluster is sorted in the clustering results according to the distance from the center,the test cases from each cluster are selected,until all testing requirements are met and reduced test suite is got.Simulation experimental results show that this method can effectively reduce the size of the test suite,and effectively reduce the impact on the use case set error detection rate.

Key words: test suite reduction, software test, bisecting K-means clustering algorithm, black box testing, white box testing;error detection rate

中图分类号: