×

Streamlining unit testing through hot code swapping

  • US 8,799,875 B2
  • Filed: 09/30/2010
  • Issued: 08/05/2014
  • Est. Priority Date: 09/30/2010
  • Status: Active Grant
First Claim
Patent Images

1. A method of testing functions using mock functions, the method comprising:

  • receiving information at a function tester specified using a declarative syntax that defines a test case definition for a target function to be tested by the function tester, the test case definition including an expected number of arguments to one or more external functions to be called in the target function and expected argument values for the expected number of arguments to be sent in a call to each of the one or more external functions from the target function;

    creating, using a processor operatively coupled to a memory, a mock function for an external function to be called in the target function based on the received test case definition for the target function;

    replacing the external function to be called in the target function with the mock function created based on the received test case definition for the target function;

    calling the mock function in response to calling the target function;

    determining whether the mock function was called with an expected number of arguments to the external function and expected argument values for the expected number of arguments defined according to the received test case definition for the target function; and

    generating information indicative of a failure or success based on the determination whether the mock function was called with the expected number of arguments to the external function and the expected argument values for the expected number of arguments defined according to the received test case definition for the target function.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×