计算机科学 ›› 2019, Vol. 46 ›› Issue (11): 161-167.doi: 10.11896/jsjkx.191100503C

• 软件与数据库技术 • 上一篇    下一篇

基于校正因子的随机TBFL方法

王蓁蓁1,2, 刘嘉3   

  1. (金陵科技学院软件工程学院 南京211169)1
    (江苏省软件测试工程实验室 南京211169)2
    (南京大学计算机软件新技术国家重点实验室 南京210093)3
  • 收稿日期:2018-10-16 出版日期:2019-11-15 发布日期:2019-11-14
  • 通讯作者: 王蓁蓁(1975-),女,博士,副教授,CCF会员,主要研究方向为软件测试、人工智能,E-mail:wangzhenzhen@seu.edu.cn
  • 作者简介:刘嘉(1976-),男,博士,副教授,主要研究方向为软件测试,E-mail:liujia@nju.edu.cn。
  • 基金资助:
    本文受国家自然科学基金项目(61772014)资助。

Stochastic TBFL Approach Based on Calibration Factor

WANG Zhen-zhen1,2, LIU Jia3   

  1. (School of Software Engineering,Jinling Institute of Technology,Nanjing211169,China)1
    (Software Testing Engineering Laboratory of Jiangsu Province,Nanjing 211169,China)2
    (State Key Laboratory of Novel Software Technology,Nanjing University,Nanjing 210093,China)3
  • Received:2018-10-16 Online:2019-11-15 Published:2019-11-14

摘要: 运用测试集对程序错误语句定位的算法被统称为TBFL(Testing Based Fault Localization)方法。目前通用算法一般都没有利用测试员、程序员关于测试用例和程序的先验知识,致使这些“资源”被浪费。随机TBFL方法是一类新型TBFL方法,其精神就是在随机理论的框架下,把这些先验知识(抽象为先验分布)和实际测试活动结合起来,从而更好地定位程序错误语句。事实上,随机TBFL算法可以看成这类算法的一般“模式”,人们可以从这个一般框架里开发出不同的算法。文中方法就是将随机TBFL算法加以简化得到的,主要是从各个测试用例的具体测试活动着手,对程序变量X的先验概率加以校正,如果测试集里有n个用例,便可以得到程序变量Xn个校正值,将n个校正值效应迭加,并且标准化,即得到程序变量X的后验概率,用它作为寻找错误语句的向导。由于提出的简化算法是借助一个校正因子矩阵而得到的,因此所提算法被称为基于校正因子的随机TBFL方法。文中还提出了3个有关不同TBFL算法的比较标准,并依据它们在一些具体实例上的表现证实所提算法的有效性。

关键词: 错误定位, 软件测试, 随机错误定位方法, 校正因子

Abstract: 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.

Key words: Calibration factor, Fault localization, Software test, Stochastic testing based fault localization

中图分类号: 

  • TP311
[1]AGRAWAL H,HORGAN J R,LONDON S,et al.Fault Localization Using Execution Slices and Dataflow Tests[C]∥IEEE International Symposium on Software Reliability Engineering.1995:143-151.
[2]CLEVE H,ZELLER A.Locating Causes of Program FailuresC]∥Proceedings of the 27th International Conference on Software Engineering.2005:342-351.
[3]HAO D,ZHANG L,PAN Y,et al.On Similarity-awareness inTesting-based Fault Localization [J].Automated Software Engineering,2008,15(2):207-249.
[4]KYRIAZIS A,MATHIOUDAKIS K.Enhance of Fault Localization Using Probabilistic Fusion with Gas Path Analysis Algorithms [J].Journal of Engineering for Gas Turbines and Power,2009,131(131):239-247.
[5]JONES J A,HARROLD M J,STASKO J.Visualization of Test Information to Assist Fault Localization[C]∥Proceeding of the 24th International Conference on Software Engineering.2002:467-477.
[6]JONES J A, HARROLD M J.Empirical Evaluation of the Tarantula Automatic Fault-localization Technique[C]∥Procee-dings of the 20th IEEE/ACM International Conference on Automated Software Engineering.2005:273-282.
[7]LIBLIT B,NAIK M,ZHENG A X,et al.Scalable Statistical Bug Isolation[C]∥Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).2005:15-16.
[8]LEI Y,MAO X G,CHEN T Y,et al.Slice-Based StatisticalFault Localization [J].Journal of Systems & Software,2014,89(2):51-62.
[9]LIU C,YAN X,FEI L,et al.SOBER:Statistical Model-basedBug Localization[C]∥Proceedings of the 13the ACM SIGSOFT Symposium on Foundations of Software Engineering.2005:286-295.
[10]RENIERIS M,REISS S P.Fault Localization with NearestNeighbor Queries[C]∥Proceedings of the 18th International Conference on Automated Software Engineering.2003:30-39.
[11]ZELLER A.Isolating Cause-effect Chains from Computer Programs[C]∥Proceedings of the 10th ACM SIGFOFT Sympo-sium on Foundations of Software Engineering.2002:1-10.
[12]WANG Z Z,XU B W,ZHOU Y M,et al.New Random Testing-based Fault Localization Approach [J].Computer Science,2013,40(1):5-14.
[13]SINGH P K,GARG S,KAUR M,et al.Fault Localization in Software Testing Using Soft Computing Approaches [C]∥2017 4th International Conference on Signal Processing,Computing and Control (ISPCC).Solan,2017:627-631.
[14]WONG W E,GAO R,LI Y,et al.A Survey on Software Fault Localization [J].IEEE Transactions on Software Engineering,2016,42(8):707-740.
[15]WONG W E,DEBROY V,GAO R,et al.The Dstar Method for Effective Software Fault Localization [J].IEEE Transaction on Reliability,2014,63(1):290-308.
[16]STEIMANN F,FRENKEL M,ABREU R.Threats to the Validity and Value of Empirical Assessments of the Accuracy of Coverage-based Fault Locators[C]∥Proceeding of the 2013 Int’1 Symposium on Software Testing and Analysis.ACM Press,2013:314-324.
[17]ALEXANDRE P,RUI A,ANDRE R.A Dynamic Code Coverage Approach to Maximize Fault Localization Efficiency [J].The Journal of Systmes & Software,2014,90:18-28.
[18]王健吾.数学思维方法引论[M].合肥:安徽教育出版社,1996.
[19]WANG Z Z.Construction of Knowledge Database and NaïveReasoning of Naïve Fuzzy Description Logic [J].Applied Science and Technology,2012,39(6):18-29.
[1] 张慧.
基于程序变异和高斯混合聚类的错误定位技术
Fault Localization Technology Based on Program Mutation and Gaussian Mixture Model
计算机科学, 2021, 48(6A): 572-574. https://doi.org/10.11896/jsjkx.200500121
[2] 文进, 张星宇, 沙朝锋, 刘艳君.
基于次模函数最大化的测试用例集约简
Test Suite Reduction via Submodular Function Maximization
计算机科学, 2021, 48(12): 75-84. https://doi.org/10.11896/jsjkx.210300086
[3] 滕俊元, 高猛, 郑小萌, 江云松.
噪声可容忍的软件缺陷预测特征选择方法
Noise Tolerable Feature Selection Method for Software Defect Prediction
计算机科学, 2021, 48(12): 131-139. https://doi.org/10.11896/jsjkx.201000168
[4] 张慧.
基于深度卷积网络的多错误定位方法
Multiple Fault Localization Method Based on Deep Convolutional Network
计算机科学, 2021, 48(11A): 88-92. https://doi.org/10.11896/jsjkx.210200096
[5] 孙昌爱, 张守峰, 朱维忠.
一种基于变异分析的BPEL程序故障定位技术
Mutation Based Fault Localization Technique for BPEL Programs
计算机科学, 2021, 48(1): 301-307. https://doi.org/10.11896/jsjkx.200900051
[6] 夏春艳, 王兴亚, 张岩.
基于多目标优化的测试用例优先级排序方法
Test Case Prioritization Based on Multi-objective Optimization
计算机科学, 2020, 47(6): 38-43. https://doi.org/10.11896/jsjkx.191100113
[7] 薄莉莉, 姜淑娟, 张艳梅, 王兴亚, 于巧.
并发缺陷检测技术研究进展
Research Progress on Techniques for Concurrency Bug Detection
计算机科学, 2019, 46(5): 13-20. https://doi.org/10.11896/j.issn.1002-137X.2019.05.002
[8] 李志博,李清宝,于磊,侯雪梅.
基于划分的自适应随机测试综述
Survey on Adaptive Random Testing by Partitioning
计算机科学, 2019, 46(3): 19-29. https://doi.org/10.11896/j.issn.1002-137X.2019.03.003
[9] 包晓安, 熊子健, 张唯, 吴彪, 张娜.
一种基于改进遗传算法的路径测试用例生成方法
Approach for Path-oriented Test Cases Generation Based on Improved Genetic Algorithm
计算机科学, 2018, 45(8): 174-178. https://doi.org/10.11896/j.issn.1002-137X.2018.08.031
[10] 张兴隆,于磊,侯雪梅,侯韶凡.
面向对象程序蜕变关系构造方法
Method of Metamorphic Relations Constructing for Object-oriented Software Testing
计算机科学, 2017, 44(Z11): 485-489. https://doi.org/10.11896/j.issn.1002-137X.2017.11A.103
[11] 高雪笛,周丽娟,张树东,柳昊明.
基于改进遗传算法的测试数据自动生成的研究
Research on Test Data Automatic Generation Based on Improved Genetic Algorithm
计算机科学, 2017, 44(3): 209-214. https://doi.org/10.11896/j.issn.1002-137X.2017.03.044
[12] 陈诚,郑征,王皓钦,乔禹.
基于测试充分性准则的非死锁并发缺陷定位方法
Non-deadlock Concurrency Fault Localization Approach Based on Adequate Test Criteria
计算机科学, 2017, 44(11): 195-201. https://doi.org/10.11896/j.issn.1002-137X.2017.11.030
[13] 王林鑫,王微微,赵瑞莲,李征.
面向语句的MBFL变异体约减策略
MBFL with Statement-oriented Mutant Reduction Strategy
计算机科学, 2017, 44(11): 175-180. https://doi.org/10.11896/j.issn.1002-137X.2017.11.026
[14] 蒲进兴,李登辉,李征,赵瑞莲.
基于动态相似度的错误定位优先排序方法
Dynamic Similarity Based Fault Localization Prioritization
计算机科学, 2016, 43(3): 206-212. https://doi.org/10.11896/j.issn.1002-137X.2016.03.038
[15] 刘梦冷,杨小双,赵磊,王丽娜.
面向软件错误定位与理解的测试执行离散特征筛选
Discrete Characteristic-based Test Execution Selection for Software Fault Localization and Understanding
计算机科学, 2016, 43(3): 179-187. https://doi.org/10.11896/j.issn.1002-137X.2016.03.034
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!