Suspect Code Detection via Test Coverage Ranking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for identifying the cause of software regression are manual, time-consuming, and require expert knowledge, reducing the efficiency of automated testing and consuming scarce resources.
Innovation Solution
A method that executes test cases on both base and changed code to identify suspect code blocks by analyzing test coverage maps and reference counts, ranking these blocks based on their likelihood of causing regression, and prioritizing them for investigation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual methods are used to identify the cause of software regression, then expert knowledge can be applied to analyze failures, but the process becomes time-consuming and reduces testing efficiency
Solution Approach 1:
The system performs self-analysis by automatically executing test cases, comparing baseline results with new results, and identifying suspect code blocks through test coverage maps and reference counts, eliminating the need for manual expert intervention while maintaining accurate regression cause identification
Solution Approach 2:
The patent replaces manual mechanical analysis with an automated computational system that uses processors to execute test cases, analyze test coverage maps, calculate reference counts, and rank suspect code blocks, thereby reducing time loss while preserving measurement precision
2Measurement precision
If manual expert intervention is used to analyze regression failures, then accurate cause identification is achieved, but scarce expert resources are consumed
Solution Approach 1:
The system autonomously identifies suspect code blocks by executing test cases, generating test coverage maps, calculating reference counts, and ranking code blocks based on their likelihood of causing regression, thereby maintaining accurate cause identification while freeing expert resources for higher-value tasks
Solution Approach 2:
The patent introduces an automated analysis system as an intermediary between test execution and expert review, using test coverage maps and reference count calculations to filter and rank suspect code blocks, thereby improving productivity while preserving measurement precision through automated preprocessing
3Reliability
If all code blocks in changed code are investigated for regression causes, then comprehensive analysis is performed, but the process becomes overly complex and time-consuming
Solution Approach 1:
The patent segments the code base into discrete code blocks and uses test coverage maps to identify only those blocks referenced by failing test cases, thereby maintaining reliable comprehensive analysis of relevant code while reducing process complexity by excluding unchanged and unrelated code blocks
Solution Approach 2:
The system applies different analysis criteria to different code blocks by calculating reference counts and ranking suspect blocks based on their specific characteristics, thereby maintaining reliable targeted analysis while reducing overall complexity through localized rather than uniform investigation
Data Source
AI summary
A set of test cases is executed on a base code to produce a baseline result and on a changed code to produce a new result. From the baseline result and the new result, a first subset of tests cases is determined that are failing with the changed code but were not failing with the base code. A set of code blocks is determined in the changed code that includes those code blocks that are referenced by the first subset of test cases. A second subset is formed from the first subset by disregarding an unchanged code block that has remained unchanged from the base code to the changed code. A remaining code block is shortlisted for investigating based on a ranking of the remaining code block, which uses a number of test cases in the first subset of test cases that reference the remaining code block.


