Automated Test Case Selection for Code Modification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional code testing methods are inefficient and labor-intensive, particularly in complex product development environments where regression testing is required for code modifications, leading to prolonged testing times and unstable testing efficiency.

Innovation Solution

A method that involves obtaining code modification information, program error information, and test case information, selecting a test case set associated with code modification records, and sorting multiple test cases to generate a test strategy that prioritizes the most effective test cases for current code fixes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual test case design and selection is used, then testers can develop comprehensive test coverage, but testing time and labor intensity increase significantly

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

Solution Approach 1:

The system enables automated test case selection and sorting by utilizing code modification information, program error information, and test case information to generate test strategies automatically, eliminating the need for manual test case design and selection while maintaining comprehensive coverage

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses program error information and code modification records as feedback to dynamically select and sort test cases, creating a closed-loop process where testing results inform future test case selection, thereby reducing redundant testing while ensuring comprehensive coverage

Inventive Principle:
Principle #23Feedback

2Reliability

If all test cases are executed for regression testing, then complete functional coverage is ensured, but testing efficiency decreases due to prolonged testing time

Engineering Contradiction:
Improvefunctional coverageVSAvoidtesting efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system extracts and selects only the relevant test cases from the complete test suite by analyzing code modification information and program error information, separating necessary test cases from unnecessary ones, thereby maintaining functional coverage while improving testing efficiency

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system performs partial testing by selecting a subset of test cases that are most relevant to code modifications and program errors, rather than executing all test cases, achieving sufficient functional coverage with reduced testing time and improved efficiency

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If manual checking of test case exceptions is performed, then detailed error analysis can be conducted, but labor intensity and time consumption increase

Engineering Contradiction:
Improveerror analysis accuracyVSAvoidlabor intensity
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The system replaces manual error analysis with automated processing by using program error information and code modification records to identify and analyze exceptions, maintaining detailed error analysis accuracy while significantly reducing labor intensity and time consumption

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS12253935B2Method, device, and computer program product for testing
Publication Date: 2025.03.18 DELL PROD LP
  • US12253935B2 patent drawing
  • US12253935B2 patent drawing
  • US12253935B2 patent drawing

AI summary

Embodiments of the present disclosure relate to a method, an electronic device, and a computer program product for testing. The method includes: obtaining code modification information, program error information, and test case information. The method further includes: selecting a first test case set associated with code modification records from the test case information according to the program error information. The method further includes: sorting multiple test cases in the first test case set to generate a test strategy for the code modification records. Embodiments of the present disclosure may select the best test case for current code fix to meet different test requirements and reduce the test time.