高级检索
李飞宇, 宫云战, 王雅文. 基于内存建模的复杂结构类型测试数据自动生成方法[J]. 计算机辅助设计与图形学学报, 2012, 24(2): 262-270.
引用本文: 李飞宇, 宫云战, 王雅文. 基于内存建模的复杂结构类型测试数据自动生成方法[J]. 计算机辅助设计与图形学学报, 2012, 24(2): 262-270.
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.
Citation: 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.

基于内存建模的复杂结构类型测试数据自动生成方法

Automatic Test Data Generation Method for Complex Structure Based on Memory Modeling

  • 摘要: 针对链表、树和图等这类复杂结构类型的测试数据自动生成问题,提出一种面向路径的基于内存建模的测试数据生成方法.采用一种将结构变量和数值变量分别建模的抽象内存模型,并利用此模型辅助符号执行被测路径;把路径执行过程中语句的语义操作映射到对抽象内存的操作,解决指针引起的别名问题,并且在抽象内存中精准地记录了路径的约束条件;最后通过约束求解得到测试数据.文中方法已应用于自主开发的自动单元测试系统———UATS,通过实验证明了该方法的可行性.

     

    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.

     

/

返回文章
返回