Metadata-Driven Test Selection for CI Build Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In continuous integration environments, the increasing volume of tests during frequent builds in large software development projects hinders quick turnaround times, as all tests are typically executed, even though only a subset may be affected by code changes, leading to inefficient resource utilization and delayed detection of regressions.

Innovation Solution

A method and system that select a subset of tests to run based on metadata and user-defined rules, leveraging a rule-based system to prioritize and rationalize test execution, focusing on impacted areas and optimizing resource allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all tests are executed during each build cycle, then test coverage is comprehensive, but build time and resource utilization deteriorate

Engineering Contradiction:
Improvetest coverageVSAvoidbuild time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The test suite is segmented into multiple test cases, each associated with metadata indicating the software component it tests. The build system segments the execution by selecting only those test cases whose metadata matches the changed components, rather than executing the entire test suite. This segmentation allows comprehensive testing of affected areas while avoiding unnecessary execution of unrelated tests.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system applies local quality by tailoring the test execution strategy to the specific changes made in each build. Instead of uniform execution of all tests, the system selectively executes only the relevant subset of tests based on the relationship between changed components and test metadata. This localized approach ensures adequate test coverage for affected areas while reducing overall build time.

Inventive Principle:
Principle #3Local quality

2Reliability

If all tests are executed during each build cycle, then regression detection is thorough, but resource utilization deteriorates

Engineering Contradiction:
Improveregression detectionVSAvoidresource utilization
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The test suite is segmented into multiple test cases, each associated with metadata indicating the software component it tests. The build system segments the execution by selecting only those test cases whose metadata matches the changed components, rather than executing the entire test suite. This segmentation allows comprehensive testing of affected areas while avoiding unnecessary execution of unrelated tests.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs partial action by executing only the necessary subset of tests required to detect regressions in changed components, rather than executing the full test suite. The metadata-driven selection ensures that the partial execution still achieves thorough regression detection for affected areas, eliminating waste of computational resources on unrelated tests.

Inventive Principle:
Principle #16Partial or excessive action

3Loss of time

If frequent builds are performed, then early feedback is provided, but test execution volume increases

Engineering Contradiction:
Improvefeedback timeVSAvoidtest execution volume
Core Design Contradiction:
Loss of timeVSQuantity of substance

Solution Approach 1:

The test suite is segmented into multiple test cases, each associated with metadata indicating the software component it tests. The build system segments the execution by selecting only those test cases whose metadata matches the changed components, rather than executing the entire test suite. This segmentation allows comprehensive testing of affected areas while avoiding unnecessary execution of unrelated tests.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs partial action by executing only the necessary subset of tests required to detect regressions in changed components, rather than executing the full test suite. The metadata-driven selection ensures that the partial execution still achieves thorough regression detection for affected areas, eliminating waste of computational resources on unrelated tests.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9734043B2Test selection
Publication Date: 2017.08.15 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9734043B2 patent drawing
  • US9734043B2 patent drawing
  • US9734043B2 patent drawing

AI summary

In a method for selecting one or more tests for a compiled software module, a processor detects that one or more changes have been made to source code for a software module. A processor compiles the source code for the software module. A processor accesses a set of tests for the software module. A processor accesses metadata for each test of the set of tests. A processor receives a first set of one or more rules describing logical conditions relative to the metadata for the tests. A processor selects at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules.