Code Change Coverage Ranking for Regression Test Prioritization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In software development, running regression tests on large and complex codebases is resource-intensive, time-consuming, and becomes increasingly costly and ineffective over time, as it covers the same features and codebase repeatedly, leading to test complexity and brittleness.

Innovation Solution

The CoverageRank technique analyzes code coverage data to prioritize and recommend a subset of tests based on actual lines and functions modified, focusing on the most critical and changing parts of the codebase, thereby reducing the number of tests needed to ensure quality and efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all regression tests are run on the entire codebase, then comprehensive test coverage is achieved, but testing time and resource consumption increase significantly

Engineering Contradiction:
Improvetest coverageVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the test suite into different priority levels based on code coverage analysis. Tests are divided into critical tests (covering modified lines) and non-critical tests (covering unchanged lines), allowing selective execution to reduce testing time while maintaining essential coverage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by focusing testing resources on specific high-impact areas (modified code lines) rather than uniformly testing the entire codebase. This concentrates testing effort where it is most needed while reducing effort in stable areas.

Inventive Principle:
Principle #3Local quality

2Reliability

If the full test suite is executed, then all code paths are verified, but resource consumption and cost increase

Engineering Contradiction:
Improvecode verificationVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent implements partial action by executing only the necessary subset of tests (those covering modified lines) rather than the complete test suite. This provides sufficient verification for the changed code without the excessive resource consumption of running all tests.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent changes the parameter of test selection from binary (run all or run none) to a graded approach based on coverage ratios. Tests are selected dynamically based on their coverage of modified lines, adjusting the testing scope to match the actual change magnitude.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If comprehensive regression testing is performed, then defects are detected, but test complexity and brittleness increase over time

Engineering Contradiction:
Improvedefect detectionVSAvoidtest complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts and isolates the essential testing requirement (testing modified lines) from the unnecessary complexity of running the entire test suite. This separates critical defect detection capabilities from the bloat of comprehensive but redundant testing.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces dynamics by making the test suite executable size adaptive rather than static. The number of tests executed changes dynamically based on the extent of code modifications, reducing brittleness and allowing the testing process to flex with project needs.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11513944B1Ranking tests based on code change and coverage
Publication Date: 2022.11.29 EMC IP HLDG CO LLC
  • US11513944B1 patent drawing
  • US11513944B1 patent drawing
  • US11513944B1 patent drawing

AI summary

A system can determine a group of changed lines in a file comprising computer-executable instructions. The system can, for the respective changed lines, produce a mapping that identifies respective tests that test the respective changed lines. The system can, from the mapping and for the respective tests, determine a merge that identifies respective ones of the respective changed lines that are tested by the respective tests. The system can, from the merge and for the respective tests of the group of tests, determine respective coverage ratios that represent respective ratios between the respective ones of the respective changed lines of the group of changed lines that are tested by the respective tests and respective total changed lines in the file. The system can select an updated group of tests from the group of tests based on the respective ratios.