Generating type-safe wrappers for dynamic detouring
First Claim
1. An isolation system comprising:
- logic configured to;
receive original product code, the original product code containing a plurality of original methods, at least one original method being dependent on external functionality that is not under control of a test being performed;
receive selection information which defines a subset of selected original methods of the plurality of original methods to be processed;
at a first time, convert each of the selected original methods in the subset of selected original methods of the plurality of original methods into corresponding modified parts declaring type-safe property properties having delegate types;
at a second time, determine that an individual selected original method in the subset of selected original methods of the plurality of original methods has a corresponding individual modified part that has already been converted and stored; and
use the individual modified part that has already been converted and stored to invoke associated detour code instead of the individual selected original method; and
one or more processing devices configured to execute the logic.
2 Assignments
0 Petitions
Accused Products
Abstract
An isolation system is described for converting original product code into corresponding modified code. The isolation system operates by identifying a subset of original methods to be converted. For each such original method, the isolation system generates a modified part having at least one property with a type-safe delegate type which matches a signature of the original method. Test code, which tests the product code, can then associate a delegate instance to the thus-defined property of the original method. This prompts an execution system to dynamically execute detour code associated with the delegate instance, rather than an instrumentation of the original method, thus avoiding dependency on potentially non-deterministic functionality which would be otherwise invoked by an instrumentation of the original method.
-
Citations
20 Claims
-
1. An isolation system comprising:
-
logic configured to; receive original product code, the original product code containing a plurality of original methods, at least one original method being dependent on external functionality that is not under control of a test being performed; receive selection information which defines a subset of selected original methods of the plurality of original methods to be processed; at a first time, convert each of the selected original methods in the subset of selected original methods of the plurality of original methods into corresponding modified parts declaring type-safe property properties having delegate types; at a second time, determine that an individual selected original method in the subset of selected original methods of the plurality of original methods has a corresponding individual modified part that has already been converted and stored; and use the individual modified part that has already been converted and stored to invoke associated detour code instead of the individual selected original method; and one or more processing devices configured to execute the logic. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for testing original product code using at least one computing device, the method comprising:
-
receiving the original product code, the original product code containing an original method that is dependent on functionality that is not under control of a test being performed, the original method having an associated original method signature; converting the original method into a type-safe modified part, the type-safe modified part declaring a property having a delegate type that has a delegate type signature that is based on the original method signature; receiving test code which tests at least some aspect of the original product code, the test code assigning a delegate instance to the property using at least one statement, wherein the at least one statement prompts an execution system to invoke detour code associated with the delegate instance instead of invoking the original method; and executing the test code using the execution system, the execution system detouring calls to an instrumentation of the original method to the detour code associated with the delegate instance to thereby execute the detour code associated with the delegate instance instead of the instrumentation of the original method. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A volatile or non-volatile hardware memory device or non-volatile hardware storage device storing computer readable instructions, the computer readable instructions providing an isolation system when executed by one or more processing devices, the computer readable instructions comprising:
-
logic configured to receive an original method that is dependent on functionality that is not under control of a test being performed, wherein the original method has an original method signature specifying at least one of return values or parameters of the original method; and logic configured to convert the original method into a corresponding modified part, the modified part declaring settable property information that is configured to be set, by test code, to associate the settable property information with detour code to be executed in lieu of an instrumentation of the original method, wherein the settable property information has a function signature that matches the original method signature specifying the at least one of the return values or the parameters of the original method. - View Dependent Claims (20)
-
Specification