# US 2019/0377666 A1 · Optimized testing system

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

- Number: US 2019/0377666 A1
- Document ID: US20190377666A1
- Status: Published application
- Kind: A1
- Application number: 16/001,687
- Filed: 2018-06-06
- Published: 2019-12-12
- Earliest claimed: 2018-06-06
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Udo Klein
- Web page: https://patentgrep.com/patent/US20190377666A1

## 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

Described herein includes a software testing system that optimizes test case scheduling to efficiently and speedily analyze a block of code. The system enhances the performance of software testing by implementing a test controller using test statistics to optimize testing performance. The test controller may use the test statistics to determine relevant test cases to execute, and to provide better and/or faster feedback to users.

## 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, cause operations comprising:
collecting, during testing of code, at least one test statistic, the at least one test statistic comprising an association between a test case from a plurality of test cases and a portion of the code;
generating a reduced test suite to test a block of code that includes the portion of the code by at least selecting, from the plurality of test cases and based on the at least one test statistic, at least the test case; and
testing, using the reduced test suite including at least the test case, the block of code.

### Claim 2 (depends on 1)

The system of claim 1, wherein the at least one test statistic is collected and stored by a test controller.

### Claim 3 (depends on 2)

The system of claim 2, wherein the generating further comprises: determining, by the test controller, that the block of code is to be tested upon receipt of a triggering event, the triggering event including an instruction to test the portion of the code, a scheduled test case, and/or a commit of code.

### Claim 4 (depends on 1)

The system of claim 1, wherein the association between the test case from the plurality of test cases and the portion of the code comprises a detection of an error by the test case in the portion of the code.

### Claim 5 (depends on 1)

The system of claim 1, wherein the operations further comprise:
determining, based on the testing, that the block of code includes an error in the portion of the code;
generating a ticket associated with the error, the ticket including a location of the error in the block of code and user information related to a user from which a client device received the block of code; and
transmitting the ticket.

### Claim 6 (depends on 1)

The system of claim 1, wherein the at least one test statistic further includes an execution time of each test case of the plurality of test cases, a timestamp indicating a time each test case of the plurality of test cases was run, an identification of a commit of code to a code repository, an error detected by each test case of the plurality of test cases, and/or a location of the error detected by each test case of the plurality of test cases.

### Claim 7 (depends on 1)

The system of claim 1, wherein the operations further comprise:
determining that a change has occurred in the block of code; and
retesting the block of code, the retesting comprising:
detecting that a regression in the block of code has occurred due at least in part by the change in the block of code, the regression indicating that at least a portion of the block of code includes an error, the at least the portion being previously error-free,
bisecting, based on the at least one test statistic, the retested block of code to determine a location of the error,
determining that the error is located within the portion of the code of the block of code, and
executing, based on the at least one test statistic, the test case to determine the location of the error.

### Claim 8 (depends on 7)

The system of claim 7, wherein the operations further comprise: generating a ticket associated with the error in the portion of the code of the retested block of code, the ticket including a location of the error in the retested block of code and user information related to a user from which a client device received the change in the block of code.

### Claim 9

A computer-implemented method, comprising:
collecting, during testing of code, at least one test statistic, the at least one test statistic comprising an association between a test case from a plurality of test cases and a portion of the code;
generating a reduced test suite to test a block of code that includes the portion of the code by at least selecting, from the plurality of test cases and based on the at least one test statistic, at least the test case; and
testing, using the reduced test suite including at least the test case, the block of code.

### Claim 10 (depends on 9)

The method of claim 9, wherein the at least one test statistic is collected and stored by a test controller.

### Claim 11 (depends on 10)

The method of claim 10, wherein the generating further comprises: determining, by the test controller, that the block of code is to be tested upon receipt of a triggering event, the triggering event including an instruction to test the portion of the code, a scheduled test case, and/or a commit of code.

### Claim 12 (depends on 9)

The method of claim 9, wherein the association between the test case from the plurality of test cases and the portion of the code comprises a detection of an error by the test case in the portion of the code.

### Claim 13 (depends on 9)

The method of claim 9, further comprising:
determining, based on the testing, that the block of code includes an error in the portion of the code;
generating a ticket associated with the error, the ticket including a location of the error in the block of code and user information related to a user from which a client device received the block of code; and
transmitting the ticket.

### Claim 14 (depends on 9)

The method of claim 9, wherein the at least one test statistic further includes an execution time of each test case of the plurality of test cases, a timestamp indicating a time each test case of the plurality of test cases was run, an identification of a commit of code to a code repository, an error detected by each test case of the plurality of test cases, and/or a location of the error detected by each test case of the plurality of test cases.

### Claim 15 (depends on 9)

The method of claim 9, further comprising:
determining that a change has occurred in the block of code; and
retesting the block of code, the retesting comprising:
detecting that a regression in the block of code has occurred due at least in part by the change in the block of code, the regression indicating that at least a portion of the block of code includes an error, the at least the portion being previously error-free,
bisecting, based on the at least one test statistic, the retested block of code to determine a location of the error,
determining that the error is located within the portion of the code of the block of code, and
executing, based on the at least one test statistic, the test case to determine the location of the error.

### Claim 16

A non-transitory computer-readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
collecting, during testing of code, at least one test statistic, the at least one test statistic comprising an association between a test case from a plurality of test cases and a portion of the code;
generating a reduced test suite to test a block of code that includes the portion of the code by at least selecting, from the plurality of test cases and based on the at least one test statistic, at least the test case; and
testing, using the reduced test suite including at least the test case, the block of code.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the at least one test statistic is collected and stored by a test controller.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the generating further comprises: determining, by the test controller, that the block of code is to be tested upon receipt of a triggering event, the triggering event including an instruction to test the portion of the code, a scheduled test case, and/or a commit of code.

### Claim 19 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the association between the test case from the plurality of test cases and the portion of the code comprises a detection of an error by the test case in the portion of the code.

### Claim 20 (depends on 16)

The non-transitory computer-readable medium of claim 16, further comprising:
determining, based on the testing, that the block of code includes an error in the portion of the code;
generating a ticket associated with the error, the ticket including a location of the error in the block of code and user information related to a user from which a client device received the block of code; and
transmitting the ticket.
