Usage-Weighted Code Line Testing for Software Reliability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software testing approaches treat each line of code equally, failing to identify highly utilized code lines that are under-tested, leading to potential software bugs being overlooked.

Innovation Solution

A method that captures usage data from multiple users accessing a codebase, computes code line usage weighting and test coverage scores, and flags code lines with discrepancies between usage and testing, ensuring critical areas are tested more thoroughly.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional software testing approaches are used that treat each line of code equally, then the testing process is simple and uniform, but highly utilized code lines that are under-tested may be overlooked leading to software bugs

Engineering Contradiction:
Improvesoftware reliabilityVSAvoidtesting complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by differentiating test coverage requirements based on the specific characteristics of individual code lines. Instead of uniform testing, the system identifies highly utilized code lines through usage data and applies enhanced testing strategies specifically to these critical areas, while maintaining standard testing for less critical code.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter of test coverage allocation from uniform distribution to usage-based distribution. By computing code line usage weighting based on actual user interaction data, the system dynamically adjusts testing focus to match real-world usage patterns, ensuring critical code paths receive proportionally more testing attention.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If more comprehensive software testing is performed to detect all potential bugs, then software reliability improves, but time and resource constraints are exceeded

Engineering Contradiction:
Improvesoftware reliabilityVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system applies localized enhanced testing only to highly utilized code lines identified through usage data analysis, rather than uniformly increasing testing across the entire codebase. This focuses testing resources on areas that matter most for software reliability while avoiding waste on less critical code paths.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements partial action by applying enhanced testing strategies selectively to specific code lines based on their usage importance, rather than applying comprehensive testing to all code. This partial focus on critical areas achieves better reliability outcomes with reduced overall testing time and resources.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If test coverage is increased for all code lines uniformly, then overall test coverage percentage improves, but the specific coverage of highly utilized critical code lines may still be insufficient

Engineering Contradiction:
Improvetest coverage measurementVSAvoidcritical code line reliability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The system differentiates between general code coverage and critical code line coverage by applying usage-based weighting. Highly utilized code lines receive enhanced testing attention through computed usage weightings, ensuring their reliability is prioritized while maintaining overall coverage measurements.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent transforms the test coverage parameter from a uniform metric applied to all code lines to a differentiated metric based on code line usage weighting. This allows the system to identify and focus testing efforts on critical code lines that have high usage importance, ensuring their adequate coverage even when overall coverage is maintained.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11003572B2Traffic-based mutation/coverage testing requirements
Publication Date: 2021.05.11 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11003572B2 patent drawing
  • US11003572B2 patent drawing
  • US11003572B2 patent drawing

AI summary

An approach is provided in which the approach captures usage data corresponding to multiple users accessing a codebase that includes multiple code lines. The approach uses the captured usage data to compute a code line usage weighting for at least one of the code lines. The approach also computes a code line test coverage score for at least one code line based on at least one current software test program that tests the codebase. The approach compares the code line usage weighting against the code line test coverage score and flags the code line based on the comparison.