Test Case Generation Using Decision Tree and Condition Generator

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Black-box testing of software is inefficient due to the exponential number of calls required to exhaustively test all possible execution paths, making it costly in terms of time and computational resources.

Innovation Solution

A computer-implemented method and system that uses a decision tree built from input and output data to generate input instances, leveraging a condition generator model fine-tuned from a pre-trained programming language model to predict next conditions and discover new execution paths in the software code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If brute force search is employed to exhaustively test all possible execution paths, then test coverage is improved, but computational cost and time consumption increase exponentially

Engineering Contradiction:
Improvetest coverageVSAvoidtime consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by using a decision tree to pre-map the execution paths and their conditions before actual testing. The decision tree is built by analyzing input-output data pairs to understand the software's behavior patterns, allowing the system to generate targeted test cases that follow likely execution paths without exhaustively trying all possibilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary approach by using a condition generator model that acts as a mediator between the decision tree and test case generation. This model predicts the next conditions likely to occur in the code based on the decision tree structure, enabling intelligent navigation through execution paths without brute force enumeration.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If brute force search is employed to exhaustively test all possible execution paths, then test coverage is improved, but computational resources consumed increase exponentially

Engineering Contradiction:
Improvetest coverageVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by using a decision tree to pre-map the execution paths and their conditions before actual testing. The decision tree is built by analyzing input-output data pairs to understand the software's behavior patterns, allowing the system to generate targeted test cases that follow likely execution paths without exhaustively trying all possibilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary approach by using a condition generator model that acts as a mediator between the decision tree and test case generation. This model predicts the next conditions likely to occur in the code based on the decision tree structure, enabling intelligent navigation through execution paths without brute force enumeration.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If the number of software calls is reduced to improve efficiency, then computational resources are minimized, but test coverage may be compromised

Engineering Contradiction:
Improvetesting efficiencyVSAvoidtest coverage
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies feedback by continuously monitoring which execution paths are discovered through generated test cases and updating the decision tree accordingly. This feedback mechanism ensures that the system learns from each test execution and adapts its future test case generation to maximize coverage efficiency, avoiding redundant calls while maintaining comprehensive testing.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces an intermediary approach by using a condition generator model that acts as a mediator between the decision tree and test case generation. This model predicts the next conditions likely to occur in the code based on the decision tree structure, enabling intelligent navigation through execution paths without brute force enumeration.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12306743B2Test case generation
Publication Date: 2025.05.20 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12306743B2 patent drawing
  • US12306743B2 patent drawing
  • US12306743B2 patent drawing

AI summary

A processor can receive input data to a computer code and output data that the computer code produces corresponding to the input data. Based on the input data and the output data, the processor can build a decision tree that links input conditions to the output data. Using the input conditions, the processor can run a condition generator model created by fine-tuning a pre-trained programming language model, where the condition generator model predicts next condition that is likely to occur in the computer code. Based on the next condition, the processor can generate input instances and run the computer code using the generated input instances. Based on output instances output by the computer code based on the generated input instances, the processor can detect at least one flow path in the computer code, which had not been previously built in the decision tree.