# US 11,507,495 B2 · System and method for test impact analysis of computer programs

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

- Number: US 11,507,495 B2
- Document ID: US11507495B2
- Status: Granted
- Kind: B2
- Application number: 17/338,376
- Filed: 2021-06-03
- Published: 2021-12-16
- Granted: 2022-11-22
- Earliest claimed: 2020-06-12
- Assignees: Parasoft Corporation
- Applicants: Parasoft Corporation
- Inventors: Jacek Marzec; Nathan Michael Jakubiak
- Web page: https://patentgrep.com/patent/US11507495B2

## CPC

- G06F 11/3676: {for coverage analysis}
- G06F 11/1004: {to protect a block of data words, e.g. CRC or checksum (G06F11/1076 takes precedence; security arrangements for protecting computers or computer systems against unauthorized activity G06F21/00)}
- 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

System and method for testing changes to binary code of a computer program include: collecting test coverage data from an executed set of tests of an original computer program; calculating a baseline report containing correlations between the executed set of tests and blocks of binary code of the original computer program; determining binary code changes between the original computer program and a modified version of the computer program; identifying one or more tests to be executed for verifying the binary code changes.

## Claims

### Claim 1

A method for testing changes to binary code of a computer program, the method comprising:
collecting test coverage data from an executed set of tests of an original computer program;
creating baseline report containing correlations between the executed set of tests and blocks of binary code of the original computer program;
determining binary code changes between the original computer program and a modified version of the computer program; and
identifying one or more tests to be executed for verifying the binary code changes, wherein determining binary code changes comprises:
iterating over each block of binary code of the modified version of the computer program and checking whether said each block of binary code exists in same location in the binary codes of the original computer program and the modified version of the computer program,
for each block of binary code that exists in the same locations, comparing a fingerprint for the block of binary code in the baseline report with a fingerprint for the block of binary code in the modified version of the computer program, and
marking the code block as modified when the fingerprints are different,
for all blocks of binary code that do not exist in same locations in the binary codes of the original computer program and the modified version of the computer program, matching blocks of binary codes that have a same pseudo unique identifier,
for each pair of matched blocks of binary code, comparing the fingerprint for the block of binary code in the baseline report with the fingerprint for the block of binary code in the modified version,
marking the block of binary code as modified when the fingerprints are different, and
marking remaining binary codes of the original computer program that were not matched as modified.

### Claim 2 (depends on 1)

The method of claim 1, further comprising executing the identified one or more tests to verify the binary code changes.

### Claim 3 (depends on 1)

The method of claim 1, wherein the executed set of tests comprises a plurality of sub-tests and the baseline report includes coverage data that identifies which subtest covers which block of binary code in the original computer program.

### Claim 4 (depends on 1)

The method of claim 1, wherein creating a baseline report comprises scanning the original computer program; computing a fingerprint for each block of binary code of the original computer program; and determining binary code changes between the original computer program and the modified version of the computer program utilizing the fingerprints for blocks of binary code.

### Claim 5 (depends on 1)

The method of claim 1, wherein the blocks of binary code are defined by line numbers that correspond to the binary code.

### Claim 6 (depends on 1)

The method of claim 1, wherein the blocks of binary code are defined by a name of a class or method to which the binary code belongs.

### Claim 7 (depends on 4)

The method of claim 4, wherein the blocks of binary code are defined as an entire file and the fingerprint is created for the content of the entire file.

### Claim 8 (depends on 4)

The method of claim 4, wherein the fingerprint is a checksum calculated as a Cyclic Redundancy Check from data stream of the binary code.

### Claim 9 (depends on 1)

The method of claim 1, further comprising storing the baseline report in an XML format.

### Claim 10 (depends on 1)

The method of claim 1, wherein identifying one or more tests comprises identifying binary code blocks that were modified in the modified version; comparing the fingerprints of each binary code block in the modified program with fingerprints for blocks of binary code of the original computer program in the baseline report; determining one or more modified binary code blocks; and utilizing the modified binary code blocks to determine corresponding one or more tests that can be run to verify the binary code changes.

### Claim 11 (depends on 10)

The method of claim 10, further comprising marking a binary code block as modified when its fingerprint is different than a corresponding block of binary code of the original computer program.

### Claim 12

A system for testing changes to binary code of a computer program comprising:
a coverage collector for collecting test coverage data from an executed set of tests of an original computer program; and
a test impact analysis engine for creating baseline report containing correlations between the executed set of tests and blocks of binary code of the original computer program, determining binary code changes between the original computer program and a modified version of the computer program, and identifying one or more tests to be executed for verifying the binary code changes, wherein determining binary code changes comprises:
iterating over each block of binary code of the modified version of the computer program and checking whether said each block of binary code exists in same location in the binary codes of the original computer program and the modified version of the computer program,
for each block of binary code that exists in the same locations, comparing a fingerprint for the block of binary code in the baseline report with a fingerprint for the block of binary code in the modified version of the computer program, and
marking the code block as modified when the fingerprints are different,
for all blocks of binary code that do not exist in same locations in the binary codes of the original computer program and the modified version of the computer program, matching blocks of binary codes that have a same pseudo unique identifier,
for each pair of matched blocks of binary code, comparing the fingerprint for the block of binary code in the baseline report with the fingerprint for the block of binary code in the modified version,
marking the block of binary code as modified when the fingerprints are different, and marking remaining binary codes of the original computer program that were not matched as modified.

### Claim 13 (depends on 12)

The system of claim 12, further comprising a test executor for executing the identified one or more tests to verify the binary code changes.

### Claim 14 (depends on 12)

The system of claim 12, wherein the executed set of tests comprises a plurality of sub-tests and the baseline report includes coverage data that identifies which subtest covers which block of binary code in the original computer program.

### Claim 15 (depends on 12)

The system of claim 12, wherein creating a baseline report comprises scanning the original computer program; computing a fingerprint for each block of binary code of the original computer program; and determining binary code changes between the original computer program and the modified version of the computer program utilizing the fingerprints for blocks of binary code.

### Claim 16 (depends on 12)

The system of claim 12, wherein the blocks of binary code are defined by line numbers that correspond to the binary code.

### Claim 17 (depends on 12)

The system of claim 12, wherein the blocks of binary code are defined by a name of a class or method to which the binary code belongs.

### Claim 18 (depends on 15)

The system of claim 15, wherein the fingerprint is a checksum calculated as a Cyclic Redundancy Check from data stream of the binary code.

### Claim 19

A non-transitory tangible computer readable memory storing a plurality of computer instructions, the instructions when executed by one or more processor perform a method for testing changes to binary code of a computer program, the method comprising:
collecting test coverage data from an executed set of tests of an original computer program; creating a baseline report containing correlations between the executed set of tests and blocks of binary code of the original computer program;
determining binary code changes between the original computer program and a modified version of the computer program; and
identifying one or more tests to be executed for verifying the binary code changes, wherein determining binary code changes comprises:
iterating over each block of binary code of the modified version of the computer program and checking whether said each block of binary code exists in same location in the binary codes of the original computer program and the modified version of the computer program,
for each block of binary code that exists in the same locations, comparing a fingerprint for the block of binary code in the baseline report with a fingerprint for the block of binary code in the modified version of the computer program, and
marking the code block as modified when the fingerprints are different,
for all blocks of binary code that do not exist in same locations in the binary codes of the original computer program and the modified version of the computer program, matching blocks of binary codes that have a same pseudo unique identifier, for each pair of matched blocks of binary code, comparing the fingerprint for the block of binary code in the baseline report with the fingerprint for the block of binary code in the modified version,
marking the block of binary code as modified when the fingerprints are different, and
marking remaining binary codes of the original computer program that were not matched as modified.

### Claim 20 (depends on 19)

The non-transitory tangible computer readable memory of claim 19, further comprising instructions for executing the identified one or more tests to verify the binary code changes.
