Selective Test Coverage Analysis for Marked Code Sections
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for excluding sections of a software program from testing require re-editing and re-building the source code, which is tedious, error-prone, and prone to accidental changes.
Innovation Solution
A specialized tool that distinguishes between marked and unmarked sections of an application, allowing for selective test coverage reporting based on command line parameters, eliminating the need for re-editing and re-building when testing different sections.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If comment indicators are used to exclude segments from testing, then test coverage of excluded segments is avoided, but source code must be re-edited and re-built each time different segments need to be excluded
Solution Approach 1:
The patent divides the application into marked and unmarked sections using specific markers embedded in the source code. The coverage tool segments the analysis to separately track coverage of marked sections versus unmarked sections, allowing selective reporting without requiring physical exclusion through comments. This segmentation enables the tool to provide targeted coverage reports for specific sections while maintaining the complete application binary.
Solution Approach 2:
The patent introduces markers as intermediary elements that sit between the source code and the coverage analysis process. These markers (such as #pragma GCC push_function or similar section markers) act as intermediaries that guide the coverage tool on which sections to track and report, eliminating the need for comment-based exclusion while enabling precise control over coverage reporting scope.
2Reliability
If comment indicators are used to exclude segments, then coverage results for excluded segments are eliminated, but the approach is error prone and risks accidental changes to source code
Solution Approach 1:
The patent segments the source code analysis by introducing markers that define specific sections. Instead of using comment indicators that require manual source code modification, the markers enable the coverage tool to segment and analyze only the relevant portions of the code, maintaining source code integrity while achieving accurate coverage measurement for selected sections.
Solution Approach 2:
Markers serve as intermediaries between the source code and coverage analysis, providing a structured way to specify which sections should be tracked. This intermediary approach eliminates the need for comment-based exclusion that risks source code corruption, while maintaining ease of operation through standardized marker syntax that is processed automatically by the coverage tool.
3Measurement precision
If the conventional tool counts execution of all statements, then complete coverage data is obtained, but the ability to selectively report on specific sections is limited
Solution Approach 1:
The patent implements segmentation of coverage analysis by dividing the application into marked and unmarked sections based on embedded markers. The coverage tool is enhanced to perform segmented tracking, maintaining separate coverage counts for marked versus unmarked sections, and providing selective reporting capabilities. This segmentation approach increases measurement precision while managing tool complexity through systematic marker-based section identification.
Solution Approach 2:
The patent changes the parameters of the coverage analysis by introducing marker-based section identification. Instead of uniformly analyzing all code, the tool accepts parameters (markers) that define which sections should be tracked and reported. This parameter change enables granular control over coverage reporting without requiring complex manual configuration, as the markers themselves carry the section definition information.
Data Source
AI summary
A technique is directed to ascertaining application test coverage. The technique involves receiving a command to test an application having a set of unmarked sections and a set of marked sections. The command includes a selection parameter that requests at least one of unmarked section coverage results and marked section coverage results. The technique further involves running a test procedure that operates the application to generate section coverage data. The technique further involves, after running the test procedure, generating application coverage results from the section coverage data. The application coverage results describes test procedure coverage of at least one of the set of unmarked sections of the application and the set of marked sections of the application based on the selection parameter of the command.


