# US 12,117,924 B2 · Context-based test suite generation as a service

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

- Number: US 12,117,924 B2
- Document ID: US12117924B2
- Status: Granted
- Kind: B2
- Application number: 18/539,665
- Filed: 2023-12-14
- Published: 2024-04-04
- Granted: 2024-10-15
- Earliest claimed: 2022-06-14
- Assignees: Hewlett Packard Enterprise Development LP
- Applicants: Hewlett Packard Enterprise Development LP
- Inventors: Muralikrishna Nidugala; Ravi Teja Jammulapati; Krishnaprasad Bidare Prabhakar; Anup Kumar Sahu; Aryan Mehta
- Web page: https://patentgrep.com/patent/US12117924B2

## 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}
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 3/02: Neural networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system comprising processing circuitry a memory storing instructions that cause the system to detect a code change to source code included in a code repository, identify a relationship between the code change and an associated product feature, determine one or more dependent product features impacted by the code change, select a set of test cases including a subset of test cases related to the associated product feature and a subset of test cases related to the one or more dependent product features, execute the set of test cases, and update the code-to-feature mapping using results of executing the set of test case.

## Claims

### Claim 1

A system comprising:
processing circuitry; and
a memory coupled with the processing circuitry, the memory storing instructions, wherein the processing circuitry is configured to execute the instructions to:
detect a code change to source code;
identify an associated product feature and one or more dependent product features impacted by the code change to the source code;
select, based on the associated product feature and the one or more dependent product features, a first subset of test cases related to the associated product feature and a second subset of test cases related to the one or more dependent product features;
responsive to determining that there exist a test gap indicating there are insufficient test cases to cover a certain product feature or product component, automatically generate a third subset of test cases to fill the test gap based on the associated product feature and the one or more dependent product features; and
execute a set of test cases, wherein the set of test cases comprises the first subset of test cases, the second subset of test cases, and the third subset of test cases.

### Claim 2 (depends on 1)

The system of claim 1, wherein the processing circuitry is further configured to execute the instructions to identify a relationship between the code change to the source code and the associated product feature based on a code-to-feature mapping.

### Claim 3 (depends on 2)

The system of claim 2, wherein the code-to-feature mapping includes a dependency tree that relates source code, source code folders, product features, and product components.

### Claim 4 (depends on 3)

The system of claim 3, wherein the processing circuitry is further configured to execute the instructions to identify, using a Machine Learning (ML) algorithm and based on the associated product feature, the one or more dependent product features.

### Claim 5 (depends on 4)

The system of claim 4, wherein the processing circuitry is further configured to execute the instructions to execute the ML algorithm to update the code-to-feature mapping by updating the dependency tree using pre-processing statements and libraries in the source code.

### Claim 6 (depends on 4)

The system of claim 4, wherein the processing circuitry is further configured to execute the instructions to execute the ML algorithm to identify the relationship between the code change to the source code and the associated product feature based on a knowledge base including information from prior testing.

### Claim 7 (depends on 6)

The system of claim 6, wherein the knowledge base includes one or more of: tokenizations of the source code, stemmings, lemmatizations, or stop words.

### Claim 8 (depends on 6)

The system of claim 6, wherein the processing circuitry is further configured to execute the instructions to execute the ML algorithm to identify the test gap based on information in the knowledge base indicating there are insufficient test cases to cover the certain product feature or product component.

### Claim 9 (depends on 2)

The system of claim 2, wherein the processing circuitry is further configured to execute the instructions to update the code-to-feature mapping based on results of executing the set of test cases.

### Claim 10

A non-transitory computer-readable storage medium having stored thereon instructions that, when executed by a processor, cause the processor to:
detect a code change to source code;
identify an associated product feature and one or more dependent product features impacted by the code change to the source code;
select, based on the associated product feature and the one or more dependent product features, a first subset of test cases related to the associated product feature and a second subset of test cases related to the one or more dependent product features;
responsive to determining that there exist a test gap indicating there are insufficient test cases to cover a certain product feature or product component, automatically generate a third subset of test cases to fill the test gap based on the associated product feature and the one or more dependent product features; and
execute a set of test cases, wherein the set of test cases comprises the first subset of test cases, the second subset of test cases, and the third subset of test cases.

### Claim 11 (depends on 10)

The non-transitory computer-readable storage medium of claim 10, wherein the instructions, when executed by the processor, cause the processor to identify a relationship between the code change to the source code and the associated product feature based on a code-to-feature mapping.

### Claim 12 (depends on 11)

The non-transitory computer-readable storage medium of claim 11, wherein the instructions, when executed by the processor, cause the processor to update the code-to-feature mapping by updating a dependency tree using pre-processing statements and libraries in the source code.

### Claim 13 (depends on 11)

The non-transitory computer-readable storage medium of claim 11, wherein the instructions, when executed by the processor, cause the processor to display the code-to-feature mapping to a user in a graph visualization.

### Claim 14

A method comprising:
detecting a code change to source code;
identifying an associated product feature and one or more dependent product features impacted by the code change to the source code;
selecting, based on the associated product feature and the one or more dependent product features, a first subset of test cases related to the associated product feature and a second subset of test cases related to the one or more dependent product features;
responsive to determining that there exist a test gap indicating there are insufficient test cases to cover a certain product feature or product component, automatically generating a third subset of test cases to fill the test gap based on the associated product feature and the one or more dependent product features; and
executing a set of test cases, wherein the set of test cases comprises the first subset of test cases, the second subset of test cases, and the third subset of test cases.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
identifying a relationship between the code change to the source code and the associated product feature based on a code-to-feature mapping; and
updating, using a Machine Learning (ML) algorithm, the code-to-feature mapping using results of executing the set of test cases.

### Claim 16 (depends on 15)

The method of claim 15, wherein the code-to-feature mapping includes a dependency tree that relates source code, source code folders, product features, and product components, and wherein updating the code-to-feature mapping comprises updating the dependency tree using pre-processing statements and libraries in the source code.

### Claim 17 (depends on 14)

The method of claim 14, further comprising:
identifying the test gap based on information in a knowledge base indicating there are insufficient test cases to cover a certain product feature or product component, wherein the knowledge base includes one or more of: tokenizations of the source code, stemmings, lemmatizations, or stop words.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
updating the knowledge base in response to the identification of the test gap.
