# US 2026/0030142 A1 · Software development efficiency improvement engine

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

- Number: US 2026/0030142 A1
- Document ID: US20260030142A1
- Status: Published application
- Kind: A1
- Application number: 18/781,782
- Filed: 2024-07-23
- Published: 2026-01-29
- Earliest claimed: 2024-07-23
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Rupam Ojha; Priyanka Aggarwal; Apurba Ghosh; Srinivasan Ramanathan; Nirmala Shettar; Inayath Mohamed
- Web page: https://patentgrep.com/patent/US20260030142A1

## CPC

- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 8/30: Creation or generation of source code
- G06F 8/433: {Dependency analysis; Data or control flow analysis}
- G06F 8/77: Software metrics
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In a first use case, a description of source code to be created is validated and used to form a prompt for a large language model (LLM). The prompt is provided to the LLM to generate an output. The output from the LLM is post-processed to generate the source code. In a second use case, a source code file is processed and provided, along with instructions, to an LLM. The LLM provides a list of the methods in the source code file. The LLM is requested to provide a unit test for each of the listed methods. The output from the LLM is post-processed to generate unit tests for the methods in the identified source code file. In a third use case, the LLM is used to generate unit tests for new methods added to the source code file after unit tests were generated.

## Claims

### Claim 1

A system for generating unit code tests, the system comprising:
a memory that stores instructions; and
one or more processors coupled to the memory and configured to execute the instructions to perform operations comprising:
determining, for a source code file, a plurality of dependencies, each dependency being a file on which the source code file depends;
generating a string comprising contents of the source code file and contents of the plurality of dependencies;
determining a plurality of methods defined by the source code file;
generating a first message that comprises a first context setting portion, the generated string, and a first prompt;
receiving, from a large language model (LLM) in response to the first message, a list of test cases to cover the plurality of methods; and
for each method of the plurality of methods:
generating a second message that comprises a second context setting portion, the generated string, the list of test cases, and a second prompt; and
receiving, from the LLM in response to the second message, a unit code test for the method.

### Claim 2 (depends on 1)

The system of claim 1, wherein the first context setting portion identifies a programming language of the source code file.

### Claim 3 (depends on 1)

The system of claim 1, wherein the second prompt identifies the method.

### Claim 4 (depends on 1)

The system of claim 1, wherein the second prompt is determined based on a programming language of the source code file.

### Claim 5 (depends on 1)

The system of claim 1, wherein the second prompt is determined based on whether the method is a user interface (UI) method or a backend method.

### Claim 6 (depends on 1)

The system of claim 1, wherein the determining, for the source code file, the plurality of dependencies comprises:
removing all newline characters from the source code file;
generating a file list comprising all files imported into the source code file; and
for each file in the file list, if the file is accessible, adding the file to the plurality of dependencies.

### Claim 7 (depends on 1)

The system of claim 1, wherein the operations further comprise:
determining an updated plurality of dependencies for a modified version of the source code file that includes a code portion that was not included in the source code file when it was used to generate the unit code tests;
generating a second string comprising contents of the modified version of the source code file and contents of the updated plurality of dependencies;
generating a third message that comprises a third context setting portion, the second string, the unit code tests generated for the methods of the source code file, the code portion, and a third prompt; and
receiving, from the LLM in response to the third message, unit code tests for one or more methods in the code portion.

### Claim 8 (depends on 1)

The system of claim 1, wherein the operations further comprise:
receiving, via a user interface, information for a project, the information comprising a project name, a project scope, a persona, and a user story;
based on the project name, the project scope, the persona, and the user story, generating a third message that comprises a third context setting portion and a third prompt; and
receiving, from the LLM in response to the third message, source code to implement the project.

### Claim 9

A non-transitory computer-readable medium that stores instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
determining, for a source code file, a plurality of dependencies, each dependency being a file on which the source code file depends;
generating a string comprising contents of the source code file and contents of the plurality of dependencies;
determining a plurality of methods defined by the source code file;
generating a first message that comprises a first context setting portion, the generated string, and a first prompt;
receiving, from a large language model (LLM) in response to the first message, a list of test cases to cover the plurality of methods; and
for each method of the plurality of methods:
generating a second message that comprises a second context setting portion, the generated string, the list of test cases, and a second prompt; and
receiving, from the LLM in response to the second message, a unit code test for the method.

### Claim 10 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the first context setting portion identifies a programming language of the source code file.

### Claim 11 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the second prompt identifies the method.

### Claim 12 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the second prompt is determined based on a programming language of the source code file.

### Claim 13 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the second prompt is determined based on whether the method is a user interface (UI) method or a backend method.

### Claim 14 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the determining, for the source code file, the plurality of dependencies comprises:
removing all newline characters from the source code file;
generating a file list comprising all files imported into the source code file; and
for each file in the file list, if the file is accessible, add the file to the plurality of dependencies.

### Claim 15 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the operations further comprise:
determining an updated plurality of dependencies for a modified version of the source code file that includes a code portion that was not included in the source code file when it was used to generate the unit code tests;
generating a second string comprising contents of the modified version of the source code file and contents of the updated plurality of dependencies;
generating a third message that comprises a third context setting portion, the second string, the unit code tests generated for the methods of the source code file, the code portion, and a third prompt; and
receiving, from the LLM in response to the third message, unit code tests for one or more methods in the code portion.

### Claim 16 (depends on 9)

The non-transitory computer-readable medium of claim 9, wherein the operations further comprise:
receiving, via a user interface, information for a project, the information comprising a project name, a project scope, a persona, and a user story;
based on the project name, the project scope, the persona, and the user story, generating a third message that comprises a third context setting portion and a third prompt; and
receiving, from the LLM in response to the third message, source code to implement the project.

### Claim 17

A method comprising:
determining, for a source code file, a plurality of dependencies, each dependency being a file on which the source code file depends;
generating, by one or more processors, a string comprising contents of the source code file and contents of the plurality of dependencies;
determining a plurality of methods defined by the source code file;
generating a first message that comprises a first context setting portion, the generated string, and a first prompt;
receiving, from a large language model (LLM) in response to the first message, a list of test cases to cover the plurality of methods; and
for each method of the plurality of methods:
generating a second message that comprises a second context setting portion, the generated string, the list of test cases, and a second prompt; and
receiving, from the LLM in response to the second message, a unit code test for the method.

### Claim 18 (depends on 17)

The method of claim 17, wherein the first context setting portion identifies a programming language of the source code file.

### Claim 19 (depends on 17)

The method of claim 17, wherein the second prompt identifies the method.

### Claim 20 (depends on 17)

The method of claim 17, wherein the second prompt is determined based on a programming language of the source code file.
