摘要
基于覆盖的优先级排序技术通常以代码覆盖信息作为测试用例的特征加以度量,忽略了其他优先级的影响因素,缺乏全面性和动态性。针对该问题,提出基于函数调用路径的测试用例优先级排序方法。以函数调用路径为基础,通过对源代码新旧版本的对比,分析回归测试影响域,确定回归测试用例集的范围。将测试用例函数调用路径覆盖能力、单元测试时函数中检测出缺陷的个数,以及函数的扇入系数等影响因素应用于优先级排序,确定测试用例优先级量化方法,并在测试执行过程中,通过调整算法实现优先级的动态调整,优化优先级排序。实验结果表明,优先级量化方法能提高测试的缺陷检测率,发现程序中的缺陷,降低测试成本。
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.
出处
《计算机工程》
CAS
CSCD
2014年第7期242-246,253,共6页
Computer Engineering
基金
国家自然科学基金资助项目(61271304)
北京市学科与研究生教育基金资助项目(PXM2013_014224_000041)
关键词
优先级排序
函数调用路径
回归测试
测试用例
扇入系数
缺陷检测率
prioritization
function calling path
regression test
test case
fan-in coefficient
fault detection rate