# US 2025/0094324 A1 · Intelligent generation of unit tests

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

- Number: US 2025/0094324 A1
- Document ID: US20250094324A1
- Status: Published application
- Kind: A1
- Application number: 18/469,361
- Filed: 2023-09-18
- Published: 2025-03-20
- Earliest claimed: 2023-09-18
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Wulf Kruempelmann; Claudia Conrad; Susanne Schott
- Web page: https://patentgrep.com/patent/US20250094324A1

## 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 11/3692: {for test results analysis}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Arrangements for intelligent generation of unit tests are provided. A facade of a method of a class isolating code from a subsystem may be generated. The facade may include input variables and output variables. The facade of the method may be parsed to identify allowed input values for the input variables and expected output values for the output variables. User input specifying one or more parameters for the input variables may be received based on the identified allowed input values. Based on the received user input, a database table with every combination of the input variables with the output variables may be populated and stored in a data store. A unit test method may be executed on each row of the database table. Outputs of the unit test method may be compared to corresponding expected output values in the database table to determine whether there is a match.

## Claims

### Claim 1

A system, comprising:
at least one data processor; and
at least one memory storing instructions, which when executed by the at least one data processor, result in operations comprising:
generating a facade of a method of a class, wherein the facade comprises input variables and output variables, and wherein the facade isolates code from a subsystem;
parsing the facade of the method, wherein the parsing identifies allowed input values for the input variables and expected output values for the output variables;
receive user input specifying one or more parameters for the input variables based on the identified allowed input values for the input variables;
based on the received user input, populating a database table with every combination of the input variables with the output variables;
storing the database table in a data store;
executing a unit test method on each row of the database table;
comparing outputs of the unit test method to corresponding expected output values in the database table; and
determining whether the outputs of the unit test method match the corresponding expected output values in the database table.

### Claim 2 (depends on 1)

The system of claim 1, further comprising:
receiving additional user input modifying the one or more parameters for the input variables, wherein the modifying comprises specifying one or more additional parameters associated with additional use cases;
based on the received additional user input, repopulating the database table with every combination of the input variables with the output variables; and
storing the database table in the data store.

### Claim 3 (depends on 1)

The system of claim 1, wherein determining whether the outputs of the unit test method match the corresponding expected output values in the database table comprise determining a degree of similarity between each output of the unit test method and each corresponding expected output value.

### Claim 4 (depends on 1)

The system of claim 1, further comprising:
based on determining one or more outputs of the unit test method fail to match a corresponding expected output value, transmitting a notification to a computing device.

### Claim 5 (depends on 1)

The system of claim 1, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving a plurality of fixed values.

### Claim 6 (depends on 1)

The system of claim 1, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving a list of character strings.

### Claim 7 (depends on 1)

The system of claim 1, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving one or more constraints specifying a range of values.

### Claim 8 (depends on 7)

The system of claim 7, wherein the range of values comprises one or more of a lower limit and an upper limit.

### Claim 9

A computer-implemented method, comprising:
generating a facade of a method of a class, wherein the facade comprises input variables and output variables, and wherein the facade isolates code from a subsystem;
parsing the facade of the method, wherein the parsing identifies allowed input values for the input variables and expected output values for the output variables;
receive user input specifying one or more parameters for the input variables based on the identified allowed input values for the input variables;
based on the received user input, populating a database table with every combination of the input variables with the output variables;
storing the database table in a data store;
executing a unit test method on each row of the database table;
comparing outputs of the unit test method to corresponding expected output values in the database table; and
determining whether the outputs of the unit test method match the corresponding expected output values in the database table.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
receiving additional user input modifying the one or more parameters for the input variables, wherein the modifying comprises specifying one or more additional parameters associated with additional use cases;
based on the received additional user input, repopulating the database table with every combination of the input variables with the output variables; and
storing the database table in the data store.

### Claim 11 (depends on 9)

The method of claim 9, wherein determining whether the outputs of the unit test method match the corresponding expected output values in the database table comprise determining a degree of similarity between each output of the unit test method and each corresponding expected output value.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
based on determining one or more outputs of the unit test method fail to match a corresponding expected output value, transmitting a notification to a computing device.

### Claim 13 (depends on 9)

The method of claim 9, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving a plurality of fixed values.

### Claim 14 (depends on 9)

The method of claim 9, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving a list of character strings.

### Claim 15 (depends on 9)

The method of claim 9, wherein receiving the user input specifying the one or more parameters for the input variables comprises receiving one or more constraints specifying a range of values.

### Claim 16 (depends on 15)

The method of claim 15, wherein the range of values comprises one or more of a lower limit and an upper limit.

### Claim 17

A non-transitory computer readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
generating a facade of a method of a class, wherein the facade comprises input variables and output variables, and wherein the facade isolates code from a subsystem;
parsing the facade of the method, wherein the parsing identifies allowed input values for the input variables and expected output values for the output variables;
receive user input specifying one or more parameters for the input variables based on the identified allowed input values for the input variables;
based on the received user input, populating a database table with every combination of the input variables with the output variables;
storing the database table in a data store;
executing a unit test method on each row of the database table;
comparing outputs of the unit test method to corresponding expected output values in the database table; and
determining whether the outputs of the unit test method match the corresponding expected output values in the database table.

### Claim 18 (depends on 17)

The non-transitory computer readable medium of claim 17, further comprising:
receiving additional user input modifying the one or more parameters for the input variables, wherein the modifying comprises specifying one or more additional parameters associated with additional use cases;
based on the received additional user input, repopulating the database table with every combination of the input variables with the output variables; and
storing the database table in the data store.

### Claim 19 (depends on 17)

The non-transitory computer readable medium of claim 17, wherein determining whether the outputs of the unit test method match the corresponding expected output values in the database table comprise determining a degree of similarity between each output of the unit test method and each corresponding expected output value.

### Claim 20 (depends on 17)

The non-transitory computer readable medium of claim 17, wherein the instructions, when executed by the at least one data processor, further result in operations comprising:
based on determining one or more outputs of the unit test method fail to match a corresponding expected output value, transmitting a notification to a computing device.
