Automated Test Selection for Code Changes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In enterprise computing environments, running the entire suite of test cases manually or automatically after code changes is inefficient, as it is not necessary to run all test cases, especially when only a few features are impacted by the code change, leading to wasted time and resources.

Innovation Solution

Implementing a system that automatically identifies and executes only the test cases related to the changed features by monitoring code changes in a source code repository, using a distributed computing architecture to run tests in parallel, and generating a cohesive report for developers, which can be sent via email or web link, thereby reducing execution time and providing immediate feedback.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the entire suite of test cases is executed after code changes, then comprehensive testing coverage is achieved, but test execution time and resource consumption increase significantly

Engineering Contradiction:
Improvetesting coverageVSAvoidtest execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the complete test suite into individual test cases and further groups them by feature. When code changes are detected, only the test cases corresponding to the affected features are executed, rather than running the entire test suite. This segmentation allows selective execution of relevant tests, reducing execution time while maintaining adequate coverage of changed functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by tailoring the testing approach to the specific code changes made. Instead of uniform testing of all features, the system identifies which specific features are impacted by the code changes and executes only those relevant test cases. This localized testing approach optimizes resource allocation by focusing testing efforts where they are most needed.

Inventive Principle:
Principle #3Local quality

2Reliability

If the entire suite of test cases is executed after code changes, then all potential errors are detected, but enterprise resources are wasted

Engineering Contradiction:
Improveerror detectionVSAvoidenterprise resources
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent extracts and identifies the specific features that are impacted by code changes using change detection mechanisms. By extracting only the relevant feature information from the code diff, the system can then select and execute only the test cases that correspond to those affected features, rather than executing the entire test suite. This extraction approach eliminates unnecessary test executions and conserves enterprise resources.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by executing only the necessary subset of test cases rather than the complete suite. The system determines the minimum required testing scope based on code changes and executes only those test cases that are relevant to the changed features, avoiding excessive testing of unchanged functionality and thereby conserving computational resources.

Inventive Principle:
Principle #16Partial or excessive action

3Ease of operation

If manual testing is performed for code changes, then flexibility in test execution is maintained, but testing efficiency and speed decrease

Engineering Contradiction:
Improvetesting flexibilityVSAvoidtesting efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent implements self-service by automating the test case selection and execution process. The system automatically detects code changes, identifies affected features, selects relevant test cases, and executes them without requiring manual intervention. This automation maintains operational simplicity for developers while dramatically improving testing efficiency and speed compared to manual testing approaches.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent incorporates feedback mechanisms that automatically notify developers of test results immediately after execution. The system provides real-time feedback on whether the code changes passed or failed the relevant tests, enabling rapid iteration and continuous integration. This automated feedback loop maintains ease of operation while significantly enhancing testing productivity.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10430319B1Systems and methods for automatic software testing
Publication Date: 2019.10.01 FMR CORP
  • US10430319B1 patent drawing
  • US10430319B1 patent drawing
  • US10430319B1 patent drawing

AI summary

A method of testing source code for a computer application includes: monitoring a source code repository to detect when a changed version of one or more source code files is saved to the repository; identifying, for a source code file that has changed, one or more changed features of the file, by comparing a changed version of the file with a previous version of the file; generating, based on the one or more changed features, a source code artifact for use in testing the file; generating, based on the source code artifact, a test case framework artifact for use in testing the file; executing one or more test cases based on the one or more changed features, the source code artifact, and the test case framework artifact; and compiling a report including details of the executed test cases.