Marked Source Code Generation for Accurate Test Coverage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for excluding parts of a software program from testing are tedious, error-prone, and cluttered, requiring manual insertion and removal of markers for coverage tracking, which can lead to inaccurate results.

Innovation Solution

A specialized tool uses metadata from a version control system to automatically insert markers in a separate copy of the source code, based on version tags, to track coverage without manual editing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual marker insertion is used to track coverage, then coverage tracking is enabled, but error rate increases and source code becomes cluttered

Engineering Contradiction:
Improvecoverage tracking accuracyVSAvoidsource code clutter
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The patent extracts the coverage tracking markers from the original source code and places them in a separate copied file. This separation removes the harmful clutter from the original code while maintaining the coverage tracking functionality through the copied version containing all necessary markers.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent creates a copy of the source code file and places coverage tracking markers in this copied version. The copy serves as a dedicated container for markers, allowing the original code to remain clean while the copy accumulates all necessary tracking elements without interfering with the original code's readability.

Inventive Principle:
Principle #26Copying

2Reliability

If manual marker insertion is used to track coverage, then coverage tracking is enabled, but time consumption increases

Engineering Contradiction:
Improvecoverage tracking accuracyVSAvoidmarker insertion time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements automated marker insertion that performs the marking process itself without requiring manual intervention. The system automatically identifies code sections, generates appropriate markers, inserts them into the copied file, and manages the entire coverage tracking setup process, eliminating the time-consuming manual insertion workflow.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent performs preliminary automated preparation of the copied file with all necessary markers before testing begins. By pre-generating and pre-positioning all coverage markers in the copied file beforehand, the system eliminates the need for time-consuming manual marker insertion during the testing setup phase.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If comment indicators are used to exclude parts from testing, then exclusion is achieved, but source code editing complexity increases

Engineering Contradiction:
Improvecode exclusion capabilityVSAvoidsource code editing process
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent extracts the functionality of code exclusion from manual comment editing and relocates it to an automated process that operates on copied files. Instead of manually adding comment indicators to exclude code sections, the system automatically handles exclusion through the copied file mechanism, simplifying the editing process while maintaining exclusion capability.

Inventive Principle:
Principle #2Taking out (Extraction)

4Measurement precision

If markers are inserted in source code to track coverage, then coverage tracking is enabled, but marker management complexity increases

Engineering Contradiction:
Improvecoverage measurement accuracyVSAvoidmarker management process
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts marker management from the original source code context and relocates it to a separate copied file. This separation allows markers to be managed independently in the copy without affecting the original code's structure or requiring complex coordination between multiple marker sets in the same file.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the source code into two distinct versions: the original file without markers and a copied file with all coverage markers. This segmentation allows each file to serve its specific purpose independently, simplifying marker management in the copy while keeping the original code clean and manageable.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12517807B2Forming marked source code to ascertain application test coverage
Publication Date: 2026.01.06 DELL PROD LP
  • US12517807B2 patent drawing
  • US12517807B2 patent drawing
  • US12517807B2 patent drawing

AI summary

A technique is directed to ascertaining application test coverage. The technique involves obtaining a source code identifier that identifies a source code section of unmarked source code for an application to be tested. The technique further involves providing a relation that includes the source code identifier and a feature identifier that identifies a feature provided by the source code section of unmarked source code. The technique further involves forming marked source code for the application to be tested from the relation and the unmarked source code. The marked source code for the application to be tested is testable to generate application test coverage results describing test coverage of the source code section.