电子学报 ›› 2022, Vol. 50 ›› Issue (1): 149-156.DOI: 10.12263/DZXB.20201284

• 学术论文 • 上一篇    下一篇

基于关键用例获取的测试用例排序方法

范书平1, 万里2, 姚念民3, 张岩4, 马宝英5   

  1. 1.牡丹江师范学院计算机与信息技术学院,黑龙江 牡丹江 157012
    2.天津大学智能与计算学部,天津 300350
    3.大连理工大学计算机科学与技术学院,辽宁 大连 116024
    4.宿迁学院信息工程学院,江苏 宿迁 223800
    5.牡丹江医学院卫生管理学院,黑龙江 牡丹江 157011
  • 收稿日期:2020-11-17 修回日期:2021-02-24 出版日期:2022-01-25
    • 通讯作者:
    • 马宝英
    • 作者简介:
    • 范书平 男,1977年生,黑龙江牡丹江人.副教授,主要从事复杂软件的测试数据生成和进化计算方面的研究工作. E-mail:f8259@163.com
      万 里 男,1994年生,湖北荆州人.毕业于天津大学,主要从事软件测试、语音信号处理方面的研究工作.
      姚念民 男,1974年生,黑龙江大庆人.教授,主要从事基于搜索的软件工程方面的研究工作.
      张 岩 女,1972年生,辽宁本溪人.教授,CCF会员,主要从事基于搜索的软件工程、进化计算方面的研究工作.
      马宝英(通信作者) 女,1985年生,黑龙江鸡西人.讲师,主要从事复杂软件的测试数据生成方面的研究工作.
    • 基金资助:
    • 国家自然科学基金 (2018AAA0100300); 黑龙江省自然科学基金 (LH2021F055); 牡丹江市应用技术研究与开发计划 (HT2020JG049); 大连市科技创新项目 (2018J12GX045)

Test Case Sorting Method Based on Key Use Cases Extracted

FAN Shu-ping1, WAN Li2, YAO Nian-min3, ZHANG Yan4, MA Bao-ying5   

  1. 1.School of Computer and Information Technology, Mudanjiang Normal University, Mudanjiang, Heilongjiang 157012, China
    2.Department of Intelligence and Computing, Tianjin University, Tianjin 300350, China
    3.School of Computer Science and Technology, Dalian University of Technology, Dalian, Liaoning 116024, China
    4.School of Information Engineering, Suqian University, Suqian, Jiangshu 223800, China
    5.School of Health Management, Mudanjiang Medical University, Mudanjiang, Heilongjiang 157011, China
  • Received:2020-11-17 Revised:2021-02-24 Online:2022-01-25 Published:2022-01-25
    • Corresponding author:
    • MA Bao-ying
    • Supported by:
    • National Natural Science Foundation of China (2018AAA0100300); Natural Science Foundation of Heilongjiang Province, China (LH2021F055); Mudanjiang Applied Technology Research and Development Project (HT2020JG049); Dalian Science and Technology Innovation Project (2018J12GX045)

摘要:

测试用例排序技术通过在测试过程中确定用例执行的先后次序来增加早期揭示缺陷的可能性.本文在用例排序过程中动态提取关键用例,在测试用例运行被测程序后,得到各候选用例(待排序用例)覆盖程序新分支情况以及改善用例覆盖程序分支的均衡程度,进而计算候选用例的权重使得关键用例的权重增加,优先进行排序.实验结果表明,与现有方法比较,所提方法在用例排序时间与缺陷检测方面体现出较好的性能.

关键词: 回归测试, 测试用例排序, 用例偏离度, 缺陷检测, 分支覆盖

Abstract:

Test case sorting increases the possibility of early discovery of defects by determining the execution order of test cases in the testing process. In the paper, the key test cases are dynamically extracted during the test case sorting process. After test cases running the program under test, the candidate test cases (test cases to be sorted) covering the new branches of the program and improving the balance of test case covering program branches are obtained, and then the weight of the candidate test cases are calculated so that the weight of key test cases is increased, and prioritize them. Comparing with existing methods, experimental results show that the proposed method shows better performance in the time consumed and fault detection of test case sorting.

Key words: regression testing, test case sorting, use case deviation, fault detection, branches coverage

中图分类号: