发明名称 RISK-BASED TEST COVERAGE AND PRIORITIZATION
摘要 A processor receives a rule containing a first set of code statements. The processor compares the first set of code statements of the rule to a second set of code statements of a plurality of code statements of source code. The processor responds to a match of the first set of code statements of the rule and the second set of code statements of the plurality of code statements of the source code, by applying a weight modifier to the rule, which adds a weighted value to the rule, and the processor, in response to a second matching of the first set of code statements of the rule to the second set of code statements of the plurality of code statements of the source code, applies the weight modifier to the rule, which includes a weighted value, and the weight modifier adjusts the weighted value of the rule.
申请公布号 US2017109265(A1) 申请公布日期 2017.04.20
申请号 US201715397832 申请日期 2017.01.04
申请人 International Business Machines Corporation 发明人 Rajamanickam Logeswaran T.;Ramakrishnan Arun;Shetty Rohit
分类号 G06F11/36 主分类号 G06F11/36
代理机构 代理人
主权项 1. A computer program product for indicating significance of tested code statements, the computer program product comprising: one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, the program instructions comprising: program instructions to receive a rule containing a first set of code statements, wherein the rule includes at least one of an absolute significance indicator rule and a generic significance indicator rule; program instructions to compare the first set of code statements of the rule to a second set of code statements of a plurality of code statements of a source code, wherein a comparison of the first set of code statements contained in the rule to the second set of code statements of the plurality of codes statements of the source code is performed concurrent with testing of a compiled version of the source code, andwherein determining a correspondence between the first set of code statements of the rule and the second set of code statements of the plurality of code statements of the source code is enabled by annotations applied to the source code by code instrumentation; in response to determining a correspondence of the first set of code statements of the rule to the second set of code statements of the plurality of code statements of the source code, program instructions to apply a weight modifier to the rule, wherein the weight modifier assigns a weighted value to the first set of code statements of the rule, and wherein the weight modifier of an absolute significance indicator rule additionally adjusts the weighted value by a multiplier; in response to determining a correspondence of the first set of code statements of the rule to a third set of code statements of the plurality of code statements of the source code, program instructions to apply the weight modifier to the rule a second time, wherein the rule includes a first instance of the weighted value and the weight modifier assigns a second instance of the weighted value to the first set of code statements of the rule; program instructions to apply a cumulative weight value of the rule to the second set of code statements and a cumulative weight value of the rule to the third set of codes statements of the plurality of code statements of the source code, wherein the cumulative weight value indicates a significance of the second set of code statements and the third set of code statements, and is based on accumulated applications of the weighted value to the rule by the weight modifier; program instructions to determine a priority of subsequent testing for the second set of code statements and the third set of code statements, of the plurality of code statements of the source code, based on the cumulative weight value applied to the second set of code statements and the third set of code statements; and in response to receiving a request for a test coverage report, program instructions to display the cumulative weight value applied to the second set of code statements and the cumulative weight value applied to the third set of code statements of the plurality of code statements of the source code, in the test coverage report.
地址 Armonk NY US