Test Coverage Data Mining via Execution Counter Extraction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for analyzing test coverage data are time-consuming, especially when dealing with large amounts of data, as they require parsing the entire test coverage data file to determine changes in the total coverage rate, significantly reducing the efficiency of data mining.
Innovation Solution
A method that processes each test input by extracting execution counter data from test coverage files and determining if there's a predetermined change, allowing for the selection of representative tests without needing to parse the entire data file, thus improving data mining efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the conventional summing process is used to obtain total test coverage rate, then the completeness of coverage analysis is improved, but the time consumption increases significantly
Solution Approach 1:
The patent extracts only the execution counter data from test coverage files, separating this critical information from the complete test coverage data. By taking out only the necessary counter information rather than processing entire files, the system achieves accurate coverage rate calculation without the time penalty of comprehensive parsing.
Solution Approach 2:
The patent segments the test coverage analysis process into two parts: (1) extraction of execution counter data from test coverage files, and (2) comparison of counter data to determine coverage changes. This segmentation allows the system to focus computational resources only on the essential counting information rather than processing all test coverage data.
2Measurement precision
If the entire test coverage data file is parsed to determine coverage changes, then the accuracy of coverage rate calculation is improved, but the processing efficiency deteriorates
Solution Approach 1:
The system extracts only execution counter data from test coverage files, isolating the specific information needed for coverage rate calculation. This extraction approach maintains calculation accuracy by focusing on counter values while eliminating the need to parse and process the entire test coverage data file structure.
Solution Approach 2:
The patent applies partial action by performing only the necessary extraction of counter data rather than complete file parsing. This partial processing approach provides sufficient information for accurate coverage rate determination without the excessive computational overhead of processing all test coverage data.
3Reliability
If a large number of tests are executed to achieve complete coverage, then the thoroughness of testing is improved, but the time required for testing increases
Solution Approach 1:
The patent implements feedback by comparing execution counter data from successive test runs to identify coverage changes. This feedback mechanism allows the system to determine which tests contribute to coverage improvement, enabling selective retention of tests that provide meaningful coverage increments while discarding redundant tests.
Solution Approach 2:
The system dynamically adjusts the test suite by evaluating coverage changes after each test execution. Based on the feedback from counter data comparison, the test collection is dynamically optimized to include only those tests that contribute to coverage improvement, adapting the testing strategy to achieve complete coverage with minimal tests.
Data Source
AI summary
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.


