Automatically redirecting method calls for unit testing
AssigneeMicrosoft Corporation
InventorMichael J. Braude
Life of this patent
Estimating the term…
Loading patent…
AssigneeMicrosoft Corporation
InventorMichael J. Braude
Estimating the term…
A unit testing system allows testing of multiple types of method calls using an unmodified software application module. The system dynamically copies byte code of the tested method, clones the byte code, and executes the cloned byte code. During cloning, the system instruments the code so that method calls are redirected into a system method, where the system can determine whether a mocked method should be called instead. The result is that the developer does not need to modify the original methods in order to redirect method calls to mock methods. The developer can simply reference a test module of the unit testing system and easily write tests that redirect any method they wish. Thus, the unit testing system provides a framework for building more useful unit tests that cause less interference with production-ready code.
A computer-implemented method for setting up interception of software application methods for testing, the method comprising:
A computer system for unit testing software application code, the system comprising:
A computer-readable storage medium comprising instructions for controlling a computer system to process a call to an intercepted software method during testing, wherein the instructions, when executed, cause a processor to perform actions comprising:
Dependencies are inferred from the claim text.