首页 | 本学科首页   官方微博 | 高级检索  
     

敏感变量和感知机结合的测试预言生成方法
引用本文:马春燕,李尚儒,王慧朝,张磊,张涛.敏感变量和感知机结合的测试预言生成方法[J].软件学报,2019,30(5):1450-1463.
作者姓名:马春燕  李尚儒  王慧朝  张磊  张涛
作者单位:西北工业大学 软件与微电子学院, 陕西 西安 710072,西北工业大学 软件与微电子学院, 陕西 西安 710072,西北工业大学 软件与微电子学院, 陕西 西安 710072,西北工业大学 软件与微电子学院, 陕西 西安 710072,西北工业大学 软件与微电子学院, 陕西 西安 710072
基金项目:国家自然科学基金(61103003);航天基金(2018KC160026);上海航天科技支撑计划(2017MC160014)
摘    要:测试预言生成技术是软件工程测试领域的研究热点之一.没有可以利用的历史测试用例是目前大部分测试预言生成技术的普遍假设,但是这种假设会使我们错过利用现有部分测试用例协助自动生成新测试用例预言的机会.在已知部分测试用例集的情况下,提出了基于敏感变量和线性感知机的新测试用例的测试预言自动生成方法.首先,收集已知测试用例执行的语句覆盖和不同断点处内存值集合作为训练集,计算与新测试用例执行覆盖信息高度相似的测试用例集;其次,计算各断点处表征成功或失败的敏感变量集;然后,应用线性感知机求解每个断点处成功或失败概率预测的门限值;在此基础上,给出新测试用例测试预言自动生成的方法,并对方法进行讨论;最后,采用7个程序的129个故障版本作为实验对象,对共计14 300个测试用例生成测试预言.实证评价表明,测试预言准确率平均达到96.2%.该成果可以形成测试用例集合构造的"滚雪球效应",不断迭代自动生成新测试用例的测试预言.

关 键 词:测试预言  线性感知机  敏感变量  测试用例  内存值
收稿时间:2018/8/31 0:00:00
修稿时间:2018/10/31 0:00:00

Generation Method for Test Oracle Based on Sensitive Variables and Linear Perceptron
MA Chun-Yan,LI Shang-Ru,WANG Hui-Chao,ZHANG Lei and ZHANG Tao.Generation Method for Test Oracle Based on Sensitive Variables and Linear Perceptron[J].Journal of Software,2019,30(5):1450-1463.
Authors:MA Chun-Yan  LI Shang-Ru  WANG Hui-Chao  ZHANG Lei and ZHANG Tao
Affiliation:School of Software and Microelectronics, Northwestern Polytechnical University, Xi''an 710072, China,School of Software and Microelectronics, Northwestern Polytechnical University, Xi''an 710072, China,School of Software and Microelectronics, Northwestern Polytechnical University, Xi''an 710072, China,School of Software and Microelectronics, Northwestern Polytechnical University, Xi''an 710072, China and School of Software and Microelectronics, Northwestern Polytechnical University, Xi''an 710072, China
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.
Keywords:test oracle  linear perceptron  sensitive variables  test cases  memory value
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号