Code Testing Method for Reducing Test Case Redundancy
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional software testing methods face inefficiencies due to repeated testing of the same operations, inadequate measurement of input interactions, exponential increase in test cases with test points, static test coverage, and reliance on expert selection, which limits test coverage and resource utilization.
Innovation Solution
A method and device for testing code that identify and assign multiple test values to test points, compare target test cases with existing sets, and exclude redundant cases to achieve higher test coverage with fewer test cases by focusing on combinations of test values, allowing for dynamic inclusion or exclusion based on coverage of interactions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the number of test points increases to cover more functionality, then test coverage is improved, but the amount of test cases increases exponentially
Solution Approach 1:
The patent combines multiple test cases by identifying common test value combinations across them. When test cases share identical test value assignments for two or more test points, they are merged into a single representative test case, eliminating redundancy while preserving coverage of all test point combinations.
Solution Approach 2:
The patent transforms the test case set by changing the parameters of test value combinations. It identifies and removes duplicate parameter combinations (test values for test points) across different test cases, keeping only unique combinations that provide distinct coverage, thereby reducing the total number of test cases needed.
2Reliability
If all possible test cases are executed to ensure complete coverage, then test coverage is maximized, but time consumption increases
Solution Approach 1:
The patent extracts and removes redundant test cases from the complete test case set. By analyzing test value combinations and identifying cases that duplicate coverage already provided by other test cases, it extracts only the essential unique test cases needed for comprehensive coverage, eliminating unnecessary time-consuming executions.
3Productivity
If manual selection of test cases is used to reduce testing workload, then testing efficiency is improved, but test coverage becomes insufficient
Solution Approach 1:
The patent implements self-service by automatically analyzing the test case set and identifying redundant cases through algorithmic comparison of test value combinations. The system performs self-optimization by automatically determining which test cases to remove based on coverage analysis, eliminating the need for manual expert judgment while ensuring comprehensive coverage is maintained.
Data Source
AI summary
A method, device, and computer program product for testing code. The method includes identifying a plurality of test points in the code and a plurality of test values to be assigned to the plurality of test points. At least one of the plurality of test points is to be assigned with two or more test values. The method also includes comparing a target test case with a set of test cases. The target test case and the set of test cases are associated with the plurality of test points. The method further includes, in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the set of test cases, excluding the target test case from the set of test cases.


