US 11,809,882 B2
Interface calling method and apparatus, and computer-readable storage medium
Yuansheng Xue, Shenzhen (CN); Yuan Hai, Shenzhen (CN); Yanghao Ou, Shenzhen (CN); Zhiwei Guo, Shenzhen (CN); Chao Lin, Shenzhen (CN); Canhui Huang, Shenzhen (CN); and Sicheng Huang, Shenzhen (CN)
Assigned to TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Shenzhen (CN)
Filed by Tencent Technology (Shenzhen) Company Limited, Shenzhen (CN)
Filed on Apr. 20, 2022, as Appl. No. 17/725,424.
Application 17/725,424 is a continuation of application No. PCT/CN2021/091868, filed on May 6, 2021.
Claims priority of application No. 202010454247.6 (CN), filed on May 26, 2020.
Prior Publication US 2022/0244967 A1, Aug. 4, 2022
Int. Cl. G06F 3/00 (2006.01); G06F 9/448 (2018.01); G06F 9/455 (2018.01); G06F 9/54 (2006.01)
CPC G06F 9/448 (2018.02) [G06F 9/455 (2013.01); G06F 9/54 (2013.01)] 18 Claims
OG exemplary drawing
 
1. An interface calling method for a development phase of an applet of an application program, performed by an electronic device, the method comprising:
providing a simulated interface set of the application program, the simulated interface set including a set of simulated interfaces that simulate actual interfaces of the application program for interacting with a remote server via the application program;
performing parameter configuration and calling response setting on a first simulated interface of the application program, to obtain interface configuration information of the first simulated interface and simulated response data corresponding to the first simulated interface;
receiving an interface calling request by the applet for a target interface in the application program, the interface calling request including interface calling information of the target interface, the applet performing a specific task of the application program;
based on the target interface, performing an interface query in the simulated interface set;
in accordance with a determination, based on the interface query, that the first simulated interface corresponding to the target interface exists in the simulated interface set, intercepting the interface calling request;
comparing the interface calling information in the intercepted interface calling request with the interface configuration information of the first simulated interface;
in accordance with a determination that the interface calling information matches the interface configuration information of the first simulated interface, obtaining the simulated response data corresponding to the first simulated interface; and
based on the simulated response data, outputting calling response data of the interface calling request.