IP Library Granted Patent US 7,392,507
Granted Patent B2
US 7,392,507 · App. 11/017,482 · Granted Jun 24, 2008

Modularizing a computer program for testing and debugging

Assignee: Parasoft 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 7,392,507
App. No.
11/017,482
Granted
Jun 24, 2008
Kind
B2
Abstract

A system and method for facilitating and simplifying testing and debugging of computer programs. is described A computer program is broken down to smaller components, such as, classes, functions, or objects, and then those smaller components are tested individually. Accordingly, specific aspects of the computer program can be effectively tested. The user can automatically perform a range of tests on a class or method when the class or method is compiled without integrating the class or method into a larger project.

Claims (35)

1. A method for generating test cases for a computer program, the method comprising:

analyzing the computer program to identify a plurality of test units;

selecting a test unit from the plurality of test units to be tested;

applying a set of programming rules to the selected test unit; and

automatically generating one or more test cases for the selected test unit.

2. The method of claim 1 further comprising testing the selected test unit utilizing the automatically generated one or more test cases.

3. The method of claim 1 wherein the test unit is one or more of the group consisting of a class, a function, and a method.

4. The method of claim 1 further comprising reconstructing the selected test unit by removing the code unrelated to the selected test unit.

5. The method of claim 1 further comprising modifying the one or more test cases and utilizing the modified one or more test cases to generate new test cases.

6. The method of claim 1 further comprising reporting an error and indicating the place in the computer program where the error is located.

7. The method of claim 1 further comprising controlling the generation of one or more test cases by modifying test case parameters.

8. The method of claim 7 further comprising sharing the test case parameters with others via a configuration file.

9. The method of claim 7 further comprising changing the test case parameters to increase test coverage.

10. The method of claim 1 wherein the step of selecting a test unit comprises specifying a type of unit test and selecting only the test units of the specified type.

11. The method of claim 1 wherein the step of testing the reconstructed test unit comprises performing one or more of error detection, test coverage, and regression testing of the reconstructed test unit.

12. The method of claim 1 further comprising replaying the generated one or more test cases.

13. The method of claim 1 further comprising displaying test results for each test case, wherein the test results for each test case include the number of times a respective test case was executed; arguments, returns, preconditions, and post-conditions of the respective test case; the reason the respective test case failed, if the test case failed; and all available test parameters, if a test case had an error.

14. The method of claim 1 wherein the step of automatically generating one or more test cases comprises automatically generating source code to be independently executed for the one or more test cases.

15. The method of claim 1 wherein the step of automatically generating one or more test cases comprises executing the computer program, monitoring the execution of the computer program, storing information about one or more test unit being executed, and utilizing the stored information to generate the one or more test cases.

16. A method for generating test cases for a computer program having a plurality of test units, the method comprising:

executing the computer program;

monitoring the execution of the computer program;

storing information about one or more test units being executed; and

generating one or more test cases utilizing the stored information.

17. The method of claim 16 further comprising testing the one or more test units utilizing the generated one or more test cases.

18. The method of claim 16 wherein the stored information is one or more of the group consisting of initialization values, input parameters, stubs, and verification code.

19. The method of claim 16 wherein the test unit is one or more of the group consisting of a class, a function, and a method.

20. The method of claim 16 further comprising modifying the one or more test cases and utilizing the modified one or more test cases to generate new test cases.

21. A method for generating a test case for a computer program, the method comprising:

analyzing the computer program to identify a plurality of test units;

selecting a test unit from the plurality of test units; and

creating a test case by incorporating the selected test unit, ignoring code unrelated to the selected test unit, and adding code to make the created test case an independently executable test case.

22. The method of claim 21 wherein the added code is code for one or more of the group consisting of initialization values, input parameters, stubs, and verification.

23. The method of claim 21 wherein the test unit is one or more of the group consisting of a class, a function, and a method.

24. The method of claim 21 further comprising modifying the created test case and utilizing the modified test case to generate a new test case.

Continuity (3)
Continuation 0947868200 · Jan 6, 2000
Provisional Application 6011483900 · Jan 6, 1999
Related Publication 20050120276A1 · Jun 2, 2005