Deep Q-Network Test Case Prioritization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing automated software testing methods are inefficient in selecting and prioritizing test cases, often missing relevant code portions due to deterministic approaches that fail to adapt to changing software environments and resource constraints, leading to suboptimal code coverage and increased time and resource expenditure.

Innovation Solution

A computer-implemented method and system utilizing reinforcement learning to automatically design and implement software test cases, where an initial pool of test cases is prioritized based on historical results, using a deep Q-network framework to generate a ranking list that adapts to the testing environment, ensuring optimal test case selection and prioritization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If deterministic approaches are used for test case selection, then the testing process is simple and predictable, but the code coverage is suboptimal and relevant code portions are missed

Engineering Contradiction:
Improvecode coverageVSAvoidtesting process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces deterministic mechanical selection methods with a reinforcement learning-based intelligent system. The deep Q-network learns optimal test case selection strategies through interaction with the testing environment, substituting rigid deterministic rules with adaptive intelligent decision-making that improves code coverage while managing complexity through automated learning.

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

Solution Approach 2:

The patent changes the selection criteria parameters from fixed deterministic rules to dynamic values learned through reinforcement learning. The system adjusts selection parameters based on observed testing outcomes and code coverage metrics, transforming static selection logic into adaptive parameter-driven selection that responds to changing testing conditions.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If exhaustive testing is performed to maximize code coverage, then testing completeness is improved, but time and resource expenditure increase

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

Solution Approach 1:

The patent applies partial action by selecting a prioritized subset of test cases rather than executing all possible tests exhaustively. The reinforcement learning system identifies and executes only the most valuable test cases that provide maximum code coverage benefit, avoiding redundant testing while maintaining testing completeness through intelligent selection rather than brute-force enumeration.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system performs self-service by automatically learning and optimizing test case selection strategies without human intervention. The deep Q-network autonomously improves testing efficiency through continuous learning from testing outcomes, automatically adapting to prioritize test cases that maximize code coverage while minimizing time and resource consumption.

Inventive Principle:
Principle #25Self-service

3Productivity

If reinforcement learning is used for test case prioritization, then testing efficiency is improved, but computational complexity and resource requirements increase

Engineering Contradiction:
Improvetesting efficiencyVSAvoidcomputational complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the complex computational burden of reinforcement learning into a separate training phase that occurs independently from the actual testing execution. The deep Q-network is trained offline on historical testing data, and once trained, provides efficient real-time recommendations during testing. This separation extracts complexity from the time-critical testing path while maintaining productivity benefits during the offline training phase.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11249887B2Deep Q-network reinforcement learning for testing case selection and prioritization
Publication Date: 2022.02.15 NEC CORP
  • US11249887B2 patent drawing
  • US11249887B2 patent drawing
  • US11249887B2 patent drawing

AI summary

Systems and methods for automated software test design and implementation. The system and method being able to establish an initial pool of test cases for testing computer code; apply the initial pool of test cases to the computer code in a testing environment to generate test results; preprocess the test results into a predetermined format; extract metadata from the test results; generate a training sequence; calculate a reward value for the pool of test cases; input the training sequence and reward value into a reinforcement learning agent; utilizing the value output from the reinforcement learning agent to produce a ranking list; prioritizing the initial pool of test cases and one or more new test cases based on the ranking list; and applying the prioritized initial pool of test cases and one or more new test cases to the computer code in a testing environment to generate test results.