摘要
运用测试集对程序错误语句定位的算法被统称为TBFL(Testing Based Fault Localization)方法。目前通用算法一般都没有利用测试员、程序员关于测试用例和程序的先验知识,致使这些“资源”被浪费。随机TBFL方法是一类新型TBFL方法,其精神就是在随机理论的框架下,把这些先验知识(抽象为先验分布)和实际测试活动结合起来,从而更好地定位程序错误语句。事实上,随机TBFL算法可以看成这类算法的一般“模式”,人们可以从这个一般框架里开发出不同的算法。文中方法就是将随机TBFL算法加以简化得到的,主要是从各个测试用例的具体测试活动着手,对程序变量X的先验概率加以校正,如果测试集里有n个用例,便可以得到程序变量X的n个校正值,将n个校正值效应迭加,并且标准化,即得到程序变量X的后验概率,用它作为寻找错误语句的向导。由于提出的简化算法是借助一个校正因子矩阵而得到的,因此所提算法被称为基于校正因子的随机TBFL方法。文中还提出了3个有关不同TBFL算法的比较标准,并依据它们在一些具体实例上的表现证实所提算法的有效性。
Approaches for fault localization based on test suites are now collectively called TBFL(Testing Based Fault Localization).However,current algorithms have not taken advantages of the prior knowledge about test cases and program,so that they waste these valuable“resources”.Literature[12]introduced a new kind of stochastic TBFL approach whose spirit is to combine the prior knowledge with actual testing activities under stochastic theory,so as to locate program faults.This algorithm may be regarded as a general pattern of this kind of approach,from which people can deve-lop various algorithms.The approach presented in this paper was simplifying the TBFL algorithm.It mainly revises the prior probability of program variable X from separate testing activity of each test case.If there are n test cases,n calibration factors can be obtained.These n calibration factors are then added and standardized,finally the posterior probability of the program is obtained.The approach proposed in this paper is called stochastic TBFL approach just because it depends on a calibration factor matrix.This paper presented three standards for comparing different TBFL approaches.Based on these standards,the improved approach is feasible for some instances.
作者
王蓁蓁
刘嘉
WANG Zhen-zhen;LIU Jia(School of Software Engineering,Jinling Institute of Technology,Nanjing 211169,China;Software Testing Engineering Laboratory of Jiangsu Province,Nanjing 211169,China;(State Key Laboratory of Novel Software Technology,Nanjing University,Nanjing 210093,China)
出处
《计算机科学》
CSCD
北大核心
2019年第11期161-167,共7页
Computer Science
基金
国家自然科学基金项目(61772014)资助
关键词
错误定位
软件测试
随机错误定位方法
校正因子
Fault localization
Software test
Stochastic testing based fault localization
Calibration factor