Patent attributes
A computer-implemented method comprising, during execution of a software program comprising a procedure, determining whether an execution of the procedure satisfies a predetermined coverage criterion. In accordance with a determination that the execution of the procedure satisfies the predetermined coverage criterion, recording information related to the execution of the procedure to a log, the information based on data received from instrumented code included in the software program, and automatically generating an arrange section of a unit test for the procedure based on an initialization sequence determined from the recorded log, the initialization sequence comprising a sequence of program instructions which when executed invoke the procedure.