IP Library › Granted Patent US 11,113,187
Granted Patent B2
US 11,113,187 · App. 16/850,496 · Granted Sep 7, 2021

Mock server for testing

Inventor: Garrett Bates (Mountain View, CA)
Assignee: INTUIT, INC.
G06F11/3696G06F9/451G06F11/3612G06F11/3664G06F11/3688H04L41/145H04L43/50H04L67/146H04L67/16G06F9/4486G06F16/21G06F16/9574
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 11,113,187
App. No.
16/850,496
Granted
Sep 7, 2021
Kind
B2
Abstract

Systems of the present disclosure provide a versatile, reusable mock server to respond to Application-Programming-Interface (API) requests. The mock server receives an API request and a cookie associated with the API request. The API server identifies response instructions found in the cookie. The response instructions may include a static response value, a name of an API server for the mock server to imitate, or code for the mock server to execute in the process of generating a mock API response. The mock server generates a mock API response based on the response instructions and sends the mock API response in reply to the API request.

Claims (59)

1. A method for providing application programming interface (API) response instructions for testing an application, comprising:

creating, at a client device:

response instructions indicating how a mock server is to respond to an API request; and

a response value;

sending, from the client device to the mock server, the API request comprising the response instructions and the response value;

receiving, from the mock server at the client device, an API response, wherein:

the API response is based on the response;

if the response instructions in the PI request comprise executable code, the API response comprises a transformed response value generated by executing the executable code; and

if the response instructions in the request do not comprise executable code, the API response comprises the response value; and

testing the application with the API response.

2. The method of claim 1 , wherein:

the response instructions in the API request comprise executable code;

the executable code specifies a proxy server for the mock server to mimic, and

the executable code is configured to cause the mock server to:

forward the API request to the proxy server;

receive a genuine API response from the proxy server; and

send the genuine API response as the API response to the client device.

3. The method of claim 1 , wherein the executable code is configured to cause the mock server to change the API response from a first format to a second format prior to sending the API response to the client device.

4. The method of claim 1 , wherein the executable code is configured to cause the mock server to wait for a specified amount of time before sending the API response to the client device.

5. The method of claim 1 , wherein the response instructions are encoded as parameters of a Uniform Resource Locator (URL).

6. The method of claim 3 , wherein causing the response value to be changed from the first format to the second format comprises a conversion between eXtensible Markup Language (XML) and Javascript Object Notation (JSON).

7. The method of claim 1 , wherein the API response comprises a hypertext transfer protocol (HTTP) status.

8. A system, comprising:

a memory storing executable instructions;

a processor configured to execute the executable instructions and cause the system to perform a method for providing application programming interface (API) response instructions for testing an application, the method comprising:

creating, at a client device:

response instructions indicating how a mock server is to respond to an API request; and

a response value;

sending, from the client device to the mock server, the API request comprising the response instructions and the response value;

receiving, from the mock server at the client device, an API response, wherein:

the API response is based on the response;

if the response instructions in the API request comprise executable code, the API response comprises a transformed response value generated by executing the executable code; and

if the response instructions in the API request do not comprise executable code, the API response comprises the response value; and

testing the application with the API response.

9. The system of claim 8 , wherein:

the response instructions in the API request comprise executable code;

the executable code specifies a proxy server for the mock server to mimic, and

the executable code is configured to cause the mock server to:

forward the API request to the proxy server;

receive a genuine API response from the proxy server; and

send the genuine API response as the API response to the system.

10. The system of claim 8 , wherein the executable code is configured to cause the mock server to change the API response from a first format to a second format prior to sending the API response to the system.

11. The system of claim 8 , wherein the executable code is configured to cause the mock server to wait for a specified amount of time before sending the API response to the system.

12. The system of claim 8 , wherein the response instructions are encoded as parameters of a Uniform Resource Locator (URL).

13. The system of claim 10 , wherein causing the response value to be changed from the first format to the second format comprises a conversion between eXtensible Markup Language (XML) and Javascript Object Notation (JSON).

14. A method for providing application programming interface (API) response instructions for testing an application, comprising:

creating, at a client device, executable code and a response value;

sending, from the client device to a mock server, an API request comprising the executable code;

receiving, from the mock server at the client device, an API response, wherein the API response comprises a transformed response value generated by executing the executable code; and

testing the application with the API response.

15. The method of claim 14 , wherein the executable code is configured to cause the mock server to change the API response from a first format to a second format prior to sending the API response to the client device.

16. The method of claim 14 , wherein the executable code is configured to cause the mock server to wait for a specified amount of time before sending the API response.

17. The method of claim 14 , wherein the API request comprises a Uniform-Resource-Locator (URL).

18. The method of claim 14 , wherein the executable code specifies a proxy server for the mock server to mimic, and the executable code is configured to cause the mock server to:

forward the API request to the proxy server;

receive a genuine API response from the proxy server; and

send the genuine API response as the API response to the client device.

19. The method of claim 14 , wherein the API response comprises a hypertext transfer protocol (HTTP) status.

20. The method of claim 15 , wherein causing the response value to be changed from the first format to the second format comprises a conversion between eXtensible Markup Language (XML) and Javascript Object Notation (JSON).

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 16, 2020
From: BATES, GARRETT
To: INTUIT, INC.
Reel/Frame 052418/0042 →
Continuity (3)
Continuation 16112485 · Aug 24, 2018
Continuation 15411779 · Jan 20, 2017
Related Publication 20200242020A1 · Jul 30, 2020