Testing flow control at test assertion level
First Claim
Patent Images
1. A method comprising:
- providing a test hierarchy implemented in a common source unit including production source code and test source code, the test hierarchy including a collection of test methods, a test method in the collection of test methods including test source code specifying a call to a test assertion method for testing the production source code, the test assertion call defining a test execution flow within the test hierarchy in an event of a failure; and
controlling the test execution flow inside the test hierarchy in the event of failure according to a parameter value of the call to the test assertion method, the parameter values available for controlling the test execution flow including values specifying;
continuing the test execution flow with a next statement in the test method;
interrupting the test execution flow of the test method and continuing the test execution flow with any remaining test methods in the test hierarchy; and
interrupting the test execution flow of a test class containing the test method and continuing the test execution flow with any remaining test classes in the test hierarchy.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques for test flow control include providing a test hierarchy, the test hierarchy includes a collection of test methods, each test method calling test assertion methods for checking the correctness of production code, and each test assertion call defines the test execution flow within the test hierarchy in an event of a failure. The flow inside the test hierarchy is controlled according to a parameter of the test assertion method call, in response to the event.
18 Citations
21 Claims
-
1. A method comprising:
-
providing a test hierarchy implemented in a common source unit including production source code and test source code, the test hierarchy including a collection of test methods, a test method in the collection of test methods including test source code specifying a call to a test assertion method for testing the production source code, the test assertion call defining a test execution flow within the test hierarchy in an event of a failure; and controlling the test execution flow inside the test hierarchy in the event of failure according to a parameter value of the call to the test assertion method, the parameter values available for controlling the test execution flow including values specifying; continuing the test execution flow with a next statement in the test method; interrupting the test execution flow of the test method and continuing the test execution flow with any remaining test methods in the test hierarchy; and interrupting the test execution flow of a test class containing the test method and continuing the test execution flow with any remaining test classes in the test hierarchy. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product, tangibly embodied in a machine-readable storage device, the computer program product comprising instructions operable to:
-
provide a test hierarchy implemented in a common source unit including production source code and test source code, the test hierarchy including a collection of test methods, a test method in the collection of test methods including test source code specifying a call to a test assertion method for testing the production source code, the test assertion call defining a test execution flow inside the test hierarchy in an event of failure detection; and control the test execution flow within the test hierarchy in the event of failure according to a parameter value of the call to the test assertion method, the parameter values available for controlling the test execution flow including values specifying; continuing the test execution flow with a next statement in the test method; interrupting the test execution flow of the test method and continuing the test execution flow with any remaining test methods in the test hierarchy; and interrupting the test execution flow of a test class containing the test method and continuing the test execution flow with any remaining test classes in the test hierarchy. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer system comprising:
-
a processor for executing program instructions; and one or more memory devices storing program instructions implementing a test hierarchy implemented in a common source unit including production source code and test code, the test hierarchy including a collection of test methods, a test method in the collection of test methods including test source code specifying a call to a test assertion method for testing the production source code, the test assertion call defining the test execution flow within the test hierarchy in an event of a failure, the one or more memory devices further storing program instructions operable to control a flow inside the test hierarchy in the event of failure according to a parameter value of the call to the test assertion method, the parameter values available for controlling the test execution flow including values specifying; continuing the test execution flow with a next statement in the test method; interrupting the test execution flow of the test method and continuing the test execution flow with any remaining test methods in the test hierarchy; and interrupting the test execution flow of a test class containing the test method and continuing the test execution flow with any remaining test classes in the test hierarchy. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification