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

计算机工程

• 开发研究与工程应用 • 上一篇    下一篇

基于函数调用路径的测试用例优先级排序

牟永敏,李慧丽   

  1. (北京信息科技大学计算机学院,北京 100101)
  • 收稿日期:2013-07-09 出版日期:2014-07-15 发布日期:2014-07-14
  • 作者简介:牟永敏(1961-),男,教授,主研方向:软件测试;李慧丽,硕士。
  • 基金资助:
    国家自然科学基金资助项目(61271304);北京市学科与研究生教育基金资助项目(PXM2013_014224_000041)。

Test Case Prioritization Based on Function Calling Paths

MU Yong-min, LI Hui-li   

  1. (School of Computer, Beijing Information Science & Technology University, Beijing 100101, China)
  • Received:2013-07-09 Online:2014-07-15 Published:2014-07-14

摘要: 基于覆盖的优先级排序技术通常以代码覆盖信息作为测试用例的特征加以度量,忽略了其他优先级的影响因素,缺乏全面性和动态性。针对该问题,提出基于函数调用路径的测试用例优先级排序方法。以函数调用路径为基础,通过对源代码新旧版本的对比,分析回归测试影响域,确定回归测试用例集的范围。将测试用例函数调用路径覆盖能力、单元测试时函数中检测出缺陷的个数,以及函数的扇入系数等影响因素应用于优先级排序,确定测试用例优先级量化方法,并在测试执行过程中,通过调整算法实现优先级的动态调整,优化优先级排序。实验结果表明,优先级量化方法能提高测试的缺陷检测率,发现程序中的缺陷,降低测试成本。

关键词: 优先级排序, 函数调用路径, 回归测试, 测试用例, 扇入系数, 缺陷检测率

Abstract: The test case prioritization based on coverage usually uses the code coverage as the measurement of the test case. In this way, however, the other factors are ignored which leads to incomprehensiveness, and it is lack of dynamics. According to the two problems, this paper proposes a prioritizing method based on the function calling paths. According to the analysis of the influencing area of regression testing by comparing the new and old versions based on the function calling paths, it can get the scope of the test case. Combining the coverage of the function calling paths in the test case, the count of the defects in unit test and the function fan-in coefficient as influence factors, it applies the influence factor to prioritization, and ensures the quantization method of test case prioritization. During the test, it realizes dynamic adjusting of priority by adjust the algorithm to optimize the prioritization. The experiment shows that the method of priority quantization can promote the fault detection rate of test significantly in order to detect the faults in software as soon as possible, and reduce the cost of testing.

Key words: prioritization, function calling path, regression test, test case, fan-in coefficient, fault detection rate

中图分类号: