IP Library › Granted Patent US 11,249,887
Granted Patent B2
US 11,249,887 · App. 16/998,224 · Granted Feb 15, 2022

Deep Q-network reinforcement learning for testing case selection and prioritization

Inventors: Jianwu Xu (Titusville, NJ); Haifeng Chen (West Windsor, NJ); Yuchen Bian (Santa Clara, CA)
G06F11/3684G06F11/3688G06F11/3692G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,249,887
App. No.
16/998,224
Granted
Feb 15, 2022
Kind
B2
Abstract

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.

Claims (184)

1. A computer implemented method for automated software test design and implementation, comprising:

establishing an initial pool of test cases for testing computer code;

applying the initial pool of test cases to the computer code in a testing environment to generate test results;

preprocessing the test results into a predetermined format;

extracting metadata from the test results, wherein the extracted metadata includes historical results from each of the test cases and a time duration for each of the test cases;

generating a training sequence, wherein the training sequence generates training samples from a software testing results dump file and the extracted metadata;

calculating a reward value for the pool of test cases, wherein the reward value is calculated using

r

=

{

∑

i

=

1

F

⁢

⁢

x

i

∈

F

x

⁢

i

F

*

P

if

⁢

⁢

F

,

P

≠

0

0

,

if

⁢

⁢

F

=

0

1

,

if

⁢

⁢

P

=

0

,

where F is the total number of failed testing cases,

P is the total number of passed testing cases, each x i is a member of a set of failed testing cases, and i is the index;

inputting the training sequence and reward value into a reinforcement learning agent to generate and output a vector value;

utilizing the vector 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.

2. The method as recited in claim 1 , further comprising selecting a subset of the set of available test cases based on the ranking assigned to each test case.

3. The method as recited in claim 1 , wherein preprocessing the test results includes converting the test results into a JSON (JavaScript Object Notation) format.

4. The method as recited in claim 1 , wherein the reinforcement learning agent selects and removes particular testing cases from the pool of test cases to form a revised subset of test cases.

5. A non-transitory computer readable storage medium comprising a computer readable program for a computer implemented automated software test design and implementation, wherein the computer readable program when executed on a computer causes the computer to perform the steps of:

establishing an initial pool of test cases for testing computer code;

applying the initial pool of test cases to the computer code in a testing environment to generate test results;

preprocessing the test results into a predetermined format;

extracting metadata from the test results, wherein the extracted metadata includes historical results from each of the test cases and a time duration for each of the test cases;

generating a training sequence, wherein the training sequence generates training samples from a software testing results dump file and the extracted metadata;

calculating a reward value, r, for the pool of test cases, wherein the reward value is calculated using

r

=

{

∑

i

=

1

F

⁢

⁢

x

i

∈

F

x

⁢

i

F

*

P

if

⁢

⁢

F

,

P

≠

0

0

,

if

⁢

⁢

F

=

0

1

,

if

⁢

⁢

P

=

0

,

where F is the total number of failed testing cases,

P is the total number of passed testing cases, each x i is a member of a set of failed testing cases, and i is the index;

inputting the training sequence and reward value into a reinforcement learning agent to generate and output a vector value;

utilizing the vector 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.

6. The method as recited in claim 5 , further comprising selecting a subset of the set of available test cases based on the ranking assigned to each test case.

7. The computer readable program as recited in claim 5 , wherein preprocessing the test results includes converting the test results into a JSON (JavaScript Object Notation) format.

8. The computer readable program as recited in claim 7 , wherein the reinforcement learning agent selects and removes particular testing cases from the pool of test cases to form a revised subset of test cases.

9. A system for automated software test design and implementation, comprising:

a computer system including:

random access memory configured to store an automated software test design and implementation system;

one or more processor devices and an operating system; and

a database configured to store an initial pool of test cases, wherein the automated software test design and implementation system comprises:

a tester configured to applying the initial pool of test cases to computer code to be tested in a testing environment to generate test results;

a preprocessor configured to preprocess the test results into a predetermined format;

an extractor configured to extract metadata from the test results, wherein the extracted metadata includes historical results from each of the test cases and a time duration for each of the test cases;

a sequence generator configured to generate a training sequence, wherein the training sequence is configured to generate training samples from a software testing results dump file and the extracted metadata;

a reward generator configured to calculate a reward value, r, for the pool of test cases, wherein the reward value is calculated using

r

=

{

∑

i

=

1

F

⁢

⁢

x

i

∈

F

x

⁢

i

F

*

P

if

⁢

⁢

F

,

P

≠

0

0

,

if

⁢

⁢

F

=

0

1

,

if

⁢

⁢

P

=

0

,

where F is the total number of failed testing cases,

P is the total number of passed testing cases, each x i is a member of a set of failed testing cases, and i is the index;

a learning agent configured to receive the training sequence and reward value and output a vector value;

a selector configured to utilize the vector value output from the reinforcement learning agent to produce a ranking list, prioritize the initial pool of test cases and one or more new test cases based on the ranking list, and apply 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.

10. The system as recited in claim 9 , further comprising selecting a subset of the set of available test cases based on the ranking assigned to each test case.

11. The system as recited in claim 9 , wherein preprocessing the test results includes converting the test results into a JSON (JavaScript Object Notation) format.

12. The system as recited in claim 9 , wherein the reinforcement learning agent selects and removes particular testing cases from the pool of test cases to form a revised subset of test cases.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2021
From: NEC LABORATORIES AMERICA, INC.
To: NEC CORPORATION
Reel/Frame 058367/0285 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 20, 2020
From: XU, JIANWU; CHEN, HAIFENG; BIAN, YUCHEN
To: NEC LABORATORIES AMERICA, INC.
Reel/Frame 053551/0520 →
Continuity (3)
Provisional Application 62910870 · Oct 4, 2019
Provisional Application 62892040 · Aug 27, 2019
Related Publication 20210064515A1 · Mar 4, 2021
Cited By (1)
US 12,420,955