Dynamic Code Coverage Thresholds Based on Usage and Change Frequency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing test suites that completely test complex applications is cumbersome, costly, and inefficient, especially as application code changes and evolves during development, due to the need for uniform code coverage thresholds across all code segments.

Innovation Solution

A system that dynamically updates code coverage thresholds for code segments based on their usage frequencies and change frequencies, using a segment identification engine to select high-impact segments and a coverage determination engine to adjust thresholds accordingly, thereby focusing testing resources on critical areas.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If uniform code coverage thresholds are applied across all code segments, then comprehensive testing coverage is achieved, but testing costs and complexity increase significantly

Engineering Contradiction:
Improvetesting coverageVSAvoidtesting complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies different code coverage thresholds to different code segments based on their characteristics. High-impact code segments (those with high usage frequency or high change frequency) are assigned higher coverage thresholds (e.g., 80-100%), while low-impact segments receive lower thresholds (e.g., 60-80%). This local differentiation resolves the contradiction by maintaining comprehensive testing where needed while reducing complexity where not necessary.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments the codebase into distinct groups based on usage frequency and change frequency metrics. By dividing code into high-impact and low-impact segments, the system can apply tailored testing strategies to each segment, achieving comprehensive coverage for critical code while avoiding unnecessary testing complexity for less critical code.

Inventive Principle:
Principle #1Segmentation

2Reliability

If code coverage thresholds are increased for all segments, then testing thoroughness improves, but resource expenditure increases

Engineering Contradiction:
Improvetesting thoroughnessVSAvoidresource expenditure
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent implements local quality by assigning higher code coverage thresholds specifically to high-impact code segments (those with high usage frequency or high change frequency) while applying lower thresholds to low-impact segments. This ensures testing thoroughness is concentrated where it provides maximum value, reducing overall resource expenditure while maintaining reliability for critical code.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent dynamically adjusts the code coverage threshold parameter based on the characteristics of each code segment. By changing the threshold parameter from a uniform value to segmented values based on usage and change frequency, the system optimizes the balance between testing thoroughness and resource expenditure.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If comprehensive testing is performed on all code segments, then application reliability is ensured, but development efficiency decreases

Engineering Contradiction:
Improveapplication reliabilityVSAvoiddevelopment efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies different testing intensities to different code segments based on their impact characteristics. Critical code segments with high usage or change frequency receive comprehensive testing (80-100% coverage) to ensure application reliability, while less critical segments receive reduced testing (60-80% coverage), thereby improving development efficiency without sacrificing overall reliability.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

By segmenting code based on usage and change frequency, the patent enables differentiated testing strategies that maintain application reliability for critical paths while improving development efficiency through reduced testing overhead on non-critical code.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10761973B2Code coverage thresholds for code segments based on usage frequency and change frequency
Publication Date: 2020.09.01 MICRO FOCUS LLC
  • US10761973B2 patent drawing
  • US10761973B2 patent drawing
  • US10761973B2 patent drawing

AI summary

In some examples, a system includes a segment identification engine and a coverage determination engine. The segment identification engine may a code segment in application code for updating a code coverage threshold applicable to the code segment. The coverage determination engine may update the code coverage threshold for the code segment based on a usage frequency of the code segment and a change frequency of the code segment.