# US 10,956,311 B2 · White box code concurrency testing for transaction processing

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

- Number: US 10,956,311 B2
- Document ID: US10956311B2
- Status: Granted
- Kind: B2
- Application number: 16/520,434
- Filed: 2019-07-24
- Published: 2020-02-27
- Granted: 2021-03-23
- Earliest claimed: 2018-08-21
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Li Li; Li Xiang; Chang Zhi GZ Zhang; Ting Xie; Xin Zheng; Yan Wang; Hai He; Si Bin Fan
- Web page: https://patentgrep.com/patent/US10956311B2

## CPC

- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3652: {in-circuit-emulation [ICE] arrangements}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3692: {for test results analysis}
- G06F 11/3696: {Methods or tools to render software testable}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 16/901: Indexing; Data structures therefor; Storage structures (for retrieval from the web G06F16/951)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are systems, methods, and media for concurrency conflict testing for shared resources. An example method includes identifying shared resources that are to be accessed by an application. Generating a plurality of concurrency test scenarios based on the shared resources. Analyzing a plurality of concurrency test cases to detect which concurrency test cases include a reference to the shared resources. Executing a concurrency test scenario. Performing the following while or before the concurrency test scenario is executing, obtaining analyzed concurrency test cases associated with the concurrency test scenario which referenced the shared resources, obtaining application modules pertaining to the obtained concurrency test cases, generating concurrency application modules by adding breakpoints to the obtained application modules, executing the obtained concurrency test cases until all of the obtained concurrency test cases are latched at the breakpoints, and simultaneously resuming the execution of the obtained concurrency test cases.

## Claims

### Claim 1

A computer-implemented method for concurrency conflict testing for shared resources of an application, the method comprising:
identifying, by a system comprising one or more processors, the shared resources that are to be accessed by one or more components of the application;
generating, by the system, a plurality of concurrency test scenarios based on the shared resources;
analyzing, by the system, a plurality of concurrency test cases to detect which concurrency test cases of the plurality of concurrency test cases include a reference to the shared resources;
executing, by the system, a concurrency test scenario of the plurality of concurrency test scenarios; and
while the concurrency test scenario is executing:
obtaining the analyzed concurrency test cases which referenced the shared resources, wherein the obtained concurrency test cases are associated with the concurrency test scenario;
obtaining application modules pertaining to the obtained concurrency test cases; and
generating concurrency test modules for the obtained concurrency test cases by adding breakpoints to the obtained application modules such that the obtained concurrency test cases are each paused before the shared resources are accessed by the obtained concurrency test cases.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1 further comprising:
after executing the concurrency test scenario, checking whether the concurrency test scenario is valid;
filtering the concurrency test scenario in response to detecting that the concurrency test scenario is invalid; and
executing a second concurrency test scenario of the plurality of concurrency test scenarios.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1 further comprising:
detecting, based on the execution of the concurrency test scenario, at least one concurrency bug, wherein the at least one concurrency bug includes at least one dead lock bug, atomicity-violation bug, or order-violation bug; and
transmitting an electronic alert to a user in response to detecting the at least one concurrency bug.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the shared resources are identified by scanning source code of the application, wherein the identified shared resources are stored in a resource access repository of a database, wherein the resource access repository relates a component ID to at least one of a resource ID, a resource type, an access point, or an access type.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the generated concurrency application modules are stored in a concurrency application module repository stored in a database, wherein the concurrency application module repository relates a module name to a module ID, a resource ID, and to a breakpoint.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the concurrency test cases are obtained from a concurrency test case repository stored in a database, wherein the concurrency test case repository relates a test case ID to a component ID, two or more resources, and to an expected output.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1 further comprising:
building, by the system, relationships between the plurality of concurrency test scenarios and the plurality of concurrency test cases to identify which concurrency test cases are associated with which concurrency test scenarios by applying a function verification test (FVT) process.

### Claim 8

A computer program product for concurrency conflict testing for shared resources of an application, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a system comprising one or more processors to cause the system to perform a method, the method comprising:
identifying, by the system, the shared resources that are to be accessed by one or more components of the application;
generating, by the system, a plurality of concurrency test scenarios based on the shared resources;
analyzing, by the system, a plurality of concurrency test cases to detect which concurrency test cases of the plurality of concurrency test cases include a reference to the shared resources;
executing, by the system, a concurrency test scenario of the plurality of concurrency test scenarios; and
while the concurrency test scenario is executing:
obtaining the analyzed concurrency test cases which referenced the shared resources, wherein the obtained concurrency test cases are associated with the concurrency test scenario;
obtaining application modules pertaining to the obtained concurrency test cases; and
generating concurrency application modules for the obtained concurrency test cases by adding breakpoints to the obtained application modules such that the obtained concurrency test cases are each paused before the shared resources are accessed by the obtained concurrency test cases.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the method further includes:
after executing the concurrency test scenario, checking whether the concurrency test scenario is valid;
filtering the concurrency test scenario in response to detecting that the concurrency test scenario is invalid; and
executing a second concurrency test scenario of the plurality of concurrency test scenarios.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the method further includes:
detecting, based on the execution of the concurrency test scenario, at least one concurrency bug, wherein the at least one concurrency bug includes at least one dead lock bug, atomicity-violation bug, or order-violation bug; and
transmitting an electronic alert to a user in response to detecting the at least one concurrency bug.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the shared resources are identified by scanning source code of the application, wherein the identified shared resources are stored in a resource access repository of a database, wherein the resource access repository relates a component ID to at least one of a resource ID, a resource type, an access point, or an access type.

### Claim 12 (depends on 8)

The computer program product of claim 8, wherein the generated concurrency application modules are stored in a concurrency application module repository stored in a database, wherein the concurrency application module repository relates a module name to a module ID, a resource ID, and to a breakpoint.

### Claim 13 (depends on 8)

The computer program product of claim 8, wherein the concurrency test cases are obtained from a concurrency test case repository stored in a database wherein the concurrency test case repository relates a test case ID to a component ID, two or more resources, and to an expected output.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein the method further includes:
building, by the system, relationships between the plurality of concurrency test scenarios and the plurality of concurrency test cases to identify which concurrency test cases are associated with which concurrency test scenarios by applying a function verification test (FVT) process.

### Claim 15

A system for concurrency conflict testing for shared resources of an application, the system comprising one or more processors configured to perform a method, the method comprising:
identifying, by the system, the shared resources that are to be accessed by one or more components of the application;
generating, by the system, a plurality of concurrency test scenarios based on the shared resources;
analyzing, by the system, a plurality of concurrency test cases to detect which concurrency test cases of the plurality of concurrency test cases include a reference to the shared resources;
executing, by the system, a concurrency test scenario of the plurality of concurrency test scenarios; and
while the concurrency test scenario is executing:
obtaining the analyzed concurrency test cases which referenced the shared resources, wherein the obtained concurrency test cases are associated with the concurrency test scenario;
obtaining application modules pertaining to the obtained concurrency test cases; and
generating concurrency application modules for the obtained concurrency test cases by adding breakpoints to the obtained application modules such that the obtained concurrency test cases are each paused before the shared resources are accessed by the obtained concurrency test cases.

### Claim 16 (depends on 15)

The system of claim 15, wherein the method further includes:
after executing the concurrency test scenario, checking whether the concurrency test scenario is valid;
filtering the concurrency test scenario in response to detecting that the concurrency test scenario is invalid; and
executing a second concurrency test scenario of the plurality of concurrency test scenarios.

### Claim 17 (depends on 15)

The system of claim 15, wherein the method further includes:
detecting, based on the execution of the concurrency test scenario, at least one concurrency bug, wherein the at least one concurrency bug includes at least one dead lock bug, atomicity-violation bug, or order-violation bug; and
transmitting an electronic alert to a user in response to detecting the at least one concurrency bug.

### Claim 18 (depends on 15)

The system of claim 15, wherein the shared resources are identified by scanning source code of the application, wherein the identified shared resources are stored in a resource access repository of a database, wherein the resource access repository relates a component ID to at least one of a resource ID, a resource type, an access point, or an access type.

### Claim 19 (depends on 15)

The system of claim 15, wherein the generated concurrency application modules are stored in a concurrency application module repository stored in a database, wherein the concurrency application module repository relates a module name to a module ID, a resource ID, and to a breakpoint.

### Claim 20 (depends on 15)

The system of claim 15, wherein the method further includes:
building, by the system, relationships between the plurality of concurrency test scenarios and the plurality of concurrency test cases to identify which concurrency test cases are associated with which concurrency test scenarios by applying a function verification test (FVT) process.
