马春燕,李尚儒,王慧朝,张磊,张涛.敏感变量和感知机结合的测试预言生成方法.软件学报,2019,30(5):1450-1463 |
敏感变量和感知机结合的测试预言生成方法 |
Generation Method for Test Oracle Based on Sensitive Variables and Linear Perceptron |
投稿时间:2018-08-31 修订日期:2018-10-31 |
DOI:10.13328/j.cnki.jos.005720 |
中文关键词: 测试预言 线性感知机 敏感变量 测试用例 内存值 |
英文关键词:test oracle linear perceptron sensitive variables test cases memory value |
基金项目:国家自然科学基金(61103003);航天基金(2018KC160026);上海航天科技支撑计划(2017MC160014) |
|
摘要点击次数: 1235 |
全文下载次数: 794 |
中文摘要: |
测试预言生成技术是软件工程测试领域的研究热点之一.没有可以利用的历史测试用例是目前大部分测试预言生成技术的普遍假设,但是这种假设会使我们错过利用现有部分测试用例协助自动生成新测试用例预言的机会.在已知部分测试用例集的情况下,提出了基于敏感变量和线性感知机的新测试用例的测试预言自动生成方法.首先,收集已知测试用例执行的语句覆盖和不同断点处内存值集合作为训练集,计算与新测试用例执行覆盖信息高度相似的测试用例集;其次,计算各断点处表征成功或失败的敏感变量集;然后,应用线性感知机求解每个断点处成功或失败概率预测的门限值;在此基础上,给出新测试用例测试预言自动生成的方法,并对方法进行讨论;最后,采用7个程序的129个故障版本作为实验对象,对共计14 300个测试用例生成测试预言.实证评价表明,测试预言准确率平均达到96.2%.该成果可以形成测试用例集合构造的"滚雪球效应",不断迭代自动生成新测试用例的测试预言. |
英文摘要: |
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. |
HTML 下载PDF全文 查看/发表评论 下载PDF阅读器 |