| CPC G06F 9/448 (2018.02) [G06F 9/455 (2013.01); G06F 9/54 (2013.01)] | 15 Claims |

|
1. An interface calling simulation method for developing an applet of an application program, performed by an electronic device, the method comprising:
receiving, from the applet of the application program, an interface calling request for a target interface in the application program, the interface calling request including interface calling information of the target interface;
querying a simulated interface set for the target interface based on the interface calling information of the target interface, wherein the simulated interface set includes simulated interfaces that simulate real interfaces in the application program;
in accordance with a determination that the simulated interface set includes a candidate simulation interface corresponding to the target interface:
intercepting the interface calling request using a WebSocket-based message manager;
forwarding, by the WebSocket-based message manager, the interface calling information of the target interface to a Mocking module;
comparing, by the Mocking module, the interface calling information of the target interface with interface configuration information of the candidate simulated interface;
in accordance with a determination that the interface calling information of the target interface matches the interface configuration information of the simulated interface, obtaining, by the Mocking module, simulated response data corresponding to the simulation interface;
generating, by the Mocking module, calling response data of the interface calling request based on the simulated response data; and
returning, by the Mocking module, the calling response data of the interface calling request to the applet via the WebSocket-based message manager.
|