Method and apparatus for mining test coverage data
First Claim
1. A computer-implemented method of mining test coverage data, comprising:
- at a device having one or more processors and memory;
sequentially generating a plurality of coverage data files by executing a program using a respective test input of a plurality of test inputs, wherein the program includes a plurality of code blocks, each code block being either executed as a whole or not executed at all during the execution of the program;
after generating the plurality of coverage data files, processing a current coverage data file by extracting respective execution counter data from the current coverage data file, wherein each code block has a counter for recording execution counter value associated with the code block and the execution counter values associated with the plurality of code blocks collectively form a counter value list;
after processing the current coverage data file, determining whether the respective execution counter data from a current counter value list extracted from the current coverage data file includes a predetermined change relative to the respective execution counter data from a previous counter value list extracted from previously processed coverage data files, further comprising;
determining whether the respective test input used to generate the current coverage data file has caused a respective counter for at least one code block in the program to change; and
in response to detecting the predetermined change for the current coverage data file;
including the respective test input used to generate the current coverage data file in a test input collection for testing the program; and
updating the counter value list with the respective execution counter data extracted from the current coverage data file.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of mining test coverage data includes: at a device having one or more processors and memory: sequentially processing each of a plurality of coverage data files that is generated by executing the program using a respective test input of a plurality of test inputs, where the processing of each current coverage data file extracts respective execution counter data from the current coverage data file; after processing each current coverage data file, determining whether the respective execution counter data extracted from the current coverage data file includes a predetermined change relative to the respective execution counter data extracted from previously processed coverage data files; and in response to detecting the predetermined change for the current coverage data file, including the respective test input used to generate the current coverage data file in a test input collection for testing the program.
46 Citations
17 Claims
-
1. A computer-implemented method of mining test coverage data, comprising:
at a device having one or more processors and memory; sequentially generating a plurality of coverage data files by executing a program using a respective test input of a plurality of test inputs, wherein the program includes a plurality of code blocks, each code block being either executed as a whole or not executed at all during the execution of the program; after generating the plurality of coverage data files, processing a current coverage data file by extracting respective execution counter data from the current coverage data file, wherein each code block has a counter for recording execution counter value associated with the code block and the execution counter values associated with the plurality of code blocks collectively form a counter value list; after processing the current coverage data file, determining whether the respective execution counter data from a current counter value list extracted from the current coverage data file includes a predetermined change relative to the respective execution counter data from a previous counter value list extracted from previously processed coverage data files, further comprising; determining whether the respective test input used to generate the current coverage data file has caused a respective counter for at least one code block in the program to change; and in response to detecting the predetermined change for the current coverage data file; including the respective test input used to generate the current coverage data file in a test input collection for testing the program; and updating the counter value list with the respective execution counter data extracted from the current coverage data file. - View Dependent Claims (2, 3, 4, 5, 6)
-
7. A system for mining test coverage data, comprising:
-
one or more processors; and memory having instructions stored thereon, the instructions, when executed by the one or more processors, cause the processors to perform operations comprising; sequentially generating a plurality of coverage data files by executing a program using a respective test input of a plurality of test inputs, wherein the program includes a plurality of code blocks, each code block being either executed as a whole or not executed at all during the execution of the program; after generating the plurality of coverage data files, processing a current coverage data file by extracting respective execution counter data from the current coverage data file, wherein each code block has a counter for recording execution counter value associated with the code block and the execution counter values associated with the plurality of code blocks collectively form a counter value list; after processing the current coverage data file, determining whether the respective execution counter data from a current counter value list extracted from the current coverage data file includes a predetermined change relative to the respective execution counter data from a previous counter value list extracted from previously processed coverage data files, further comprising; determining whether the respective test input used to generate the current coverage data file has caused a respective counter for at least one code block in the program to change; and in response to detecting the predetermined change for the current coverage data file; including the respective test input used to generate the current coverage data file in a test input collection for testing the program; and updating the counter value list with the respective execution counter data extracted from the current coverage data file. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A non-transitory computer-readable medium having instructions stored thereon, the instructions, when executed by one or more processors, cause the processors to perform operations comprising:
-
sequentially generating a plurality of coverage data files by executing a program using a respective test input of a plurality of test inputs, wherein the program includes a plurality of code blocks, each code block being either executed as a whole or not executed at all during the execution of the program; after generating the plurality of coverage data files, processing a current coverage data file by extracting respective execution counter data from the current coverage data file, wherein each code block has a counter for recording execution counter value associated with the code block and the execution counter values associated with the plurality of code blocks collectively form a counter value list; after processing the current coverage data file, determining whether the respective execution counter data from a current counter value list extracted from the current coverage data file includes a predetermined change relative to the respective execution counter data from a previous counter value list extracted from previously processed coverage data files, further comprising; determining whether the respective test input used to generate the current coverage data file has caused a respective counter for at least one code block in the program to change; and in response to detecting the predetermined change for the current coverage data file; including the respective test input used to generate the current coverage data file in a test input collection for testing the program; and updating the counter value list with the respective execution counter data extracted from the current coverage data file. - View Dependent Claims (14, 15, 16, 17)
-
Specification