# US 2021/0286704 A1 · Runtime metrics based test ordering

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

- Number: US 2021/0286704 A1
- Document ID: US20210286704A1
- Status: Published application
- Kind: A1
- Application number: 16/813,792
- Filed: 2020-03-10
- Published: 2021-09-16
- Earliest claimed: 2020-03-10
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Andrew C. M. Hicks; RYAN THOMAS RAWLINS; Deborah A. Furman
- Web page: https://patentgrep.com/patent/US20210286704A1

## CPC

- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3676: {for coverage analysis}
- 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: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for runtime metrics based test ordering in a computer system are described herein. An aspect includes determining a first runtime metric associated with a first module based on the execution of a first test case. Another aspect includes determining a second runtime metric associated with a second module based on the execution of a second test case. Another aspect includes comparing the first runtime metric and the second runtime metric. Another aspect includes determining an order of a plurality of test cases based on the comparison of the first runtime metric and the second runtime metric. Another aspect includes executing the plurality of test cases in the determined order.

## Claims

### Claim 1

A computer-implemented method comprising:
determining, by a processor, a bucket comprising an ordered plurality of test cases corresponding to a testing run of a system under test (SUT), the ordered plurality of test cases comprising a first test case and a second test case; and
starting the testing run, wherein starting the testing run comprises:
executing, by the processor, the first test case against the SUT, wherein executing the first test case comprises executing a first module;
determining a first end state and a first runtime metric associated with the first module based on the execution of the first test case;
executing the second test case against the SUT, wherein executing the second test case comprises executing a second module;
determining a second end state and a second runtime metric associated with the second module based on the execution of the second test case;
determining that the first end state and the second end state are the same; and
based on determining that the first end state and the second end state are the same:
comparing the first runtime metric and the second runtime metric;
reordering the plurality of test cases in the bucket based on the comparison of the first runtime metric and the second runtime metric; and
continuing the testing run based on the reordered plurality of test cases in the bucket.

### Claim at position 2

2-3. (canceled)

### Claim 4 (depends on 1)

The method of claim 1, further comprising storing the first runtime metric, the second runtime metric, the first end state, and the second end state in a runtime data repository.

### Claim 5 (depends on 1)

The method of claim 1, wherein reordering the plurality of test cases in the bucket comprises reordering the plurality of test cases to prioritize the first module over the second module.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first and second runtime metrics comprise one of elapsed execution time, memory utilization, central processing unit (CPU) time, and a number of Input/Output (I/O) transactions.

### Claim 7 (depends on 1)

The method of claim 1, wherein the plurality of cases comprises a third test case that includes the second module, and further comprising not executing the third test case of the plurality of test cases during the testing run corresponding to the bucket based on the comparison of the first runtime metric and the second runtime metric.

### Claim 8

A system comprising:
a memory having computer readable instructions; and
one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
determining a bucket comprising an ordered plurality of test cases corresponding to a testing run of a system under test (SUT), the ordered plurality of test cases comprising a first test case and a second test case; and
starting the testing run, wherein starting the testing run comprises:
executing, by the processor, the first test case against the SUT, wherein executing the first test case comprises executing a first module;
determining a first end state and a first runtime metric associated with the first module based on the execution of the first test case;
executing the second test case against the SUT, wherein executing the second test case comprises executing a second module;
determining a second end state and a second runtime metric associated with the second module based on the execution of the second test case;
determining that the first end state and the second end state are the same; and
based on determining that the first end state and the second end state are the same:
comparing the first runtime metric and the second runtime metric;
reordering the plurality of test cases in the bucket based on the comparison of the first runtime metric and the second runtime metric; and
continuing the testing run based on the reordered plurality of test cases in the bucket.

### Claim at position 8

9-10. (canceled)

### Claim 11 (depends on 8)

The system of claim 8, further comprising storing the first runtime metric, the second runtime metric, the first end state, and the second end state in a runtime data repository.

### Claim 12 (depends on 8)

The system of claim 8, wherein reordering the plurality of test cases in the bucket comprises reordering the plurality of test cases to prioritize the first module over the second module.

### Claim 13 (depends on 8)

The system of claim 8, wherein the first and second runtime metrics comprise one of elapsed execution time, memory utilization, central processing unit (CPU) time, and a number of Input/Output (I/O) transactions.

### Claim 14 (depends on 8)

The system of claim 8, wherein the plurality of cases comprises a third test case that includes the second module, and further comprising not executing the third test case of the plurality of test cases during the testing run corresponding to the bucket based on the comparison of the first runtime metric and the second runtime metric.

### Claim 15

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by one or more processors to cause the one or more processors to perform operations comprising:
determining a bucket comprising an ordered plurality of test cases corresponding to a testing run of a system under test (SUT), the ordered plurality of test cases comprising a first test case and a second test case; and
starting the testing run, wherein starting the testing run comprises:
executing, by the processor, the first test case against the SUT, wherein executing the first test case comprises executing a first module;
determining a first end state and a first runtime metric associated with the first module based on the execution of the first test case;
executing the second test case against the SUT, wherein executing the second test case comprises executing a second module;
determining a second end state and a second runtime metric associated with the second module based on the execution of the second test case;
determining that the first end state and the second end state are the same; and
based on determining that the first end state and the second end state are the same:
comparing the first runtime metric and the second runtime metric;
reordering the plurality of test cases in the bucket based on the comparison of the first runtime metric and the second runtime metric; and
continuing the testing run based on the reordered plurality of test cases in the bucket.

### Claim at position 14

16-17. (canceled)

### Claim 18 (depends on 15)

The computer program product of claim 15, further comprising storing the first runtime metric, the second runtime metric, the first end state, and the second end state in a runtime data repository.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein reordering the plurality of test cases in the bucket comprises reordering the plurality of test cases to prioritize the first module over the second module.

### Claim 20 (depends on 15)

The computer program product of claim 15, wherein the first and second runtime metrics comprise one of elapsed execution time, memory utilization, central processing unit (CPU) time, and a number of Input/Output (I/O) transactions.
