摘要
介绍了一种基于程序行为切片的测试用例生成系统的实现方案,系统在不扫描全部程序路径的情况下,生成可以覆盖全部程序行为的测试用例集。系统分为静态分析、动态符号执行以及测试用例生成3个模块。在静态分析模块中根据输入的程序代码分析程序的控制流和信息流,提取程序的控制依赖和数据依赖,并计算程序的潜在依赖;动态符号执行模块求解约束条件、生成测试用例和分析代码执行过程;测试用例生成模块根据执行路径和依赖关系计算被路径覆盖的程序行为切片和未被覆盖的程序行为切片,然后根据未被覆盖的程序行为切片,引导符号执行生成能覆盖新的程序行为切片的测试用例。实验证明,本系统生成的测试用例集可以保证覆盖所有的程序行为,同时能显著减少生成的测试用例数量。
A program slicing-guided test case generation system was introduced in this paper, which could generate the set of test case covering all program behavior without scanning all paths of the program. It consists of three modules: the static analysis,dynamic symbolic execution and test case generation. In the static analysis module, the control flow and information flow of input program are analyzed to extract the control dependency and data dependency, and the potential dependency is also computed. The dynamic symbol execution module is applied to solve the constraints, generate test case and monitor the execution path. In the test case generation module, the covered and uncovered program slices of the execution test scase are computed to guide the new test case generation. In the experiments, the test case set gen erated by our system, can cover all program behaviors and significantly reduce the number of test cases.
出处
《计算机科学》
CSCD
北大核心
2014年第9期71-74,共4页
Computer Science
基金
国家自然科学基金(91118005
91218301
61221063
61203174
61202392)
国家科技支撑计划(2011BAK 08B02)
教育部博士点基金(20110201120010)
中央高校基本科研业务费专项资金资助
关键词
软件测试
测试用例集生成
动态符号执行
程序切片
Software testing
Test case set generation
Dynamic symbolic execution
Program slicing