Patent ID: 9280442
Filing Date: 2016-03-08
CPC Classification: G06F

Claim Text:
1. A computer-implemented method for generating unit test coverage report, comprising: receiving a source code file including a plurality of source code units, wherein each source code unit of the plurality of source code units corresponds to one of a plurality of comments sections; parsing the plurality of comments sections; extracting to a first list, identification information for each source code unit from the corresponding comments section; extracting a unit description for each source code unit from the corresponding comments section, wherein at least one unit description from the comments section includes an executable portion of code; determining a function type corresponding to each unit description, wherein the function type is at least one of a function that establishes a value or a function that retrieves a value; automatically generating a set of unit tests for each source code unit based on the unit description within the corresponding comments section and the determined function type, wherein the set of unit tests includes at least one unit test based on the determined function type and a unit test that includes the executable portion of code, wherein generating the set of unit tests includes copying the unit description including the executable portion of code to a unit test stub corresponding to a source code unit type, and transforming each unit test stub into a corresponding one of a plurality of unit tests; and executing the set of unit tests, wherein executing the unit test that includes the executable portion of code includes executing the executable portion of code; generating a test result indication for each source code unit based on the execution of the set of unit tests, wherein the generated test result indication includes at least one of a pass result, fail result, and follow-up result; storing the test result indication and the identification information for each source code unit in a list of tested source code units; comparing the identification information for each source code unit in the first list to the list of tested source code units; and based on the comparing, adding the identification information for each source code unit and the test result indication for each source code unit to the unit test coverage report.