首页> 外国专利> Resilient mock object creation for unit testing

Resilient mock object creation for unit testing

机译:弹性模拟对象创建,用于单元测试

摘要

Embodiments of the invention provide for fault alerting in mock object supported unit testing. In a method for fault alerting in mock object supported unit testing an instance a mock object proxying for an object under test by test code is created in memory of a computing system and an invocation of a method in the object under test is proxied by method name to the mock object. Then, it is determined whether or not a method exists in memory for the mock object corresponding to the method name. Finally, an exception handler is invoked for the mock object outputting error text indicating a non-presence of a method associated with the method name responsive to a method by the method name not existing in the memory for the mock object, but otherwise a method is invoked that exists in the memory of the mock object corresponding to the method name.
机译:本发明的实施例提供了在模拟对象支持的单元测试中的故障警报。在模拟对象支持的单元测试中的故障警报方法中,在计算系统的内存中创建了一个模拟对象,该对象通过测试代码代替了要测试的对象,并在计算系统的内存中创建了方法,并在测试对象中调用了方法名称。到模拟对象。然后,确定在存储器中是否存在与方法名称相对应的模拟对象的方法。最后,为模拟对象调用一个异常处理程序,以输出错误文本,该错误文本指示由于该模拟对象的内存中不存在该方法名称而导致与该方法名称相关联的方法不存在,从而对该方法作出响应。调用了存在于与方法名称相对应的模拟对象的内存中的对象。

著录项

  • 公开/公告号US9779014B2

    专利类型

  • 公开/公告日2017-10-03

    原文格式PDF

  • 申请/专利权人 INTERNATIONAL BUSINESS MACHINES CORPORATION;

    申请/专利号US201514816867

  • 发明设计人 TIMOTHY J. BALDWIN;

    申请日2015-08-03

  • 分类号G06F9/44;G06F11/36;

  • 国家 US

  • 入库时间 2022-08-21 13:44:39

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号