GENERATING TYPE-SAFE WRAPPERS FOR DYNAMIC DETOURING
First Claim
1. An isolation system, implemented by electrical processing functionality, for processing product code so that the product code can be tested without dependency on external functionality, comprising:
- logic configured to receive original product code, the 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;
logic configured to receive selection information which defines a subset of original methods to be processed; and
logic configured to convert each original method in the subset of original methods into a corresponding modified part, the modified part declaring a type-safe property having a delegate type.
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.
11 Citations
20 Claims
-
1. An isolation system, implemented by electrical processing functionality, for processing product code so that the product code can be tested without dependency on external functionality, comprising:
-
logic configured to receive original product code, the 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; logic configured to receive selection information which defines a subset of original methods to be processed; and logic configured to convert each original method in the subset of original methods into a corresponding modified part, the modified part declaring a type-safe property having a delegate type. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for testing product code using electrical processing functionality, comprising:
-
receiving original product code, the product code containing an original method that is dependent on functionality that is not under control of a test being performed; converting the original method into a type-safe modified part, the modified part declaring a property having a delegate type; receiving test code which tests at least some aspect of the original product code, the test code assigning a delegate instance to the property; and executing the test code using an execution system, the execution system detouring calls to an instrumentation of the original method to detour code associated with the delegate instance. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer readable medium for 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; and logic configured to convert the original method into a corresponding modified part, the modified part declaring type-safe property information that can be associated, by test code, with detour code to be executed in lieu of an instrumentation of the original method. - View Dependent Claims (20)
-
Specification