发明申请
US20060129880A1 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.
信息查询
0/0