Determining test case efficiency
AssigneeInternational Business Machines Corporation
InventorsMichael S. Fulton, John R. MacMillan
Life of this patent
Estimating the term…
Abstract
A computer-implemented method, computer program product, and system is provided for determining test case efficiency. In an implementation, a method may include determining each code unit executed by a test case in a test suite including a plurality of test cases, wherein a product-under-test includes a plurality of code units. The method may also include determining an execution time for the test case. The method may further include calculating an efficiency rating of the test case based upon, at least in part, a number of code units executed by the test case and the execution time for the test case.
Claims15
A computer-implemented method comprising:
- determining, by a processor, each code unit executed by a test case in a test suite including a plurality of test cases based upon, at least in part, running the test case on a product-under-test in a code coverage mode, wherein the product-under-test includes a plurality of code units;
- determining, by the processor, a number of times each of the plurality of code units is executed in the test suite;
- determining, by the processor, an execution time for the test case;
- determining a sanity rating for each of the plurality of test cases based upon, at least in part, a number of code units executed by the test case and the execution time for the test case;
- generating a sanity model of the test suite based upon at least in part, the sanity rating of the plurality of test cases, wherein generating a sanity model includes displaying the sanity rating for each of the plurality of test cases included in the test suite;
- and
- calculating, by the processor, an efficiency rating of the test case based upon, at least in part, an increment, for each code unit executed by the test case, of a reciprocal of the number of times each code unit is executed by the test suite and the execution time for the test case.
A computer program product comprising a non-transitory computer readable medium having a plurality of instructions stored thereon, which, when executed by a processor, cause the processor to perform operations including:
- determining each code unit executed by a test case in a test suite including a plurality of test cases based upon, at least in part, running the test case on a product-under-test in a code coverage mode, wherein the product-under-test includes a plurality of code units;
- determining a number of times each of the plurality of code units is executed in the test suite;
- determining an execution time for the test case;
- determining a sanity rating for each of the plurality of test cases based upon, at least in part, a number of code units executed by the test case and the execution time for the test case;
- generating a sanity model of the test suite based upon at least in part, the sanity rating of the plurality of test cases, wherein generating a sanity model includes displaying the sanity rating for each of the plurality of test cases included in the test suite;
- and
- calculating an efficiency rating of the test case based upon, at least in part, an increment, for each code unit executed by the test case, of a reciprocal of the number of times each code unit is executed by the test suite and the execution time for the test case.
A system comprising:
- at least one processor device and at least one memory architecture coupled with the at least one processor device, the at least one processor device configured for:
- determining each code unit executed by a test case in a test suite including a plurality of test cases based upon, at least in part, running the test case on a product-under-test in a code coverage mode, wherein the product-under-test includes a plurality of code units;
- determining a number of times each of the plurality of code units is executed in the test suite;
- determining an execution time for the test case;
- determining a sanity rating for each of the plurality of test cases based upon, at least in part, a number of code units executed by the test case and the execution time for the test case;
- generating a sanity model of the test suite based upon at least in part, the sanity rating of the plurality of test cases, wherein generating a sanity model includes displaying the sanity rating for each of the plurality of test cases included in the test suite;
- and
- calculating an efficiency rating of the test case based upon, at least in part, an increment for each code unit executed by the test case, of a reciprocal of the number of times each code unit is executed by the test suite and the execution time for the test case.
Dependencies are inferred from the claim text.