首页 | 本学科首页   官方微博 | 高级检索  
     

单元自动化测试中类的抽象内存模型研究
引用本文:杜婉莹,王雅文.单元自动化测试中类的抽象内存模型研究[J].计算机测量与控制,2022,30(2):84-94.
作者姓名:杜婉莹  王雅文
作者单位:北京邮电大学网络与交换技术国家重点实验室,北京100876
基金项目:国家自然科学基金(U1736110)
摘    要:由于面向对象程序具有多态性等复杂特性,在软件单元测试中仅凭静态分析难以判断指针和引用指向对象的具体类型,为了解决这一问题,对类的抽象内存模型进行研究,并提出类的操作语义模拟算法;在路径分析时,通过构建和更新抽象内存模型,从而对变量所属类的范围进行限定;对于单元测试,对基于输入域的随机测试进行优化,提出基于路径的随机测试方法,得到输入变量的类型集合;实验表明,类的抽象内存模型结合操作语义模拟算法能够有效提取出路径中类相关的约束,基于路径的随机测试方法比起基于输入域的随机测试方法能够明显提高测试效率。

关 键 词:面向对象  单元测试  抽象内存模型  符号表  静态分析  测试用例
收稿时间:2021/11/23 0:00:00
修稿时间:2021/12/21 0:00:00

Research on Abstract Memory Model of Classes in Automated Unit Testing
DU Wanying,WANG Yawen.Research on Abstract Memory Model of Classes in Automated Unit Testing[J].Computer Measurement & Control,2022,30(2):84-94.
Authors:DU Wanying  WANG Yawen
Affiliation:(State Key Laboratory of Networking and Switching Technology,Beijing University of Posts and Telecommunications,Beijing 100876,China)
Abstract:Due to the polymorphism and other complex characteristics of object-oriented programs, it is difficult to judge the specific types of objects pointed by pointers and references only by static analysis in software unit testing. In order to solve this problem, the abstract memory model of classes is studied, and an operation semantic simulation algorithm of classes is proposed. During path analysis, the scope of the class to which the variable belongs is limited by constructing and updating the abstract memory model. For unit testing, the random testing based on input domain is optimized, and a path based random testing method is proposed to obtain the type set of input variables. Experiments show that the abstract memory model of classes combined with the operation semantic simulation algorithm can effectively extract the constraints related to classes in the path, and the path based random test method can significantly improve the efficiency of testing compared with the input domain based random test method.
Keywords:object-oriented  unit testing  abstract memory model  symbol table  static analysis  test case
本文献已被 维普 万方数据 等数据库收录!
点击此处可从《计算机测量与控制》浏览原始摘要信息
点击此处可从《计算机测量与控制》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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