IP Library › Granted Patent US 11,874,762
Granted Patent B2
US 11,874,762 · App. 17/806,868 · Granted Jan 16, 2024

Context-based test suite generation as a service

Inventors: Muralikrishna Nidugala (Karnataka, IN); Ravi Teja Jammulapati (Karnataka, IN); Krishnaprasad Bidare Prabhakar (Karnataka, IN); Anup Kumar Sahu (Karnataka, IN); Aryan Mehta (Karnataka, IN)
Assignee: Hewlett Packard Enterprise Development LP
G06F11/3684G06F11/3688G06N5/022
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,874,762
App. No.
17/806,868
Granted
Jan 16, 2024
Kind
B2
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 (40)

1. A system comprising:

processing circuitry; and

a memory coupled with the processing circuitry, the memory storing instructions that, when executed by the processing circuitry cause the system to:

detect a code change to source code included in a code repository;

identify, based on a code-to-feature mapping, a relationship between the code change to the source code and an associated product feature;

determine, using a machine learning (ML) algorithm and based on the associated product feature, 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 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, using the ML algorithm, the code-to-feature mapping using results of executing the set of test cases.

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

3. The system of claim 2 wherein the ML algorithm updates the code-to-feature mapping by updating the dependency tree using pre-processing statements and libraries in the source code.

4. The system of claim 1 wherein the ML algorithm identifies 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.

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

6. The system of claim 4 wherein the ML algorithm identifies a test gap based on information in the knowledge base indicating there are insufficient test cases to cover a certain product feature or product component.

7. The system of claim 1 wherein the set of test cases includes a subset of test cases automatically generated based on the associated product feature and the one or more dependent product features.

8. 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 included in a code repository;

identify, using a machine learning (ML) algorithm and based on a code-to-feature mapping, a relationship between the code change to the source code and an associated product feature, wherein the code-to-feature mapping includes a dependency tree that relates source code, source code folders, product features, and product components;

determine, based on the associated product feature, 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 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, using the ML algorithm, the code-to-feature mapping using results of executing the set of test cases.

9. The non-transitory computer-readable storage medium of claim 8 wherein the ML algorithm updates the code-to-feature mapping by updating the dependency tree using pre-processing statements and libraries in the source code.

10. The non-transitory computer-readable storage medium of claim 8 wherein the ML algorithm identifies 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.

11. The non-transitory computer-readable storage medium of claim 10 wherein the knowledge base includes one or more of: tokenizations of the source code, stemmings, lemmatizations, or stop words.

12. The non-transitory computer-readable storage medium of claim 10 wherein the ML algorithm identifies a test gap based on information in the knowledge base indicating there are insufficient test cases to cover a certain product feature or product component.

13. The non-transitory computer-readable storage medium of claim 8 wherein the set of test cases includes a subset of test cases automatically generated based on the associated product feature and the one or more dependent product features.

14. The non-transitory computer-readable storage medium of claim 8 wherein the code-to-feature mapping is displayed to a user in a graph visualization.

15. A method comprising:

detecting a code change to source code included in a code repository;

identifying, using a machine learning (ML) algorithm and based on a code-to-feature mapping, a relationship between the code change to the source code and an associated product feature, wherein the code-to-feature mapping includes a dependency tree that relates source code, source code folders, product features, and product components, and wherein the ML algorithm identifies 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;

determining, based on the associated product feature, 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 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;

executing the set of test cases; and

updating, using the ML algorithm, the code-to-feature mapping using results of executing the set of test cases.

16. The method of claim 15 wherein the ML algorithm updates the code-to-feature mapping by updating the dependency tree using pre-processing statements and libraries in the source code.

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

18. The method of claim 15 wherein the set of test cases includes a subset of test cases automatically generated based on the associated product feature and the one or more dependent product features.

19. The method of claim 15 wherein the ML algorithm identifies a test gap based on information in the knowledge base indicating there are insufficient test cases to cover a certain product feature or product component.

20. The method of claim 19 further comprising updating the knowledge base in response to the identification of the test gap.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 15, 2022
From: NIDUGALAA, MURALI; JAMMULAPATI, RAVI TEJA; PRABHAKAR, KRISHNAPRASAD BIDARE; SAHU, ANUP KUMAR; MEHTA, ARYAN
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 060205/0833 →
Continuity (1)
Related Publication 20230401144A1 · Dec 14, 2023
Cited By (2)
US 12,386,615 US 12,436,867