ANN Program Testing Using Deviation Ranking for Black-Box Defects

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software testing methods, particularly black-box testing, struggle to effectively identify errors in programs with unknown functions and structures, especially when source code is not disclosed, leading to inefficient and resource-intensive testing processes.

Innovation Solution

An ANN-based program testing method using a BP neural network to construct a test model, train it with input and output values, select random input values, compute test output values, compare with actual outputs, and identify deviations to pinpoint potential errors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If exhaustive input testing is used to find all errors in a program, then testing completeness is improved, but testing cost and time become infinite and impractical

Engineering Contradiction:
Improvetesting completenessVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by using ANN to learn from a subset of training samples rather than exhaustively testing all possible inputs. The system processes only n training samples (where n is much smaller than the total possible input combinations) to construct the test model, achieving practical testing completeness without infinite time cost.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent creates a copy of the target program's behavior through the ANN test model. Instead of directly testing the original program with exhaustive inputs, the system trains an ANN model to replicate the program's input-output relationships, then uses this copied behavior for efficient testing and error detection.

Inventive Principle:
Principle #26Copying

2Productivity

If random input values are used for testing, then testing speed is improved, but error detection accuracy deteriorates

Engineering Contradiction:
Improvetesting speedVSAvoiderror detection accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent applies preliminary action by pre-training the ANN model with n training samples before actual testing. This preliminary learning phase enables the model to understand the program's behavior patterns, so that subsequent random input testing becomes more effective at detecting errors while maintaining high speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses feedback by comparing the ANN model's output with the actual program output for each test input. When deviations are detected between model predictions and actual results, this feedback indicates potential errors in the target program, thereby improving error detection accuracy while maintaining fast random testing.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If more training samples are used to train the ANN model, then model accuracy is improved, but training time and resource consumption increase

Engineering Contradiction:
Improvemodel accuracyVSAvoidtraining time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent determines an optimal sample size n for training that provides sufficient model accuracy without excessive training time. This partial action principle is applied by selecting a specific number of training samples that balances model learning effectiveness with practical time constraints, avoiding both insufficient training and wasteful over-training.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12468950B2ANN-based program testing method, testing system and application
Publication Date: 2025.11.11 ZUNYI VOCATIONAL & TECH COLLEGE
  • US12468950B2 patent drawing
  • US12468950B2 patent drawing
  • US12468950B2 patent drawing

AI summary

An artificial neural network (ANN)-based program testing method, which tests a target program on which functions and codes are run. The method includes constructing a test model by means of an ANN, then inputting input values of a target program into the test model, and computing test output values according to the test model; then inputting the input values into the target program so as to obtain actual output values; and selecting, according to deviations between the test output values and the actual output values that correspond to the same input values, input values corresponding to top-ranked 50 to 150 deviations, transmitting the selected input values to the target program for running, comparing running results with an actual functional requirement, and determining that the target program has a defect under the condition that one of the running results does not satisfy the actual functional requirement.