节点文献

基于漏洞约束求解的测试用例生成方法研究

Research on Test Case Generation Based on Vulnerability Constraint Solving

【作者】 王辉

【导师】 江胜;

【作者基本信息】 华中科技大学 , 计算机软件与理论, 2015, 硕士

【摘要】 软件测试能够检测软件中的错误并保障软件质量,是软件开发周期中最重要的环节之一。随着软件规模的不断扩大,软件测试中的各项费用也不断增加。软件测试自动化是减少测试时间与费用的重要途径,而自动化软件测试的质量高度依赖于测试用例的自动生成。因此,测试用例生成在软件测试过程中扮演着至关重要的角色,是软件测试领域一个重要的研究方向。基于漏洞约束求解的测试用例生成方法是一种面向路径的测试用例生成方法。该方法建立在符号执行技术的基础上,主要分为两个部分,一个是基于程序中间表示的符号执行系统的建立,另一个是基于漏洞类型的漏洞约束构建。具体来说,首先对源代码进行静态分析依次得到程序的中间表示、依赖关系图以及漏洞报告等相关信息;接着符号执行系统在程序中间表示的基础上对相关路径上的语句进行符号替换和路径约束收集,同时,对漏洞报告进行分析得出漏洞类型进而构建漏洞约束;最后对收集到的路径约束集合以及漏洞约束进行合并求解继而生成测试用例。基于漏洞约束求解的测试用例生成方法生成的测试用例不仅能够满足覆盖相关路径的要求,同时,该方法生成的测试用例具有针对漏洞特性的较强检错能力。实验结果表明,基于漏洞约束求解的测试用例生成方法在实际测试中能有效的生成测试用例,并且生成的测试用例具有较强的检错能力。

【Abstract】 Software testing detects faults in software and ensures software quality,it is one of the most important phases in development of software. With the continuous expansion of software size, the cost is also increasing. Automation Software testing is an important way to reduce testing time and costs. Meanwhile, software testing is highly dependent upon faults detection ability of test cases.Therefore,test case generation plays a vital role in testing process and is main area of research in the field of software testing.Test case generation based on vulnerability constraint solve is one of Path-oriented method for test case generation.The method based on symbolic execution and divided into two parts,one is the establishment of symbolic execution system based on intermediate representation,and the other is adaptive vulnerability constraint build based on vulnerability type. Specifically, first of all static analysis of source code in order to obtain an intermediate representation of the program, the dependency graph and bug report and other related information; Then the system execute symbol substitution and path constraint collection on the related path statements on the basis of the program intermediate representation, at the same time,analyze the bug report concluded that vulnerability type and then build vulnerability constraints; Finally,merge path constraints and vulnerability constraints together and solve it, then test cases generated. The method of test case generation based on vulnerability constraint solve not only able to meet the requirements of the related path coverage, while the method generates test cases with strong error detection capability for vulnerability characteristics.Experimental results show that the test case generation method based on vulnerability constraint solve in the actual test can effectively generate test cases and generates test cases with strong error detection capabilities.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络