Patent ID: 8756569

Claim:
A method for recording and injecting a fault event during execution of a computer program, the method comprising: performing the following a record mode: detecting a first method call event during a first execution of a program; calling a fault injector in response to detecting the first method call event; incrementing a first counter value in response to calling the fault injector; determining, based on a program execution state, a fault event to be generated and injected into the program in response to detecting the first method call event, wherein the fault event is associated with a fault event type; storing the fault event type and first counter value associated with the fault event; generating and injecting the fault event; performing the following during a replay mode: detecting a second method call event during a second execution of the program; incrementing a second counter value; and generating and injecting the previously generated and injected fault event in response to determining that the second counter value matches the first counter value.