# US 2026/0064571 A1 · Generating Test Suites For Testing Code Modules

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064571 A1
- Document ID: US20260064571A1
- Status: Published application
- Kind: A1
- Application number: 18/936,052
- Filed: 2024-11-04
- Published: 2026-03-05
- Earliest claimed: 2024-09-05
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Mahinthan Chandramohan; Meng Chen; Jovan Jancic; Cong Duy Vu Hoang; Padmanabhan Krishnan; Mahdi Kazemi Moghaddam; Philip Arthur; Don Dharmasiri; Thanh Long Duong
- Web page: https://patentgrep.com/patent/US20260064571A1

## CPC

- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system accesses a code module that includes one or more units of code and instructs a machine learning model to generate a test suite based on a specification for the code module. The test suite includes tests for testing the code module to verify that one or more units of code successfully execute in accordance with the specification. The specification includes preconditions that precede successful execution of the one or more units of code and postconditions that exist following successful execution of the one or more units of code. The machine learning model generates the test suite. The system receives the test suite from the machine learning model. The system stores and/or transmits the test suite for use in testing the code module.

## Claims

### Claim 1

One or more non-transitory computer-readable media comprising instructions that, when executed by one or more hardware processors, cause performance of operations comprising:
accessing a code module comprising one or more units of code;
constructing one or more input prompts for a machine learning system comprising one or more machine learning models, the one or more input prompts instructing the machine learning system to generate, based on a specification for the code module, a test suite comprising a set of tests for testing the code module to verify that one or more units of code successfully execute in accordance with the specification,
wherein the specification comprises (a) one or more preconditions that precede successful execution of the one or more units of code and (b) one or more postconditions that exist following successful execution of the one or more units of code;
directing the one or more input prompts to the machine learning system, wherein the machine learning system receives the one or more input prompts and generates the test suite in response to receiving the one or more input prompts;
receiving, from the machine learning system, a set of one or more outputs comprising the test suite;
storing and/or transmitting the test suite for use in testing the code module.

### Claim 2 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein, based on the one or more input prompts:
the machine learning system generates a first plain language explanation of the specification based at least in part on a set of one or more examples comprising an example code module and an example formal specification for the example code module; and
the machine learning system generates the test suite based at least in part on the first plain language explanation of the specification.

### Claim 3 (depends on 2)

The one or more non-transitory computer-readable media of claim 2,
wherein the machine learning system generates a second plain language explanation of a set of edge cases based at least in part on the set of one or more examples; and
wherein the machine learning system generates the test suite based at least in part on the second plain language explanation of the set of edge cases.

### Claim 4 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein constructing the one or more input prompts comprises:
constructing a first input prompt comprising a first instruction for a first machine learning model to generate the specification for the code module based at least in part on an example code module and an example formal specification corresponding to the example code module.

### Claim 5 (depends on 4)

The one or more non-transitory computer-readable media of claim 4, wherein the first input prompt comprises:
a second instruction for the first machine learning model to include, when generating the specification for the code module, at least one of:
one or more method signatures corresponding to the one or more units of code, or
one or more method declarations corresponding to the one or more units of code; and
a third instruction for the first machine learning model to refrain from including, when generating the specification for the code module, the one or more units of code.

### Claim 6 (depends on 4)

The one or more non-transitory computer-readable media of claim 4, wherein the first input prompt comprises:
a second instruction for the first machine learning model to generate a plain language explanation of the specification; and
a third instruction for the first machine learning model to generate (i) a first plain language description of the set of tests, and (ii) a second plain language description of a set of expected outputs of the one or more units of code when executing the set of tests.

### Claim 7 (depends on 4)

The one or more non-transitory computer-readable media of claim 4, wherein constructing the one or more input prompts comprises:
constructing a second input prompt comprising the specification and a second instruction for a second machine learning model to generate the test suite based on the specification.

### Claim 8 (depends on 7)

The one or more non-transitory computer-readable media of claim 7, wherein the specification comprises a plain language description of a formal specification.

### Claim 9 (depends on 7)

The one or more non-transitory computer-readable media of claim 7, wherein the second input prompt comprises:
a first plain language description of the set of tests, and
a second plain language description of a set of expected outputs of the one or more units of code when executing the set of tests.

### Claim 10 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein constructing the one or more input prompts comprises:
constructing an input prompt for the machine learning system, the input prompt comprising the code module and a set of instructions for the machine learning system to generate the test suite based on the specification for the code module,
wherein the machine learning system utilizes chain of through reasoning to generate the test suite based on the input prompt.

### Claim 11 (depends on 10)

The one or more non-transitory computer-readable media of claim 10, wherein the set of instructions comprises:
a first instruction to generate the specification; and
a second instruction to generate the test suite based on the specification.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable media of claim 11,
wherein the first instruction further instructs a machine learning model to generate a description of the set of tests; and
wherein the second instruction instructs the machine learning model to generate the test suite further based on the description of the set of tests.

### Claim 13 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein the operations comprise:
constructing a first input prompt for a first machine learning model, the first input prompt comprising the code module and a first set of instructions for the first machine learning model to generate the specification for the code module;
receiving, from the first machine learning model, a first output comprising the specification for the code module;
constructing a second input prompt for a second machine learning model, the second input prompt comprising the specification, the code module, and a second set of instructions for the second machine learning model to generate the test suite for the code module based on the specification for the code module; and
receiving, from the second machine learning model, a second output comprising the test suite.

### Claim 14 (depends on 13)

The one or more non-transitory computer-readable media of claim 13,
wherein the first set of instructions further instruct the first machine learning model to generate a description of the set of tests;
wherein the first output further comprises the description of the set of tests; and
wherein the second input prompt further comprises the description of the set of tests and wherein the second set of instructions further instruct the second machine learning model to generate the test suite further based on the description of the set of tests.

### Claim 15 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein the operations further comprise:
generating a training example comprising:
a training input of a first machine learning model and a training output of the first machine learning model corresponding to the training input,
the first machine learning model utilized in a multi-prompt process to generate, based on a first training specification for a training code module, a first training test suite comprising a first set of training tests for testing the training code module; and
a training prompt for training a second machine learning model to generate the test suite based on a single input prompt;
utilizing the training example to train the second machine learning model to generate the test suite based on the single input prompt.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15,
wherein the training input comprises the training code module;
wherein the training output comprises:
the first training specification generated in the multi-prompt process;
the first training test suite generated based on the first training specification;
wherein the training prompt comprises:
a first training instruction to generate a second training specification for the training code module,
a second training instruction to generate, based on the second training specification, a second training test suite comprising a second set of training tests for testing the training code module.

### Claim 17 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein the set of tests comprises a set of unit tests for execution upon the code module to evaluate a set of edge cases.

### Claim 18 (depends on 1)

The one or more non-transitory computer-readable media of claim 1, wherein a computing device component accesses the test suite and the code module, executes the set of tests upon the code module, and generates a set of test results based on the set of tests executed upon the code module, and, wherein the test suite comprises code for executing the set of tests on the code module.

### Claim 19

A method, comprising:
accessing a code module comprising one or more units of code;
constructing one or more input prompts for a machine learning system comprising one or more machine learning models, the one or more input prompts instructing the machine learning system to generate, based on a specification for the code module, a test suite comprising a set of tests for testing the code module to verify that one or more units of code successfully execute in accordance with the specification,
wherein the specification comprises (a) one or more preconditions that precede successful execution of the one or more units of code and (b) one or more postconditions that exist following successful execution of the one or more units of code;
directing the one or more input prompts to the machine learning system, wherein the machine learning system receives the one or more input prompts and generates the test suite in response to receiving the one or more input prompts;
receiving, from the machine learning system, a set of one or more outputs comprising the test suite;
storing and/or transmitting the test suite for use in testing the code module;
wherein the method is performed by at least one device including a hardware processor.

### Claim 20

A system comprising:
at least one device including a hardware processor;
the system being configured to perform operations comprising:
accessing a code module comprising one or more units of code;
constructing one or more input prompts for a machine learning system comprising one or more machine learning models, the one or more input prompts instructing the machine learning system to generate, based on a specification for the code module, a test suite comprising a set of tests for testing the code module to verify that one or more units of code successfully execute in accordance with the specification,
wherein the specification comprises (a) one or more preconditions that precede successful execution of the one or more units of code and (b) one or more postconditions that exist following successful execution of the one or more units of code;
directing the one or more input prompts to the machine learning system, wherein the machine learning system receives the one or more input prompts and generates the test suite in response to receiving the one or more input prompts;
receiving, from the machine learning system, a set of one or more outputs comprising the test suite;
storing and/or transmitting the test suite for use in testing the code module.
