# US 2021/0279165 A1 · Test data generation for automatic software testing

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

- Number: US 2021/0279165 A1
- Document ID: US20210279165A1
- Status: Published application
- Kind: A1
- Application number: 16/812,333
- Filed: 2020-03-08
- Published: 2021-09-09
- Earliest claimed: 2020-03-08
- Assignees: Ownbackup Ltd.
- Applicants: OwnBackup LTD
- Inventors: Shai Rubin
- Web page: https://patentgrep.com/patent/US20210279165A1

## CPC

- G06F 11/3672: {Test management}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3409: {for performance assessment}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- 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

An embodiment features a method of generating test data. An application-level schema corresponding to a source relational database is received. The schema defines constraints comprising one or more of inter-field, inter-record, and inter-object constraints between related data in the source relational database. A random walk is performed on a graph of nodes representing data in the source relational database. At respective ones of the nodes, corresponding ones of the data in the source relational database are selected along a path ordered in accordance with the constraints defined in the schema. Synthetic test data is generated based on one or more statistical models of the data selected from the source relational database. Data values are generated for respective fields of an object defined in the schema, and data values are generated for records related to the object based on one or more of the constraints defined in the schema.

## Claims

### Claim 1

A computer-implemented method of generating test data, comprising:
receiving an application-level schema corresponding to a source relational database, wherein the application-level schema defines constraints comprising one or more of inter-field, inter-record, and inter-object constraints between related data in the source relational database;
performing, by a processor, a random walk on a graph of nodes representing data in the source relational database and, at respective ones of the nodes, selecting corresponding ones of the data in the source relational database that define a path ordered in accordance with the constraints defined in the application-level schema;
generating, by a processor, synthetic test data based on one or more statistical models of the data selected from the source relational database, wherein the generating comprises generating data values for respective fields of an object defined in the application-level schema, and generating data values for records related to the object based on one or more of the constraints defined in the application-level schema.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein performing the random walk comprises, by a processor, generating data from successive object nodes in the graph.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein performing the random walk comprises generating test data record-by-record while performing a random walk along a path of records ordered in accordance with the constraints described in the application-level schema.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, wherein performing the random walk comprises, by a processor, selecting successive data from adjacent nodes in the graph subject to the constraints defined in the application-level schema.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the generating comprises, by a processor, generating synthetic test data for different types of nodes in the graph.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein the generating comprises, by a processor, generating synthetic data for a parent node and multiple child nodes that depend from the parent node.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the generating comprises, by a processor, generating the synthetic test data field values with a density that varies depending on node type.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein the generating comprises, by a processor, generating the synthetic test data field values with variable levels of randomness.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein the generating comprises, by a processor, generating the synthetic test data field values randomly.

### Claim 10 (depends on 8)

The computer-implemented method of claim 8, wherein the generating comprises, by a processor, generating the synthetic test data field values based on statistics of the corresponding data field values in the source relational database.

### Claim 11 (depends on 8)

The computer-implemented method of claim 8, wherein the generating comprises, by a processor, generating the synthetic test data field values based on data field values selected from a data backup comprising data field types corresponding to the data field types in the source relational database.

### Claim 12 (depends on 8)

The computer-implemented method of claim 8, wherein the generating comprises, by a processor, generating the synthetic test data field values in quantities that vary depending on data field type.

### Claim 13 (depends on 1)

The computer-implemented method of claim 1, further comprising generating a mandatory parent record for a dependent record based on a determination that the dependent record exists without a parent record.

### Claim 14 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor:
generating a mandatory related record based on a determination that a mandatory parent record exists; and
linking the mandatory related record to the existing mandatory parent record.

### Claim 15 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor:
generating a mandatory parent record based on a determination that the mandatory parent record does not exist; and
linking the generated mandatory parent record to the generated mandatory record.

### Claim 16 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor, randomly generating one or more non-mandatory related records.

### Claim 17 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor, terminating the generating in response to a determination that a mandatory record has been processed and there is no other mandatory record to which the processed record is required to point.

### Claim 18 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor, terminating the generating in response to a determination that a total number of records has reached a target amount.

### Claim 19 (depends on 1)

The computer-implemented method of claim 1, further comprising, by a processor: loading records into a test computer system in an order according to the random walk; detecting a circular dependency between a first record and a second record; and resolving the circular dependency by configuring the first record to point to the second record in the test computer system.

### Claim 20

A test data generation system, comprising:
an input module to receive an application-level schema corresponding to a source relational database, wherein the application-level schema defines constraints comprising one or more of inter-field, inter-record, and inter-object constraints between related data in the source relational database;
a random walk module to perform a random walk on a graph of nodes representing data in the source relational database and, at respective ones of the nodes, selecting corresponding ones of the data in the source relational database that define a path ordered in accordance with the constraints defined in the application-level schema; and
an output module configured to generate synthetic test data based on one or more statistical models of the data selected from the source relational database, wherein the generating comprises generating data values for respective fields of an object defined in the application-level schema, and generating data values for records related to the object based on one or more of the constraints defined in the application-level schema.

### Claim 21

A computer program product for execution by a computer system and comprising at least one non-transitory computer-readable medium having computer-readable program code portions embodied therein, the computer-readable program code portions comprising:
an executable code portion configured to receive an application-level schema corresponding to a source relational database, wherein the application-level schema defines constraints comprising one or more of inter-field, inter-record, and inter-object constraints between related data in the source relational database;
an executable code portion configured to perform a random walk on a graph of nodes representing data in the source relational database and, at respective ones of the nodes, selecting corresponding ones of the data in the source relational database that define a path ordered in accordance with the constraints defined in the application-level schema; and
an executable code portion configured to generate synthetic test data based on one or more statistical models of the data selected from the source relational database, wherein the generating comprises generating data values for respective fields of an object defined in the application-level schema, and generating data values for records related to the object based on one or more of the constraints defined in the application-level schema.
