# US 2013/0254746 A1 · Systems and/or methods for executing appropriate tests based on code modifications using live, distributed, real-time cache and feedback loop

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

- Number: US 2013/0254746 A1
- Document ID: US20130254746A1
- Status: Published application
- Kind: A1
- Application number: 13/429,924
- Filed: 2012-03-26
- Published: 2013-09-26
- Earliest claimed: 2012-03-26
- Assignees: Software AG
- Inventors: Balaji BALAKRISHNAN; Vasudeva Rao Kothamasu; Gary Woods
- Web page: https://patentgrep.com/patent/US20130254746A1

## CPC

- G06F 11/3608: {using formal methods, e.g. model checking, abstract interpretation (theorem proving G06N5/013)}
- G06F 11/3676: {for coverage analysis}
- 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

Certain example embodiments relate to systems and/or methods for determining and/or executing an appropriate subset of tests in response to a code change. In certain example embodiments, hash digests or other unique values for code structures (such as, for example, classes, methods, and/or other structural elements) may be created. Tests associated those associated code structures may be identified. New hash digests or other unique values may be generated for the code structures after the source code has been modified. In response to a mismatch as between the existing and new hash digests or other unique values, a list of associated tests for possible subsequent execution may be retrieved. Certain example embodiments additionally or alternatively provide an incremental but consistent way of analyzing performance issues, e.g., in connection with a profiler.

## Claims

### Claim 1

A method for testing computer code, the method comprising:
receiving source code related to an application to be executed on a computer system including processing resources;
parsing the source code into plural identified structures;
applying, using a test computer, a hash algorithm to each of the identified structures in the source code in order to generate a corresponding first unique identifier;
storing the first unique identifiers to a non-transitory computer readable storage location;
performing, under the direction of the test computer, tests on the application in connection with the source code;
identifying, using the test computer, structures in the source code associated with each test; and
storing, to a or the non-transitory computer readable storage location, a mapping between the performed tests and the identified structures associated with the tests.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving modified source code related to the application;
parsing the modified source code into plural identified structures;
applying the hash algorithm to each of the identified structures in the modified source code in order to generate a corresponding second unique identifier;
comparing first and second unique identifiers related to corresponding identified structures in the source code and the modified source code, respectively; and
when a difference is detected between compared first and second unique identifiers generating, from the mapping, a list of any tests associated with the non-matching identifiers.

### Claim 3 (depends on 2)

The method of claim 2, wherein the hash algorithm is the MD5 algorithm and the first and second unique identifiers are MD5 digests.

### Claim 4 (depends on 2)

The method of claim 2, wherein identifiable structures include method and non-method structures.

### Claim 5 (depends on 4)

The method of claim 4, wherein identifiable non-method structures include class structures.

### Claim 6 (depends on 2)

The method of claim 2, wherein the mapping further includes metrics for the tests including respective execution times and/or number of failures.

### Claim 7 (depends on 6)

The method of claim 6, further comprising ordering tests in the list based on metrics associated with the tests therein.

### Claim 8 (depends on 7)

The method of claim 7, further comprising causing the tests in the list to be re-run, in order.

### Claim 9 (depends on 2)

The method of claim 2, wherein the first unique identifiers and the mapping are stored to the same or different distributed cache(s).

### Claim 10 (depends on 2)

The method of claim 2, wherein the tests on the application are performed in connection with method structures in the code being instrumented on the fly.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
gathering first computer processing resource performance information for the processing resources of the computer system during execution of the application in connection with the source code;
storing the first computer processing resource performance information in connection with the mapping;
receiving modified source code related to the application;
gathering second computer processing resource performance information for the processing resources of the computer system during execution of the application in connection with the modified source code;
comparing first and second computer processing resource performance information for each of the processing resources of the computer system; and
when a difference is detected between the compared first and second computer processing resource performance information and the difference exceeds a predetermined threshold value:
parsing the modified source code into plural identified structures;
applying the hash algorithm to each of the identified structures in the modified source code in order to generate a corresponding second unique identifier;
comparing first and second unique identifiers related to corresponding identified structures in the source code and the modified source code, respectively; and
when a difference is detected between compared first and second unique identifiers generating, from the mapping, a list of any tests associated with the non-matching identifiers.

### Claim 12 (depends on 1)

A non-transitory computer readable storage medium tangibly storing instructions that, when executed by at least one processor of a test computer system, perform at least the method of claim 1.

### Claim 13 (depends on 2)

A non-transitory computer readable storage medium tangibly storing instructions that, when executed by at least one processor of a test computer system, perform at least the method of claim 2.

### Claim 14 (depends on 11)

A non-transitory computer readable storage medium tangibly storing instructions that, when executed by at least one processor of a test computer system, perform at least the method of claim 11.

### Claim 15

A test system, comprising:
at least one processor and a memory arranged to execute plural modules;
a parser module configured to receive source code related to an application to be executed on a computer system including processing resources and to identify plural structures in the received source code, wherein the structures are identifiable as being one of a method structure or a non-method structure;
a digester module configured to apply a hash algorithm to each identified structure in the source code in order to generate a corresponding unique identifier; and
a non-transitory computer readable medium configured to store the unique identifiers,
wherein the test system is configured to use its at least one processor to at least:
cause tests to be performed on the application in connection with the source code,
determine which identified structure(s) in the source code is/are associated with each said test, and
store a mapping between the performed tests and the identified structures associated with the tests to a or the non-transitory computer readable medium.

### Claim 16 (depends on 15)

The system of claim 15, wherein:
original source code and modified source code are provided to the parser module,
first identified structures for the original source code and second identified structures for the modified source code are provided to the digester module;
and further comprising a comparison module configured to:
compare first and second unique identifiers related to corresponding identified structures in the original source code and the modified source code, respectively, and
generate from the mapping, when a difference is detected between compared first and second unique identifiers, a list of any tests associated with the non-matching identifiers.

### Claim 17 (depends on 16)

The system of claim 16, wherein the hash algorithm is the MD5 algorithm and the first and second unique identifiers are MD5 digests.

### Claim 18 (depends on 16)

The system of claim 16, further comprising an aspect oriented programming instrumentation subsystem configured to cause identified methods to be instrumented on-the-fly and to gather method performance information, in connection with the performing of the tests.

### Claim 19 (depends on 18)

The system of claim 18, wherein the list is ordered based at least in part on method performance information.

### Claim 20 (depends on 16)

The system of claim 16, wherein the non-transitory computer readable medium is a distributed cache.

### Claim 21 (depends on 15)

The system of claim 15, further comprising an application profiler configured to track performance statistics of the processing resources of the computer system on which the application is executed, at least during testing.

### Claim 22 (depends on 21)

The system of claim 21, wherein the application profiler is configured to track performance statistics of the processing resources of the computer system on which the application is executed during testing for both first and second separate builds of the application, and further comprising:
a first comparison module configured to compare performance statistics associated with the first and second builds, wherein code for the first and second builds is provided to the parser, and identified structures generated by the parser are provided to the digester in order to generate first and second unique identifiers for the first and second builds, respectively;
a second comparison module is configured to compare first and second unique identifiers related to corresponding identified structures in the first and second builds, respectively, when the first comparison module indicates that there is a potentially significant deviation between performance statistics for the first and second builds; and
a report module configured to generate a list of any tests associated with the first and second unique identifiers that do not match as determined by the second comparison module.

### Claim 23 (depends on 15)

The system of claim 15, wherein the test system is accessible by plural authorized users at different respective locations.

### Claim 24 (depends on 15)

The system of claim 15, further comprising a listener configured to detect code check-in events at a source code repository.

### Claim 25 (depends on 24)

The system of claim 24, wherein the listener is further configured to initiate testing as between code designated as baseline code and newly checked-in code by:
providing to the parser module the newly checked-in code;
providing to the digester module second identified structures for the newly checked-in code; and
initiating a comparison module that is configured to:
compare first and second unique identifiers related to corresponding identified structures in the baseline code and the newly checked-in code, respectively, and
generate from the mapping, when a difference is detected between compared first and second unique identifiers, a list of any tests associated with the non-matching identifiers.
