Framework for a software error inject tool
AssigneeInternational Business Machines Corporation
InventorCheng-Chung Song
Life of this patent
Estimating the term…
Abstract
Provided are techniques for receiving an error inject script that describes one or more error inject scenarios that define under which conditions at least one error inject is to be executed and compiling the error inject script to output an error inject data structure. While executing code that includes the error inject, an indication that an event has been triggered is received, conditions defined in the one or more error inject scenarios are evaluated using the error inject data structure, and, for each of the conditions that evaluates to true, one or more actions defined in the error inject script for the condition are performed.
Claims12
A system, comprising:
- a processor;
- and
- storage coupled to the processor, wherein the storage stores a computer program, and wherein the processor is configured to execute the computer program to perform operations, wherein the operations comprise:
- receiving an error inject script that includes a declaration that describes one or more events and an error inject scenario that describes conditions and associated one or more error inject actions;
- compiling the error inject script to output an error inject data structure;
- and
- using the error inject data structure and the one or more events to determine when to execute at least one error inject by, while executing code that includes the error inject,
- receiving an indication that an event from the one or more events has been triggered;
- in response to the event from the one or more events being triggered, evaluating the conditions using the error inject data structure;
- and
- for a condition from the conditions that evaluates to true, performing the associated one or more error inject actions defined in the error inject script for the condition.
A computer program product comprising a computer readable storage medium including a computer readable program, wherein the computer readable program when executed by a processor on a computer causes the computer to:
- receive an error inject script that includes a declaration that describes one or more events and an error inject scenario that describes conditions and associated one or more error inject actions;
- compile the error inject script to output an error inject data structure;
- and
- using the error inject data structure and the one or more events to determine when to execute at least one error inject by, while executing code that includes the error inject,
- receive an indication that an event from the one or more events has been triggered;
- in response to the event from the one or more events being triggered, evaluate the conditions using the error inject data structure;
- and
- for a condition from the conditions that evaluates to true, perform the associated one or more error inject actions defined in the error inject script for the condition.
Dependencies are inferred from the claim text.