# US 2021/0334196 A1 · Test cycle time reduction and optimization

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

- Number: US 2021/0334196 A1
- Document ID: US20210334196A1
- Status: Published application
- Kind: A1
- Application number: 17/371,127
- Filed: 2021-07-09
- Published: 2021-10-28
- Earliest claimed: 2020-03-27
- Assignees: Harness Inc.
- Applicants: Harness Inc.
- Inventors: Shivakumar Ningappa; Uri Scheiner; Srinivas Bandi Ramesh Babu
- Web page: https://patentgrep.com/patent/US20210334196A1

## CPC

- G06F 11/3668: Testing of software
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system that automatically reduces test cycle time to save resources and developer time. The present system selects a subset of tests from a full test plan that should be selected for a particular test cycle, rather than running the entire test plan. The subset of tests is intelligently selected using metrics such as tests associated with changed code and new and modified tests.

## Claims

### Claim 1

A method for automatically testing software code, comprising:
detecting a test event initiated by a testing program and associated with testing a first software at a testing server, the test event detected by an agent executing within the testing program at the testing server, the testing event associated with a plurality of tests for the first software;
transmitting, by the agent on the testing server to a remote server, one or more files associated with a subset of the first software to be tested;
receiving, by the agent on the testing server from the remote server, a list of tests to be performed in response to the test event, the received list of tests being a subset of the plurality of tests and generated at least in part from a first call graph; and
executing the tests in the list of tests by the agent in the testing server.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first call graph includes relationships between the plurality of tests and portions of the first software.

### Claim 3 (depends on 2)

The method of claim 2, wherein the portions of the first software are method classes.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
parsing test results in response to execution of the tests; and
transmitting the test results by the agent to the remote server, the test results including a partial call graph to be automatically uploaded into the first call graph.

### Claim 5 (depends on 1)

The method of claim 1, wherein the call graph is generated automatically by the remote server.

### Claim 6 (depends on 1)

The method of claim 1, wherein the call graph specifies one or more tests to be executed for each method in the software, and wherein each of the one or more files specifies one or more methods.

### Claim 7 (depends on 1)

The method of claim 1, wherein the duration of execution of the subset of tests in the test list is shorter than the duration of execution of the plurality of tests.

### Claim 8

A non-transitory computer readable storage medium having embodied thereon a program, the program being executable by a processor to perform a method for automatically testing software code, the method comprising:
detecting a test event initiated by a testing program and associated with testing a first software at a testing server, the test event detected by an agent executing within the testing program at the testing server, the testing event associated with a plurality of tests for the first software;
transmitting, by the agent on the testing server to a remote server, one or more files associated with a subset of the first software to be tested;
receiving, by the agent on the testing server from the remote server, a list of tests to be performed in response to the test event, the received list of tests being a subset of the plurality of tests and generated at least in part from a first call graph; and
executing the tests in the list of tests by the agent in the testing server.

### Claim 9

A system for automatically testing software code, comprising:
a server including a memory and a processor; and
one or more modules stored in the memory and executed by the processor to detect a test event initiated by a testing program and associated with testing a first software at a testing server, the test event detected by an agent executing within the testing program at the testing server, the testing event associated with a plurality of tests for the first software, transmit, by the agent on the testing server to a remote server, one or more files associated with a subset of the first software to be tested, receive, by the agent on the testing server from the remote server, a list of tests to be performed in response to the test event, the received list of tests being a subset of the plurality of tests and generated at least in part from a first call graph, and execute the tests in the list of tests by the agent in the testing server.

### Claim 10

A method for automatically testing software code, comprising:
receiving, by a remote server, a message from an agent executing within a testing program at a testing server, the message including one or more files associated with a test event initiated at the testing server, the test event associated with a first software to be tested at the testing server;
parsing the one or more files by the remote server to identify portions of the first software to test;
identifying a plurality of tests to perform by the testing server based on the first software portions and a call graph; and
transmitting, by the remote server, the plurality of tests to perform at the testing server.

### Claim 11 (depends on 10)

The method of claim 10, wherein the message is initiated by the agent based on a test-execution event.

### Claim 12 (depends on 10)

The method of claim 10, wherein the call graph specifies one or more tests to be executed for each method in the software, and wherein each of the one or more files specifies one or more methods.

### Claim 13 (depends on 10)

The method of claim 10, wherein the call graph is retrieved by the remote server from a data store.

### Claim 14

A non-transitory computer readable storage medium having embodied thereon a program, the program being executable by a processor to perform a method for automatically testing software code, the method comprising:
receiving, by a remote server, a message from an agent executing within a testing program at a testing server, the message including one or more files associated with a test event initiated at the testing server, the test event associated with a first software to be tested at the testing server;
parsing the one or more files by the remote server to identify portions of the first software to test;
identifying a plurality of tests to perform by the testing server based on the first software portions and a call graph; and
transmitting, by the remote server, the plurality of tests to perform at the testing server.

### Claim 15

A system for automatically testing software code, comprising:
a server including a memory and a processor; and
one or more modules stored in the memory and executed by the processor to receive, by a remote server, a message from an agent executing within a testing program at a testing server, the message including one or more files associated with a test event initiated at the testing server, the test event associated with a first software to be tested at the testing server, parse the one or more files by the remote server to identify portions of the first software to test, identify a plurality of tests to perform by the testing server based on the first software portions and a call graph, and transmit by the remote server, the plurality of tests to perform at the testing server.

### Claim 16 (depends on 15)

The system of claim 15, wherein the first call graph includes relationships between the plurality of tests and portions of the first software.

### Claim 17 (depends on 16)

The The system of claim 16, wherein the portions of the first software are method classes.

### Claim 18 (depends on 15)

The system of claim 15, the modules further executable to:
parse test results in response to execution of the tests; and
transmit the test results by the agent to the remote server, the test results including a partial call graph to be automatically uploaded into the first call graph.

### Claim 19 (depends on 15)

The system of claim 15, wherein the call graph is generated automatically by the remote server.

### Claim 20 (depends on 15)

The system of claim 15, wherein the call graph specifies one or more tests to be executed for each method in the software, and wherein each of the one or more files specifies one or more methods.
