当前位置:主页 > 科技论文 > 软件论文 >

基于区间运算的测试用例生成加速技术研究

发布时间:2019-06-04 13:04
【摘要】:软件测试是保证软件质量的重要方法。单元测试是对被测程序最小单元或模块进行的测试,通常分为测试用例生成、测试用例执行和测试结果统计三个阶段,其中生成测试用例通常由测试人员手动完成。由于单元测试的巨大工作量及其高重复性,因而需要投入大量的人力和时间。单元测试的自动化测试,尤其是测试用例自动生成技术的发展在一定程度上解决了手动测试效率低和失误率高的问题,推动了软件测试的发展,成为软件测试领域的研究热点。在面向路径的单元测试中,目标路径上的约束集合求解问题是测试用例自动生成问题的一个难点。由于被测约束系统的复杂性以及求解算法的约束性,测试用例自动生成的效率以及生成用例的正确率往往不高。本文围绕提高单元测试中的测试用例自动生成效率问题,在分支限界测试用例框架和区间运算的基础上提出了基于语义分析和区间运算的库函数约束求解策略,用以求解目标路径中库函数约束;基于迭代技术和区间运算的区间一致性判定策略,用以消除路径中约束的处理顺序对区间运算结果的影响,同时削减变量区间;基于变量相关性的跳跃式回溯策略用以避免不必要的回溯和回退过程,减少区间运算次数;约束变换策略将待测路径中的一些非四则运算转换成区间运算可以处理的四则运算形式,通过辅助变量赋值加速求解目标路径上的约束集合。作者在代码测试系统(CodeTest System,CTS)中编码实现了上述四种策略,并通过相关实验来检测这些策略在加速测试用例自动生成方面的有效性。实验结果表明本文提出的策略对于减少测试用例自动生成的时间,提高测试用例自动生成的效率有明显的作用。
[Abstract]:Software testing is an important method to ensure software quality. Unit test is the test of the smallest unit or module of the program under test, which is usually divided into three stages: test case generation, test case execution and test result statistics, in which the test case generation is usually done manually by the tester. Due to the huge workload and high repeatability of unit testing, a lot of manpower and time need to be invested. The automatic testing of unit testing, especially the development of automatic test case generation technology, solves the problems of low efficiency and high error rate of manual testing to a certain extent, promotes the development of software testing, and becomes the research focus in the field of software testing. In path-oriented unit testing, the problem of solving constraint sets on the target path is a difficult point in the automatic generation of test cases. Because of the complexity of the constraint system under test and the constraint of the algorithm, the efficiency of automatic generation of test cases and the correct rate of generating use cases are often not high. In this paper, aiming at improving the efficiency of automatic test case generation in unit testing, a library function constraint solving strategy based on semantic analysis and interval operation is proposed on the basis of branch bound test case framework and interval operation. It is used to solve the library function constraint in the target path. The interval consistency decision strategy based on iterative technique and interval operation is used to eliminate the influence of the processing order of constraints in the path on the results of interval operation and to reduce the interval of variables at the same time. The jump backtracking strategy based on variable correlation is used to avoid unnecessary backtracking and backward process and reduce the number of interval operations. The constraint transformation strategy converts some non-four operations in the path to be measured into four forms that can be processed by interval operation, and accelerates the solution of the constraint set on the target path by auxiliary variable assignment. The author encodes the above four strategies in the code test system (CodeTest System,CTS), and tests the effectiveness of these strategies in accelerating the automatic generation of test cases through related experiments. The experimental results show that the strategy proposed in this paper plays an obvious role in reducing the time of automatic test case generation and improving the efficiency of test case automatic generation.
【学位授予单位】:北京邮电大学
【学位级别】:硕士
【学位授予年份】:2016
【分类号】:TP311.53

【参考文献】

相关期刊论文 前9条

1 潘烁;王曙燕;王欢;;基于改进粒子群算法的组合测试数据生成[J];西安邮电学院学报;2012年03期

2 王林;尤枫;赵瑞莲;;基于改进遗传算法的面向路径测试数据生成[J];计算机工程;2012年04期

3 曾凡平;袁园;潘能刚;邓超强;;不变量指导的随机测试用例生成[J];小型微型计算机系统;2011年11期

4 王雅文;宫云战;肖庆;杨朝红;;基于抽象解释的变量值范围分析及应用[J];电子学报;2011年02期

5 王雅文;宫云战;肖庆;杨朝红;;扩展区间运算的变量值范围分析技术[J];北京邮电大学学报;2009年03期

6 王雅文;宫云战;杨朝红;;软件测试工具综述[J];北京化工大学学报(自然科学版);2007年S1期

7 薛云志;陈伟;王永吉;赵琛;王青;;一种基于Messy GA的结构测试数据自动生成方法[J];软件学报;2006年08期

8 李福川,宋晓秋;软件测试中的新方法——区间代数方法[J];计算机工程与设计;2005年10期

9 汪西原,汪西莉;启发式搜索策略(爬山法)的改进与实现[J];陕西师范大学学报(自然科学版);1999年01期

相关会议论文 前1条

1 曾勇军;王清贤;奚琪;;基于抽象区间域的数组边界检查技术[A];计算机研究新进展(2010)——河南省计算机学会2010年学术年会论文集[C];2010年

相关博士学位论文 前1条

1 邢颖;测试用例自动生成的分支限界算法及实验研究[D];北京邮电大学;2014年

相关硕士学位论文 前1条

1 郭劲松;约束满足问题(CSP)的求解技术研究[D];吉林大学;2013年



本文编号:2492746

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/2492746.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户f27cd***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com