IP Library Granted Patent US 8,819,494
Granted Patent B2
US 8,819,494 · App. 12/968,472 · Granted Aug 26, 2014

Automatically changing parts in response to tests

Inventors: Todd E. Johnson (Chatfield, MN); Frederick A. Kulack (Rochester, MN); John E. Petri (St. Charles, MN)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,819,494
App. No.
12/968,472
Granted
Aug 26, 2014
Kind
B2
Abstract

In an embodiment, in response to an error encountered by a test of a program, a rule is found that specifies the error and an action. A part in the program is selected in response to the action, the part is modified, and the test is re-executed. In various embodiments, the part is modified by changing the code in the part or by replacing the part with a previous version of the part.

Claims (74)

1. A computer-implemented method comprising:

in response to an error encountered by a test of a program, finding the error in a rule that specifies an action from among a plurality of rules, each rule specifying a respective at least one action to be invoked in response to occurrence of a corresponding error of a plurality of errors;

selecting a part in the program in response to the action;

modifying the part in the program in response to the selecting and in response to the action;

re-executing the test on the program that comprises part that was modified by the modifying;

wherein at least one rule of said plurality of rules specifies iteratively performing the actions of:

(a) selecting one or more parts in the program which have changed with respect to a prior version of the program,

(b) replacing the selected one or more parts with a prior version of the one or more parts from the prior version of the program,

(c) re-executing the test on the program that comprises the one or more parts that were replaced by (b),

(d) determining whether the corresponding error occurs when performing (c), and

(e) repeating steps (a)-(d) until a part which causes the corresponding error to occur during testing is identified;

generating a problem report for output to a user; and

if the error is uncharacterized, creating a new rule and a new action that specifies replacing the part that was fixed in response to the error, after the part was fixed.

2. The method of claim 1 , wherein the modifying the part further comprises:

adding initialization code to initialize a pointer in response to the action that specifies searching for the initialization code.

3. The method of claim 1 , wherein the modifying the part further comprises:

changing the part that casted a class to use a different case name in response to the action that specifies recasting in response to a class cast exception.

4. The method of claim 1 , wherein the selecting further comprises:

selecting the part that was executing at a time that the error was encountered.

5. The method of claim 4 , further comprising:

finding a change flag that identifies the part that was executing at the time the error was encountered;

selecting a plurality of parts that are identified by the change flag;

modifying the plurality of parts in the program; and

re-executing the test on the program that comprises the plurality of parts that were modified.

6. A non-transitory computer-readable storage medium encoded with instructions, wherein the instructions when executed comprise:

in response to an error encountered by a test of a program, finding the error in a rule that specifies an action from among a plurality of rules, each rule specifying a respective at least one action to be invoked in response to occurrence of a corresponding error of a plurality of errors;

selecting a part in the program in response to the action;

modifying the part in the program in response to the selecting and in response to the action;

re-executing the test on the program that comprises part that was modified by the modifying;

wherein at least one rule of said plurality of rules specifies iteratively performing the actions of:

(a) selecting one or more parts in the program which have changed with respect to a prior version of the program,

(b) replacing the selected one or more parts with a prior version of the one or more parts from the prior version of the program,

(c) re-executing the test on the program that comprises the one or more parts that were replaced by (b),

(d) determining whether the corresponding error occurs when performing (c), and

(e) repeating steps (a)-(d) until a part which causes the corresponding error to occur during testing is identified;

generating a problem report for output to a user; and

if the error is uncharacterized, creating a new rule and a new action that specifies replacing the part that was fixed in response to the error, after the part was fixed.

7. The non-transitory computer-readable storage medium of claim 6 , wherein the modifying the part further comprises:

adding initialization code to initialize a pointer in response to the action that specifies searching for the initialization code.

8. The non-transitory computer-readable storage medium of claim 6 , wherein the modifying the part further comprises:

changing the part that casted a class to use a different case name in response to the action that specifies recasting in response to a class cast exception.

9. The non-transitory computer-readable storage medium of claim 6 , wherein the selecting further comprises:

selecting the part that was executing at a time that the error was encountered.

10. The non-transitory computer-readable storage medium of claim 9 , further comprising:

finding a change flag that identifies the part that was executing at the time the error was encountered;

selecting a plurality of parts that are identified by the change flag;

modifying the plurality of parts in the program; and

re-executing the test on the program that comprises the plurality of parts that were modified.

11. A computer comprising:

a processor; and

memory communicatively coupled to the processor, wherein the memory is encoded with instructions, and wherein the instructions when executed on the processor comprise

in response to an error encountered by a test of a program, finding the error in a rule that specifies an action from among a plurality of rules, each rule specifying a respective at least one action to be invoked in response to occurrence of a corresponding error of a plurality of errors;

selecting a part in the program in response to the action;

modifying the part in the program in response to the selecting and in response to the action;

re-executing the test on the program that comprises part that was modified by the modifying;

wherein at least one rule of said plurality of rules specifies iteratively performing the actions of:

(a) selecting one or more parts in the program which have changed with respect to a prior version of the program,

(b) replacing the selected one or more parts with a prior version of the one or more parts from the prior version of the program,

(c) re-executing the test on the program that comprises the one or more parts that were replaced by (b),

(d) determining whether the corresponding error occurs when performing (c), and

(e) repeating steps (a)-(d) until a part which causes the corresponding error to occur during testing is identified;

generating a problem report for output to a user; and

if the error is uncharacterized, creating a new rule and a new action that specifies replacing the part that was fixed in response to the error, after the part was fixed.

12. The computer of claim 11 , wherein the modifying the part further comprises:

adding initialization code to initialize a pointer in response to the action that specifies searching for the initialization code.

13. The computer of claim 11 , wherein the modifying the part further comprises:

changing the part that casted a class to use a different case name in response to the action that specifies recasting in response to a class cast exception.

14. The computer of claim 11 , wherein the selecting further comprises:

selecting the part that was executing at a time that the error was encountered.

15. The computer of claim 14 , wherein the instructions further comprise:

finding a change flag that identifies the part that was executing at the time the error was encountered;

selecting a plurality of parts that are identified by the change flag;

modifying the plurality of parts in the program; and

re-executing the test on the program that comprises the plurality of parts that were modified.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 15, 2010
From: JOHNSON, TODD E.; KULACK, FREDERICK A.; PETRI, JOHN E.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 025503/0565 →
Continuity (1)
Related Publication 20120159247A1 · Jun 21, 2012