IP Library Granted Patent US 10,956,311
Granted Patent B2
US 10,956,311 · App. 16/520,434 · Granted Mar 23, 2021

White box code concurrency testing for transaction processing

Inventors: Li Li (Beijing, CN); Li Xiang (Beijing, CN); Chang Zhi GZ Zhang (Beijing, CN); Ting Xie (Beijing, CN); Xin Zheng (Beijing, CN); Yan Wang (Beijing, CN); Hai He (Beijing, CN); Si Bin Fan (Beijing, CN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F11/3684G06F11/3652G06F11/3664G06F11/3688G06F11/3692G06F11/3696G06F16/901
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,956,311
App. No.
16/520,434
Granted
Mar 23, 2021
Kind
B2
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 (62)

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.

2. 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.

3. 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.

4. 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.

5. 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.

6. 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.

7. 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.

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.

9. 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.

10. 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.

11. 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.

12. 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.

13. 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.

14. 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.

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.

16. 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.

17. 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.

18. 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.

19. 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.

20. 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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 24, 2019
From: LI, LI; XIANG, LI; ZHANG, CHANG ZHI GZ; XIE, TING; ZHENG, XIN; WANG, YAN; HE, HAI; FAN, SI BIN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 049844/0248 →
Continuity (2)
Continuation 16106818 · Aug 21, 2018
Related Publication 20200065235A1 · Feb 27, 2020