Patent ID: 9043759
Filing Date: 2015-05-26
Classification: G06F

Abstract:
1. A computer-implemented method for generating unit tests for source code, comprising: receiving a source code file including a comments section, the comments section including a keyword identifying a unit description; reading the unit description from the source code file, wherein the unit description follows the keyword; generating a unit test stub based on the unit description, wherein the unit test stub includes a declaration of a testing routine and parameters accepted by the testing routine, and wherein the parameters accepted by the testing routine are derived from the unit description; copying at least a portion of the unit description to the unit test stub; determining a source code function type corresponding to the unit description; automatically generating a first unit test, wherein the first unit test includes one or more instructions corresponding to the determined source code function type, and wherein the one or more instructions are not included in the source code file; automatically generating a second unit test, wherein the second unit test includes one or more instructions corresponding to the determined source code function type; and including the first unit test and the second unit test in the unit test stub.