IP Library Granted Patent US 12,639,196
Granted Patent B2
US 12,639,196 · App. 16/022,437 · Granted May 26, 2026

Automatic mock enablement in a multi-module software system

Inventors: Eddie Gonzales (Richmond, CA); Somesh Benchalli (Sunnyvale, CA); Phani Pradeep Benarji Kommana (Pleasanton, CA); Ali Nazari (Brisbane, CA)
Assignee: Lendingclub Bank, National Association
G06F11/3684G06F11/3688
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 12,639,196
App. No.
16/022,437
Granted
May 26, 2026
Kind
B2
Abstract

Embodiments allow a mock-enabled software module to access a store of mock output data. Sets of mock output values (“SMOVs”), stored within the mock output store, are mapped to one or more key input values. When input sent to a mock-enabled software module includes one or more key input values that map to a given SMOV, the SMOV is included in a mock response from a target module of the given SMOV. When a set of input values, sent to a mock-enabled software module, does not include key input values that map to a SMOV, the mock-enabled module produces output without triggering any mock response. The mock output store may contain one or more replacement templates that are used to replace one or more mock output values, in a mock response, with one or more corresponding input values from the set of input values received by the triggering module.

Claims (104)

1 . A method comprising:

receiving, at a first mock-enabled software module of a multi-module system, a first request including or referencing a first set of input values for functionality of the first mock-enabled software module;

serializing, by the first mock-enabled software module, the first request into a hierarchically-organized document and searching the hierarchically-organized document for the first set of input values based at least in part on stored paths;

wherein the first set of input values includes at least two input values each having a property name and a corresponding value within the hierarchically-organized document storing input values of the first request;

determining, by the first mock-enabled software module, whether one or more values, of the first set of input values, are mapped, in an input-value-to-mock-value mapping, to a particular set of mock output values;

wherein the input-value-to-mock-value mapping comprises entries that each map a tuple comprising at least two property-name/value pairs from the hierarchically-organized document to a scenario identifier of the particular set of mock output values;

in response to determining that one or more values, of the first set of input values, are mapped to the particular set of mock output values:

causing an identifier of the particular set of mock output values comprising the scenario identifier to be sent to a downstream target mock-enabled software module distinct from the first mock-enabled software module, and

performing, at the downstream target mock-enabled software module, a key-based lookup of the identifier in a shared mock-output store to retrieve the particular set of mock output values;

wherein the downstream target mock-enabled software module is configured to retrieve the particular set of mock output values from a shared mock-output store based on the identifier without invoking native functionality to generate mock values and without accessing the input-value-to-mock-value mapping, and to send the particular set of mock output values unchanged to a consumer software module of the multi-module system;

receiving, at the first mock-enabled software module, a second request including or referencing a second set of input values for the functionality of the first mock-enabled software module;

wherein the first set of input values is different than the second set of input values;

determining, by the first mock-enabled software module, whether one or more values, of the second set of input values, are mapped, in the input-value-to-mock-value mapping, to any set of mock output values;

in response to determining that no set of mock output values is mapped, in the input-value-to-mock-value mapping, to any values of the second set of input values:

processing, by the functionality of the first mock-enabled software module, the second set of input values to produce a set of produced output values; and

causing the set of produced output values to be sent directly as input to a consumer software module of the multi-module system;

wherein the method is performed by one or more computing devices.

2 . The method of claim 1 , wherein the consumer software module to which the particular set of mock output values is sent is the same as the consumer software module to which the set of produced output values is sent.

3 . The method of claim 2 , further comprising:

the consumer software module producing a first set of output values based, at least in part, on the consumer software module consuming the particular set of mock output values;

determining whether the consumer software module passes a first test based, at least in part on the first set of output values; and

the consumer software module producing a second set of output values based, at least in part, on the consumer software module consuming the set of produced output values;

determining whether the consumer software module passes a second test based, at least in part, on the second set of output values.

4 . The method of claim 1 , wherein the consumer software module to which the particular set of mock output values is sent is different than the consumer software module to which the set of produced output values is sent.

5 . The method of claim 1 , further comprising:

using, as input for the functionality of the first mock-enabled software module, one or more values of the first set of input values to cause the functionality of the first mock-enabled software module to produce a particular set of output values; and

causing the particular set of output values to be sent, with the particular set of mock output values, as input to the consumer software module to which the particular set of mock output values is sent.

6 . The method of claim 1 , wherein the one or more values, of the first set of input values, are mapped to the particular set of mock output values based, at least in part, on an identifier of the particular set of mock output values comprising each value of the one or more values of the first set of input values.

7 . The method of claim 1 , further comprising: in response to detecting that the one or more values, of the first set of input values, are mapped to the particular set of mock output values: causing a particular value of the first set of input values to be sent as input to the consumer software module to which the particular set of mock output values is sent.

8 . The method of claim 1 , wherein:

the first set of input values are sent, to the first mock-enabled software module, as part of a request from the consumer software module to which the particular set of mock output values is sent; and

the first mock-enabled software module causes the particular set of mock output values to be sent.

9 . The method of claim 1 , wherein:

the particular set of mock output values comprises a whole set of mock output values;

one or more intervening mock-enabled software modules, of a series of mock-enabled software modules of the multi-module system, are mid-stream between the first mock-enabled software module and the target mock-enabled software module;

the series of mock-enabled software modules further comprises the first mock-enabled software module;

the first mock-enabled software module causing the identifier of the particular set of mock output values to be sent to the target mock-enabled software module comprises:

each of the series of mock-enabled software modules sending, to a subsequent software module in the series of mock-enabled software modules, at least the identifier of the particular set of mock output values; and

the target mock-enabled software module receiving the identifier of the particular set of mock output values from a last software module of the series of mock-enabled software modules.

10 . The method of claim 1 , wherein: the particular set of mock output values comprises a partial set of mock output values; and the method further comprises:

the target mock-enabled software module invoking one or more additional software modules, of the multi-module system, to retrieve a set of output values produced based on functionality of the one or more additional software modules;

causing the set of output values to be sent, with the particular set of mock output values, as input to the consumer software module to which the particular set of mock output values is sent.

11 . One or more non-transitory computer-readable media storing one or more sequences of instructions that, when executed by one or more processors, cause:

receiving, at a first mock-enabled software module of a multi-module system, a first request including or referencing a first set of input values for functionality of the first mock-enabled software module;

serializing, by the first mock-enabled software module, the first request into a hierarchically-organized document and searching the hierarchically-organized document for the first set of input values based at least in part on stored paths;

wherein the first set of input values includes at least two input values each having a property name and a corresponding value within the hierarchically-organized document storing input values of the first request;

determining, by the first mock-enabled software module, whether one or more values, of the first set of input values, are mapped, in an input-value-to-mock-value mapping, to a particular set of mock output values;

wherein the input-value-to-mock-value mapping comprises entries that each map a tuple comprising at least two property-name/value pairs from the hierarchically-organized document to a scenario identifier of the particular set of mock output values;

in response to determining that one or more values, of the first set of input values, are mapped to the particular set of mock output values:

causing an identifier of the particular set of mock output values comprising the scenario identifier to be sent to a downstream target mock-enabled software module distinct from the first mock-enabled software module, and

performing, at the downstream target mock-enabled software module, a key-based lookup of the identifier in a shared mock-output store to retrieve the particular set of mock output values;

wherein the downstream target mock-enabled software module is configured to retrieve the particular set of mock output values from a shared mock-output store based on the identifier without invoking native functionality to generate mock values and without accessing the input-value-to-mock-value mapping, and to send the particular set of mock output values unchanged to a consumer software module of the multi-module system;

receiving, at the first mock-enabled software module, a second request including or referencing a second set of input values for the functionality of the first mock-enabled software module;

wherein the first set of input values is different than the second set of input values;

determining, by the first mock-enabled software module, whether one or more values, of the second set of input values, are mapped, in the input-value-to-mock-value mapping, to any set of mock output values;

in response to determining that no set of mock output values is mapped, in the input-value-to-mock-value mapping, to any values of the second set of input values:

processing, by the functionality of the first mock-enabled software module, the second set of input values to produce a set of produced output values; and

causing the set of produced output values to be sent directly as input to a consumer software module of the multi-module system.

12 . The one or more non-transitory computer-readable media of claim 11 , wherein the consumer software module to which the particular set of mock output values is sent is the same as the consumer software module to which the set of produced output values is sent.

13 . The one or more non-transitory computer-readable media of claim 12 , wherein the one or more sequences of instructions further comprise instructions that, when executed by one or more processors, cause:

the consumer software module producing a first set of output values based, at least in part, on the consumer software module consuming the particular set of mock output values;

determining whether the consumer software module passes a first test based, at least in part on the first set of output values; and

the consumer software module producing a second set of output values based, at least in part, on the consumer software module consuming the set of produced output values;

determining whether the consumer software module passes a second test based, at least in part, on the second set of output values.

14 . The one or more non-transitory computer-readable media of claim 11 , wherein the consumer software module to which the particular set of mock output values is sent is different than the consumer software module to which the set of produced output values is sent.

15 . The one or more non-transitory computer-readable media of claim 11 , wherein the one or more sequences of instructions further comprise instructions that, when executed by one or more processors, cause:

using, as input for the functionality of the first mock-enabled software module, one or more values of the first set of input values to cause the functionality of the first mock-enabled software module to produce a particular set of output values; and

causing the particular set of output values to be sent, with the particular set of mock output values, as input to the consumer software module to which the particular set of mock output values is sent.

16 . The one or more non-transitory computer-readable media of claim 11 , wherein the one or more values, of the first set of input values, are mapped to the particular set of mock output values based, at least in part, on an identifier of the particular set of mock output values comprising each value of the one or more values of the first set of input values.

17 . The one or more non-transitory computer-readable media of claim 11 , wherein the one or more sequences of instructions further comprise instructions that, when executed by one or more processors, cause: in response to detecting that the one or more values, of the first set of input values, are mapped to the particular set of mock output values: causing a particular value of the first set of input values to be sent as input to the consumer software module to which the particular set of mock output values is sent.

18 . The one or more non-transitory computer-readable media of claim 11 , wherein:

the first set of input values are sent, to the first mock-enabled software module, as part of a request from the consumer software module to which the particular set of mock output values is sent; and

the first mock-enabled software module causes the particular set of mock output values to be sent.

19 . The one or more non-transitory computer-readable media of claim 11 , wherein:

the particular set of mock output values comprises a whole set of mock output values;

one or more intervening mock-enabled software modules, of a series of mock-enabled software modules of the multi-module system, are mid-stream between the first mock-enabled software module and the target mock-enabled software module;

the series of mock-enabled software modules further comprises the first mock-enabled software module;

the first mock-enabled software module causing the identifier of the particular set of mock output values to be sent to the target mock-enabled software module comprises:

each of the series of mock-enabled software modules sending, to a subsequent software module in the series of mock-enabled software modules, at least the identifier of the particular set of mock output values; and

the target mock-enabled software module receiving the identifier of the particular set of mock output values from a last software module of the series of mock-enabled software modules.

20 . The one or more non-transitory computer-readable media of claim 11 , wherein:

the particular set of mock output values comprises a partial set of mock output values; and

the one or more sequences of instructions further comprise instructions that, when executed by one or more processors, cause:

the target mock-enabled software module invoking one or more additional software modules, of the multi-module system, to retrieve a set of output values produced based on functionality of the one or more additional software modules;

causing the set of output values to be sent, with the particular set of mock output values, as input to the consumer software module to which the particular set of mock output values is sent.

21 . A system comprising:

one or more hardware processors;

one or more non-transitory computer-readable media; and

program instructions stored on the one or more non-transitory computer-readable media which, when executed by the one or more hardware processors, cause the system to perform operations comprising:

receiving, at a first mock-enabled software module of a multi-module system, a first request including or referencing a first set of input values for functionality of the first mock-enabled software module;

serializing, by the first mock-enabled software module, the first request into a hierarchically-organized document and searching the hierarchically-organized document for the first set of input values based at least in part on stored paths;

wherein the first set of input values includes at least two input values each having a property name and a corresponding value within the hierarchically-organized document storing input values of the first request;

determining, by the first mock-enabled software module, whether one or more values, of the first set of input values, are mapped, in an input-value-to-mock-value mapping, to a particular set of mock output values;

wherein the input-value-to-mock-value mapping comprises entries that each map a tuple comprising at least two property-name/value pairs from the hierarchically-organized document to a scenario identifier of the particular set of mock output values;

in response to determining that one or more values, of the first set of input values, are mapped to the particular set of mock output values:

causing an identifier of the particular set of mock output values comprising the scenario identifier to be sent to a downstream target mock-enabled software module distinct from the first mock-enabled software module, and

performing, at the downstream target mock-enabled software module, a key-based lookup of the identifier in a shared mock-output store to retrieve the particular set of mock output values;

wherein the downstream target mock-enabled software module is configured to retrieve the particular set of mock output values from a shared mock-output store based on the identifier without invoking native functionality to generate mock values and without accessing the input-value-to-mock-value mapping, and to send the particular set of mock output values unchanged to a consumer software module of the multi-module system;

receiving, at the first mock-enabled software module, a second request including or referencing a second set of input values for the functionality of the first mock-enabled software module;

wherein the first set of input values is different than the second set of input values;

determining, by the first mock-enabled software module, whether one or more values, of the second set of input values, are mapped, in the input-value-to-mock-value mapping, to any set of mock output values;

in response to determining that no set of mock output values is mapped, in the input-value-to-mock-value mapping, to any values of the second set of input values:

processing, by the functionality of the first mock-enabled software module, the second set of input values to produce a set of produced output values; and

causing the set of produced output values to be sent directly as input to a consumer software module of the multi-module system.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 9, 2022
From: LENDINGCLUB CORPORATION
To: LENDINGCLUB BANK, NATIONAL ASSOCIATION
Reel/Frame 059910/0275 →
SECURITY INTEREST Recorded Aug 13, 2019
From: LENDINGCLUB CORPORATION
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 050035/0302 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2018
From: GONZALES, EDDIE; SOMESH, GONZALES; KOMMANA, PHANI PRADEEP BENARJI; NAZARI, ALI
To: LENDINGCLUB CORPORATION
Reel/Frame 046233/0811 →
Continuity (1)
Related Publication 20200004664A1 · Jan 2, 2020
References Cited (24)
US 4499555A · Huang · 1985 [cited by examiner]
US 8627296B1 · Picard · 2014 [cited by examiner]
US 9838482B1 · Hardy · 2017 [cited by examiner]
US 20030028579A1 · Kulkarni · 2003 [cited by examiner]
US 20060075306A1 · Chandrasekaran · 2006 [cited by examiner]
US 20070011143A1 · Fuh · 2007 [cited by examiner]
US 20090037013A1 · Hendler · 2009 [cited by examiner]
US 20090070336A1 · Wiechers · 2009 [cited by examiner]
US 20090150895A1 · Pullo · 2009 [cited by examiner]
US 20110239194A1 · Braude · 2011 [cited by examiner]
US 20150100600A1 · McGee · 2015 [cited by examiner]
US 20150363302A1 · Young · 2015 [cited by examiner]
US 20170286277A1 · Lau · 2017 [cited by examiner]
US 20170300402A1 · Hoffner · 2017 [cited by examiner]
US 20170351530A1 · Gupta · 2017 [cited by examiner]
US 20180060220A1 · Yao · 2018 [cited by examiner]
US 20180173605A1 · Kadioglu · 2018 [cited by examiner]
US 20180268307A1 · Kobayashi · 2018 [cited by examiner]
US 20180276111A1 · Datta · 2018 [cited by examiner]
US 20180300228A1 · Beyel, III · 2018 [cited by examiner]
Laurent Broudoux, Sep. 26, 2017, “Mocking Microservices Made Easy with Microcks”) (Year: 2017). [cited by examiner]
Jan M. Benjamin, Mar. 6, 2018,“How to mock out external services for API tests”) (Year: 2018). [cited by examiner]
“Mockito—All about Spies”, Himanshu Mittal, Apr. 29, 2018 (Year: 2018). [cited by examiner]
“Creating Mocks”, Mar. 17, 2018 (Year: 2018). [cited by examiner]