# US 10,956,308 B2 · Test case reduction for code regression testing

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

- Number: US 10,956,308 B2
- Document ID: US10956308B2
- Status: Granted
- Kind: B2
- Application number: 16/449,114
- Filed: 2019-06-21
- Published: 2019-10-10
- Granted: 2021-03-23
- Earliest claimed: 2013-03-15
- Assignees: DevFactory Innovations FZ-LLC
- Applicants: Devfactory Fz-LLC
- Inventors: Joseph A. Liemandt; Rahul Subramaniam; Samy Aboel-Nil
- Web page: https://patentgrep.com/patent/US10956308B2

## CPC

- G06F 11/3672: {Test management}
- 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

In at least one embodiment, a system performs regression testing of software using selected test cases. In at least one embodiment, the system selects the test case for regression testing based on whether the test case correlates with modified code. In at least one embodiment, a test case correlates with the modified code if the test case tests all or a proper subset of the modified code. In at least one embodiment, if a test case does not test any of the modified code, then the test case is not used in the regression testing of the modified code.

## Claims

### Claim 1

A method of testing computer software after modification of one or more portions of code of the computer software, the method comprising:
executing code by a computer system to cause the computer system to perform:
accessing the code after modification of the multiple portions of the code, which includes modification of multiple classes of the code;
determining which of the multiple portions of the code, including the modified multiple classes, were modified;
accessing data correlating one or more test cases to respective portions of the code, wherein each test case that is correlated to a portion of the code tests the correlated portion of code during a test of the computer software;
identifying one or more correlated test cases, wherein the correlated test cases are the one or more test cases that correlate with the multiple portions of the code, including the modified multiple classes, that were modified;
iterating through multiple test cases to determine which of the multiple test cases are prerequisites to the one or more identified correlated test cases;
continue iterating through the multiple test cases to determine which of the multiple tests cases are prerequisites to the one or more determined prerequisite test cases;
repeating the continue iterating element until all prerequisite test cases are determined; and
testing the code using the one or more correlated test cases and the one or more determined prerequisite test cases.

### Claim 2 (depends on 1)

The method of claim 1 wherein each portion of the portions of code consist of one or more members of a group consisting of: a line of code, a block of code, a method, a class, and a package.

### Claim 3 (depends on 1)

The method of claim 1 wherein the data correlating the one or more test cases to respective portions of the code comprises a map that correlates each test case with the code exercised by the test case.

### Claim 4 (depends on 1)

The method of claim 1 further comprising:
executing the code by the computer system to cause the computer system to further perform:
testing the code in accordance with one of the test cases;
exercising a portion of the code with the test case used for the testing; and
recording which portion of the code was exercised by the test case used for the testing.

### Claim 5 (depends on 4)

The method of claim 4 wherein exercising the portion of the code with the test case used for the testing comprises:
calling one or more methods of the code.

### Claim 6 (depends on 4)

The method of claim 4 wherein recording which portion of the code was exercised by the test case used for the testing comprises:
storing the portion of the code exercised by the test case used for testing as a data map in a non-transitory, computer readable medium, wherein the data correlating one or more test cases to respective portions of the code comprises the data map.

### Claim 7 (depends on 1)

The method of claim 1 further comprising:
executing the code by the computer system to cause the computer system to not test the code using any test cases that do not correlate with the multiple portions of the code that were modified.

### Claim 8 (depends on 1)

The method of claim 1 wherein a test case correlates with the multiple portions of the code that were modified if the test case tests all or a proper subset of the multiple portions of the code that were modified.

### Claim 9

A method that includes testing computer software after modification of one or more portions of code of the computer software, the method comprising:
performing by a first computer system programmed with first code stored in a first memory and executable by a first processor of the first computer system:
providing access to the computer software to a second computer system; and
receiving a code testing report for the computer software, wherein the code testing report is generated by a second computer system, coupled to the first computer system, executing second code stored in a second memory of the second computer system to cause the second computer system to perform:
accessing the code after modification of the multiple portions of the code, which includes modification of multiple classes of the code;
determining which of the multiple portions of the code, including the modified multiple classes, were modified;
accessing data correlating one or more test cases to respective portions of the code, wherein each test case that is correlated to a portion of the code tests the correlated portion of code during a test of the computer software;
identifying one or more correlated test cases, wherein the correlated test cases are the one or more test cases that correlate with the multiple portions of the code, including the modified multiple classes, that were modified;
iterating through multiple test cases to determine which of the multiple test cases are prerequisites to the one or more identified correlated test cases;
continue iterating through the multiple test cases to determine which of the multiple tests cases are prerequisites to the one or more determined prerequisite test cases;
repeating the continue iterating element until all prerequisite test cases are determined;
testing the code using the one or more correlated test cases and the one or more determined prerequisite test cases;
generating the code testing report that includes test results of the testing of the code using the one or more correlated test cases and the one or more determined prerequisite test cases; and
providing the code testing report to the first computer system.

### Claim 10 (depends on 9)

The method of claim 9 wherein each portion of the portions of code consist of one or more members of a group consisting of: a line of code, a block of code, a method, a class, and a package.

### Claim 11 (depends on 9)

The method of claim 9 wherein the data correlating the one or more test cases to respective portions of the code comprises a map that correlates each test case with the code exercised by the test case.

### Claim 12 (depends on 9)

The method of claim 9 further comprising:
executing second code stored in a second memory of the second computer system to cause the second computer system to further perform:
testing the code in accordance with one of the test cases;
exercising a portion of the code with the test case used for the testing; and
recording which portion of the code was exercised by the test case used for the testing.

### Claim 13 (depends on 12)

The method of claim 12 wherein exercising the portion of the code with the test case used for the testing comprises: calling one or more methods of the code.

### Claim 14 (depends on 13)

The method of claim 13 wherein recording which portion of the code was exercised by the test case used for the testing comprises:
storing the portion of the code exercised by the test case used for testing as a data map in a non-transitory, computer readable medium, wherein the data correlating one or more test cases to respective portions of the code comprises the data map.

### Claim 15 (depends on 9)

The method of claim 9 further comprising:
executing second code stored in a second memory of the second computer system to cause the second computer system to not test the code using any test cases that do not correlate with the multiple portions of the code that were modified.

### Claim 16 (depends on 9)

The method of claim 9 wherein a test case correlates with the multiple portions of the code that were modified if the test case tests all or a proper subset of the multiple portions of the code that were modified.
