• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2014, Vol. 36 ›› Issue (05): 891-899.

• 论文 • 上一篇    下一篇

基于测试结果调整语句出错概率方法

王蓁蓁   

  1. (1.金陵科技学院信息技术学院,江苏 南京 211169;2.江苏省信息分析工程实验室,江苏 南京 211169)
  • 收稿日期:2013-01-29 修回日期:2013-04-03 出版日期:2014-05-25 发布日期:2014-05-25
  • 基金资助:

    国家自然科学基金资助项目(61170071);金陵科技学院科研基金资助项目(jitn201305)

An approach of adjusting the probability
of error statements based on testing results         

WANG Zhenzhen   

  1. (1.School of Information Technology,Jinling Institute of Technology,Nanjing 211169;
    2.Information Analysis Engineering Laboratory of Jiangsu Province,Nanjing 211169,China)
  • Received:2013-01-29 Revised:2013-04-03 Online:2014-05-25 Published:2014-05-25

摘要:

运用测试集对程序错误语句定位的算法被统称为TBFL方法。目前通行的TBFL算法一般都没有利用测试员、程序员关于测试用例和程序的先验知识,致使这些“资源”白白浪费。随机TBFL就是一类新型TBFL方法,其精神就是在随机理论的框架下,把这些先验知识和实际测试活动结合起来,从而对程序错误语句更好地定位。随机TBFL算法可以看成是这种类型算法的一般“模式”,人们可以从这个一般的模式里开发出不同的算法。基于测试结果调整语句出错概率的方法就是将随机TBFL算法中关于程序、测试集的先验知识和具体测试活动分离开来,根据测试结果再先后注入人们对测试集和程序的先验知识,从而更好地定位错误语句。在一些实例上,通过把新算法和随机TBFL算法进行对比,发现新算法是可取的。提出了三个有关不同TBFL算法比较标准,从这三个标准考察,新算法在上述实例上也是良好的。

关键词: 软件测试, 错误定位, 先验知识, 随机方法

Abstract:

Approaches for fault localization based on test suites are now collectively called TBFL (Testing Based Fault Localization). However, current algorithms do not take advantage of the prior knowledge about test cases and program so that they waste these valuable "resources". Stochastic TBFL is a new kind of TBFL approach whose spirit is to combine the prior knowledge with actual testing activities under stochastic theory, so as to locate program faults. Stochastic TBFL may be regarded as a general pattern of this approach, from which people can develop various algorithms. We separate the prior knowledge about program and test suites from actual testing activities, and according to testing results we then add the prior knowledge. This new method is called adjusting the probability of error statements based on testing results. Comparison to stochastic TBFL and some instances shows that our improved approach is feasible. Moreover, the paper proposes three standards for comparing different TBFL approaches. And from the investigation of the three standards, results of our proposed approach are also good.
      

Key words: software test;fault localization;prior knowledge;random method