敏感变量和感知机结合的测试预言生成方法
作者:
作者单位:

作者简介:

马春燕(1978-),女,山东菏泽人,博士生,副教授,主要研究领域为软件工程,软件测试,故障定位,智能化软件开发;张磊(1994-),男,硕士生,主要研究领域为软件工程,软件测试,故障定位,智能化软件开发;李尚儒(1995-),男,硕士生,主要研究领域为软件工程,软件测试,故障定位,智能化软件开发;张涛(1976-),男,博士生,副教授,主要研究领域为软件工程,软件测试,故障定位,智能化软件开发;王慧朝(1992-),男,硕士生,主要研究领域为软件工程,软件测试,故障定位,智能化软件开发.

通讯作者:

马春燕,E-mail:machunyan@nwpu.edu.cn

中图分类号:

基金项目:

国家自然科学基金(61103003);航天基金(2018KC160026);上海航天科技支撑计划(2017MC160014)


Generation Method for Test Oracle Based on Sensitive Variables and Linear Perceptron
Author:
Affiliation:

Fund Project:

National Natural Science Foundation of China (61103003); Aerospace Fund (2018KC160026); Shanghai Aerospace Science and Technology Support Program (2017MC160014)

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    测试预言生成技术是软件工程测试领域的研究热点之一.没有可以利用的历史测试用例是目前大部分测试预言生成技术的普遍假设,但是这种假设会使我们错过利用现有部分测试用例协助自动生成新测试用例预言的机会.在已知部分测试用例集的情况下,提出了基于敏感变量和线性感知机的新测试用例的测试预言自动生成方法.首先,收集已知测试用例执行的语句覆盖和不同断点处内存值集合作为训练集,计算与新测试用例执行覆盖信息高度相似的测试用例集;其次,计算各断点处表征成功或失败的敏感变量集;然后,应用线性感知机求解每个断点处成功或失败概率预测的门限值;在此基础上,给出新测试用例测试预言自动生成的方法,并对方法进行讨论;最后,采用7个程序的129个故障版本作为实验对象,对共计14 300个测试用例生成测试预言.实证评价表明,测试预言准确率平均达到96.2%.该成果可以形成测试用例集合构造的"滚雪球效应",不断迭代自动生成新测试用例的测试预言.

    Abstract:

    Test oracle generation technology is one of the hotspots in the testing field of software engineering. There are no historical test case sets available, which are common assumptions about existing test oracle generation techniques. However, this assumption may not always hold, and where it does not, there may be a missed opportunity; perhaps the pre-existing test cases could be used to assist the automated oracle generation of new test cases. In the case of the existing test case set, an automatic test oracle generation method for a new test case based on sensitive variables and linear perceptrons is proposed. Firstly, the statement coverage and memory value set executed by some known test cases are collected, and a set of test cases with high similarity to the execution coverage information of the new test case is computed. Secondly, the memory sensitive variable set solving algorithm of the program at a given breakpoint is given. Thirdly, the known test case set as the training set and the perceptron is used to solve the threshold value at each breakpoint. And on this base an automatic oracle generation method of the new test case is proposed. Finally, 129 fault versions of seven programs are used as experimental objects to generate test oracles of 14 300 new test cases. The empirical evaluation shows that the generated test oracle can achieve 96.2% accuracy on average. The results of the research can form the "snowball effect" of the test case set construction, and iteratively automatically generate test oracles for new test cases.

    参考文献
    相似文献
    引证文献
引用本文

马春燕,李尚儒,王慧朝,张磊,张涛.敏感变量和感知机结合的测试预言生成方法.软件学报,2019,30(5):1450-1463

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2018-08-31
  • 最后修改日期:2018-10-31
  • 录用日期:
  • 在线发布日期: 2019-05-08
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号