Test Case Generation Using Decision Tree and Condition Generator
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
3Productivity
If the number of software calls is reduced to improve efficiency, then computational resources are minimized, but test coverage may be compromised
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.
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.
Data Source
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.


