Mock server for testing
AssigneeIntuit Inc.
InventorGarrett Bates
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.