Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method and device for simulating asynchronous interface, storage medium and computer equipment

An asynchronous interface, computer technology, applied in the field of interface simulation, can solve the problem of not supporting the simulation of asynchronous interface, unable to simulate the asynchronous response process, etc., to reduce costs, achieve complete testing, and improve efficiency.

Active Publication Date: 2019-07-30
PING AN TECH (SHENZHEN) CO LTD
View PDF10 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Existing MOCK frameworks and tools do not support the simulation of asynchronous interfaces, resulting in the inability to simulate the asynchronous response process in the mock test

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for simulating asynchronous interface, storage medium and computer equipment
  • Method and device for simulating asynchronous interface, storage medium and computer equipment
  • Method and device for simulating asynchronous interface, storage medium and computer equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.

[0028] For a method of simulating an asynchronous interface provided by an embodiment of the present invention, see figure 1 shown, including:

[0029] Step 101: When a call request is received, obtain the request address of the call request; and intercept a valid call request whose request address matches an asynchronous interface address, where the asynchronous interface address is the address of a preset asynchronous analog interface.

[0030] During the test, the party that needs to call the interface is taken as the sender, and which interface the sender needs to call is determined according to the address in the request sent by the sender. For example, the ex...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and device for simulating an asynchronous interface, a storage medium and computer equipment, and the method comprises the steps: intercepting an effective calling request with a request address matched with an asynchronous interface address, wherein the asynchronous interface address is a preset address of the asynchronous analog interface; returning a synchronization response to the sender of the effective calling request according to the effective calling request; determining a callback interface address, and determining callback parameters; and when the condition of the callback request is met, sending the callback parameter to a callback interface address, wherein the callback interface address is used for sending an asynchronous response to the senderof the valid call request. According to the method, the MOCK of the asynchronous interface is held, the method is suitable for asynchronous test scenes, and the efficiency in an integrated test containing an asynchronous test can be improved; risks in an integrated test can be preposed, problems can be found and solved in the morning, data waste and unnecessary resource and manpower consumption can be avoided in formal joint debugging, and the cost can be reduced.

Description

technical field [0001] The invention relates to the technical field of interface simulation, in particular to a method, device, storage medium and computer equipment for simulating an asynchronous interface. Background technique [0002] During the test, for some objects that are not easy to construct or obtain, it is necessary to create a virtual object for testing, and this virtual object is a MOCK object. Specifically, an interface can be used to describe the MOCK object, and the object is only referenced through the interface during testing. [0003] The current MOCK framework and tools can only simply return results synchronously, and one request corresponds to one synchronous response; however, some interfaces will return a result synchronously after a request, and then return a result to the agreed address after a period of time, that is, exist Respond asynchronously. For example, for the payment interface provided by some third-party payment platforms, after the pa...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3688Y02D10/00
Inventor 杨雨晨
Owner PING AN TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products