单元自动化测试中类的抽象内存模型研究
DOI:
CSTR:
作者:
作者单位:

北京邮电大学网络与交换技术国家重点实验室

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金(U1736110)


Research on Abstract Memory Model of Classes in Automated Unit Testing
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    由于面向对象程序具有多态性等复杂特性,在软件单元测试中仅凭静态分析难以判断指针和引用指向对象的具体类型,为了解决这一问题,对类的抽象内存模型进行研究,并提出类的操作语义模拟算法。在路径分析时,通过构建和更新抽象内存模型,从而对变量所属类的范围进行限定。对于单元测试,对基于输入域的随机测试进行优化,提出基于路径的随机测试方法,得到输入变量的类型集合。实验表明,类的抽象内存模型结合操作语义模拟算法能够有效提取出路径中类相关的约束,基于路径的随机测试方法比起基于输入域的随机测试方法能够明显提高测试效率。

    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.

    参考文献
    相似文献
    引证文献
引用本文

杜婉莹,王雅文.单元自动化测试中类的抽象内存模型研究计算机测量与控制[J].,2022,30(2):84-94.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2021-11-23
  • 最后修改日期:2021-12-21
  • 录用日期:2021-12-31
  • 在线发布日期: 2022-02-22
  • 出版日期:
文章二维码