US 11,816,022 B2
Snapshot simulation of service module responses
Boaz Shuster, Kefar Saba (IL); and Oded Ramraz, Wellesley, MA (US)
Assigned to Red Hat Israel, Ltd., Raanana (IL)
Filed by Red Hat Israel, Ltd., Raanana (IL)
Filed on Jul. 3, 2018, as Appl. No. 16/026,416.
Prior Publication US 2020/0012591 A1, Jan. 9, 2020
Int. Cl. G06F 16/955 (2019.01); G06N 20/00 (2019.01); G06F 11/36 (2006.01); H04L 67/02 (2022.01); G06F 16/901 (2019.01)
CPC G06F 11/3688 (2013.01) [G06F 11/3612 (2013.01); G06F 11/3684 (2013.01); G06F 16/901 (2019.01); H04L 67/02 (2013.01)] 11 Claims
OG exemplary drawing
 
1. A method comprising:
identifying, within a first service module, a set of functions that calls a second service module, both the first service module and the second service module associated with an application that is structured with a plurality of interworking service modules;
executing the first service module to send requests to the second service module when the set of functions is called;
capturing responses to the requests;
storing the responses in a snapshot data structure, wherein the snapshot data structure includes a first unique identifier of the first service module, a second unique identifier of the second service module, and a snapshot mode;
with a decorator that makes dynamic runtime modifications, creating a modified first service module in which the set of functions are modified by a first modification to return a response from the snapshot data structure in place of the second service module;
after performing the first modification, performing a second modification to modify the set of functions such that the modified first service module retrieves fewer digits of an account number from the snapshot data structure in place of the second service module, such that the modified first service module includes functions that are modified by both the first and the second modifications; and
after performing the first and the second modifications, performing a unit test on the modified first service module in accordance with the snapshot mode, wherein the unit test is performed on the functions of the set of functions that are modified by both the first and second modifications.