US2016292068A1PendingUtilityA1

Code coverage rate determination method and system

Assignee: ALIBABA GROUP HOLDING LTDPriority: Feb 14, 2012Filed: Mar 15, 2016Published: Oct 6, 2016
Est. expiryFeb 14, 2032(~5.6 yrs left)· nominal 20-yr term from priority
G06F 11/3676
48
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Embodiments of the present application relate to a code coverage rate determination method, a code coverage rate determination system, and a computer program product for determining code coverage rate. A code coverage rate determination method is provided. The method includes retrieving source code of a program, determining theoretical number of log file output points included in the source code and location information of the log file output points, retrieving log files actually outputted during the execution of the program, determining an actual number of log file output points of the actual outputted log files based on the location information of the corresponding log file output points recorded in each log file, and determining a code coverage rate of the program based on the theoretical number of log file output points and the actual number of the log file output points of the actual outputted log files.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . (canceled) 
     
     
         2 . A method, comprising:
 determining, using one or more processors, log file output points of actual outputted log files included in source code based on location information in the source code of the corresponding log file output points recorded in the actual outputted log files;   determining, using the one or more processors, log file output points of un-outputted log files based on the log file output points of the actual outputted log files and theoretical log file output points; and   determining, using the one or more processors, based on the log file output points of the un-outputted log files, uncovered code to aid in identifying unexecuted source code.   
     
     
         3 . The method as described in  claim 2 , wherein the determining of the log file output points of the un-outputted log files comprises:
 determining, at a theoretical log file output point, whether a log file is actually output in a first runtime environment; and   in the event that the log file is actually output:
 determining, at the theoretical log file output point, whether a log file is actually output in a second runtime environment; and 
 in the event that the log file is not actually output, determining that the theoretical log file output point relates to an un-outputted log file in the second runtime environment. 
   
     
     
         4 . A method, comprising:
 retrieving log files actually outputted by a program in different runtime environments;   determining, using one or more processors, log file output points which are outputted in one runtime environment and not in another runtime environment based on location information in source code of corresponding log file output points recorded in the log files actually outputted in each runtime environment; and   determining, using the one or more processors, uncovered code to aid in identifying unexecuted source code when the program is executed in the corresponding runtime environments, the determination being based on the log file output points of the un-outputted log files.   
     
     
         5 . The method as described in  claim 4 , wherein the determining of the log file output points which are outputted in one runtime environment and not in another runtime environment comprises:
 determining, based on a location in the source code, whether a log file is actually output for the runtime environment; and   in the event that the log file is actually output for the runtime environment:
 determining, based on the location in the source code, whether a log file is actually output for the other runtime environment; and 
 in the event that the log file is not actually output for the other runtime environment, determining that the other runtime environment did not output the log file in the location. 
   
     
     
         6 . A system, comprising:
 at least one processor configured to:
 determine log file output points of actual outputted log files included in source code based on location information in the source code of the corresponding log file output points recorded in the actual outputted log files; 
 determine log file output points of un-outputted log files based on the log file output points of the actual outputted log files and theoretical log file output points; and 
 determine, based on the log file output points of the un-outputted log files, uncovered code to aid in identifying unexecuted source code; and 
   a memory coupled to the at least one processor and configured to provide the at least one processor with instructions.   
     
     
         7 . The system as described in  claim 6 , wherein the determining of the log file output points of the un-outputted log files comprises to:
 determine, at a theoretical log file output point, whether a log file is actually output in a first runtime environment; and   in the event that the log file is actually output:
 determine, at the theoretical log file output point, whether a log file is actually output in a second runtime environment; and 
 in the event that the log file is not actually output, determine that the theoretical log file output point relates to an un-outputted log file in the second runtime environment. 
   
     
     
         8 . A system, comprising:
 at least one processor configured to:
 retrieve log files actually outputted by a program in different runtime environments; 
 determine log file output points which are outputted in one runtime environment and not in another runtime environment based on location information in source code of corresponding log file output points recorded in the log files actually outputted in each runtime environment; and 
 determine uncovered code to aid in identifying unexecuted source code when the program is executed in the corresponding runtime environments, the determination being based on the log file output points of the un-outputted log files; and 
   a memory coupled to the at least one processor and configured to provide the at least one processor with instructions.   
     
     
         9 . The system as described in  claim 8 , wherein the determining of the log file output points which are outputted in one runtime environment and not in another runtime environment comprises to:
 determine, based on a location in the source code, whether a log file is actually output for the runtime environment; and   in the event that the log file is actually output for the runtime environment:
 determine, based on the location in the source code, whether a log file is actually output for the other runtime environment; and 
 in the event that the log file is not actually output for the other runtime environment, determine that the other runtime environment did not output the log file in the location. 
   
     
     
         10 . A computer program product for determining a code coverage rate, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
 determining log file output points of actual outputted log files included in source code based on location information in the source code of the corresponding log file output points recorded in the actual outputted log files;   determining log file output points of un-outputted log files based on the log file output points of the actual outputted log files and theoretical log file output points; and   determining, based on the log file output points of the un-outputted log files, uncovered code to aid in identifying unexecuted source code.   
     
     
         11 . The computer program product as described in  claim 10 , wherein the determining of the log file output points of the un-outputted log files comprises:
 determining, at a theoretical log file output point, whether a log file is actually output in a first runtime environment; and   in the event that the log file is actually output:
 determining, at the theoretical log file output point, whether a log file is actually output in a second runtime environment; and 
 in the event that the log file is not actually output, determining that the theoretical log file output point relates to an un-outputted log file in the second runtime environment. 
   
     
     
         12 . A computer program product for determining a code coverage rate, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
 retrieving log files actually outputted by a program in different runtime environments;   determining log file output points which are outputted in one runtime environment and not in another runtime environment based on location information in source code of corresponding log file output points recorded in the log files actually outputted in each runtime environment; and   determining uncovered code to aid in identifying unexecuted source code when the program is executed in the corresponding runtime environments, the determination being based on the log file output points of the un-outputted log files.   
     
     
         13 . The computer program product as described in  claim 12 , wherein the determining of the log file output points which are outputted in one runtime environment and not in another runtime environment comprises:
 determining, based on a location in the source code, whether a log file is actually output for the runtime environment; and   in the event that the log file is actually output for the runtime environment:
 determining, based on the location in the source code, whether a log file is actually output for the other runtime environment; and 
 in the event that the log file is not actually output for the other runtime environment, determining that the other runtime environment did not output the log file in the location.

Join the waitlist — get patent alerts

Track US2016292068A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.