首页 | 官方网站   微博 | 高级检索  
     

基于内存建模的复杂结构类型测试数据自动生成方法
引用本文:李飞宇,宫云战,王雅文.基于内存建模的复杂结构类型测试数据自动生成方法[J].计算机辅助设计与图形学学报,2012,24(2):262-270.
作者姓名:李飞宇  宫云战  王雅文
作者单位:北京邮电大学网络与交换技术国家重点实验室 北京100876
基金项目:国家自然科学基金,国家"八六三"高技术研究发展计划
摘    要:针对链表、树和图等这类复杂结构类型的测试数据自动生成问题,提出一种面向路径的基于内存建模的测试数据生成方法.采用一种将结构变量和数值变量分别建模的抽象内存模型,并利用此模型辅助符号执行被测路径;把路径执行过程中语句的语义操作映射到对抽象内存的操作,解决指针引起的别名问题,并且在抽象内存中精准地记录了路径的约束条件;最后通过约束求解得到测试数据.文中方法已应用于自主开发的自动单元测试系统——UATS,通过实验证明了该方法的可行件.

关 键 词:路径测试数据生成  复杂结构类型  别名  符号执行  内存建模

Automatic Test Data Generation Method for Complex Structure Based on Memory Modeling
Li Feiyu , Gong Yunzhan , Wang Yawen.Automatic Test Data Generation Method for Complex Structure Based on Memory Modeling[J].Journal of Computer-Aided Design & Computer Graphics,2012,24(2):262-270.
Authors:Li Feiyu  Gong Yunzhan  Wang Yawen
Affiliation:(State Key Laboratory of Networking and Switch Technology,Beijing University of Posts and Telecommunications,Beijing 100876)
Abstract:Aiming at automatic test data generation for complex structure such as list,tree and map,this paper presents a path-oriented test data generation method based on memory modeling.An Abstract memory model which models structure variables and numerical variables separately is introduced to assist symbolic execution of the tested path.On symbolic execution of the path,the semantic operation of the statement is mapped to the operation of Abstract memory,in this process the alias problem caused by pointers is solved,and the constraints of the path are recorded exactly in the Abstract memory.Finally,test data is generated by constraint solving.The proposed method has been implemented in a self-developed automatic unit test tool called UATS.Experimental results prove that the method is feasible.
Keywords:path test data generation  complex structure  alias  symbolic execution  memory modeling
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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

京公网安备 11010802026262号