首页> 外国专利> Method and system for injecting faults into a software application

Method and system for injecting faults into a software application

机译:将故障注入软件应用程序的方法和系统

摘要

A method for testing a software application (225), for example, written in the Java language is proposed. For this purpose, a factory object (230c) can be configured to operate in a production mode or in a test mode. In the test mode, the factory object instantiates a proxy object (255) for each object (235, 240) of the application. In this way, the invocation of each method exposed by any object of the application is intercepted by the corresponding proxy object. The proxy object invokes a specific method on a fault generator object (265), which provides a return code that can simulate desired error conditions (for example, according to a predefined probability). The proxy object then forwards the invocation to the actual object or returns the error code received from the fault generator object. Alternatively, the same result can be achieved by configuring a class loader to operate in the test mode (when necessary); in this case, the class loader updates the definition of the methods of each class directly so as to invoke the method exposed by the fault generator object.
机译:提出了一种用于测试例如以Java语言编写的软件应用程序( 225 )的方法。为此,可以将工厂对象( 230 c )配置为以生产模式或测试模式运行。在测试模式下,工厂对象为应用程序的每个对象( 235、240 )实例化代理对象( 255 )。这样,由应用程序的任何对象公开的每个方法的调用都会被相应的代理对象拦截。代理对象调用故障生成器对象( 265 )上的特定方法,该对象提供可以模拟所需错误条件(例如,根据预定义的概率)的返回代码。然后,代理对象将调用转发到实际对象,或者返回从故障生成器对象接收到的错误代码。另外,可以通过将类加载器配置为以测试模式运行(必要时)来获得相同的结果。在这种情况下,类加载器直接更新每个类的方法的定义,以调用故障生成器对象公开的方法。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号