计算机与现代化

• 软件工程 • 上一篇    下一篇

基于函数占用和需求分析测试代码用例自适应优先排序

  

  1. (1.南京航空航天大学计算机科学与技术学院,江苏 南京 210016; 2.南京大学计算机软件新技术国家重点实验室,江苏 南京 210093)
  • 收稿日期:2015-10-19 出版日期:2016-03-17 发布日期:2016-03-17
  • 作者简介:薛一帆(1991-),男,江苏泰兴人,南京航空航天大学计算机科学与技术学院硕士研究生,研究方向:软件测试,数据挖掘; 毛宇光(1962-),男,江苏南京人,副教授,研究方向:数据库系统及理论,数据挖掘与数据仓库,多值逻辑。
  • 基金资助:
    南京航空航天大学研究生创新基地开放基金资助项目(kfjj201460)

APRFODA: Adaptive Priority Ranking of Test Cases Based on Functional Occupancy and Demand Analysis

  1. (1. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China; 2. State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210093, China)
  • Received:2015-10-19 Online:2016-03-17 Published:2016-03-17

摘要: 在采用函数占用(覆盖)的测试代码用例优先级排序过程中,其特征一般是以函数占用代码率信息表示,容易忽视其他优先排序影响因素,对此提出基于函数占用和需求分析的测试代码用例自适应优先排序方式。首先,以测试代码用例优先级排序过程中的调用函数存在路径为参照,利用源代码信息变更影响,进行影响域的回归测试分析,并对测试代码用例集进行回归范围确定。其次,考虑测试代码用例优先级排序的需求影响因素,并确定其需求优先级评价指标,然后与调用函数源代码变更影响指标进行权重自适应融合,并设计基于函数占用和需求分析评价优先级的动态调整算法。最后,通过仿真对比显示,所提方法可提高缺陷检测正确率,降低测试成本。

关键词: 代码变更, 测试代码用例, 排序, 回归测试, 路径调用, 需求分析

Abstract: In the process of using the cover of the test case prioritization, the feature is usually expressed by the code coverage change information, and it is easy to ignore other factors. So an adaptive priority ranking of test cases based on functional occupancy and demand analysis is proposed. Firstly, it takes the reference to the call function in the process of test case prioritization, and uses the impact of the change of source code, then takes the regression testing analysis of the domain and the regression range of the test case set. Secondly, it considers the requirement of test case prioritization, and the requirement of the evaluation index is determined. Then, the weights are adaptively integrated with the call function source code change. Finally, by comparing the simulation results, the proposed method can improve the correct rate of defect detection and reduce the test cost.

Key words: code change, test case, sorting, regression testing, path call, requirement analysis

中图分类号: