1. A method of testing a function using a mock function and test case definition, the method comprising: receiving a test case definition for a target function to be tested, the test case definition including an expected number of arguments and expected argument values to be sent in a call from the target function to an external function; automatically creating, using a processor operatively coupled to a memory, a mock function using the test case definition; replacing the external function called in the target function with the mock function; calling the target function, the target function calling the mock function; determining whether the target function called the mock function with the expected number of arguments and expected argument values; and sending a failure or success report based on the determination.