CN112383434B - Interface simulation method and device for network request, electronic equipment and storage medium - Google Patents

Interface simulation method and device for network request, electronic equipment and storage medium Download PDF

Info

Publication number
CN112383434B
CN112383434B CN202011287863.3A CN202011287863A CN112383434B CN 112383434 B CN112383434 B CN 112383434B CN 202011287863 A CN202011287863 A CN 202011287863A CN 112383434 B CN112383434 B CN 112383434B
Authority
CN
China
Prior art keywords
network request
request
network
mock
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011287863.3A
Other languages
Chinese (zh)
Other versions
CN112383434A (en
Inventor
沈凌潇
陈奕文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011287863.3A priority Critical patent/CN112383434B/en
Publication of CN112383434A publication Critical patent/CN112383434A/en
Application granted granted Critical
Publication of CN112383434B publication Critical patent/CN112383434B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an interface simulation method, an interface simulation device, electronic equipment and a computer readable storage medium for network requests. The interface simulation method comprises the following steps: and constructing a call package of the network request, acquiring the network request through the call package, determining a matched Mock rule according to the network request, determining a preset return body according to the Mock rule, and returning the preset return body. Therefore, the Mock of the network request is realized, the stability of the returned data of the network request is ensured, and the stability of the tested system is improved.

Description

Interface simulation method and device for network request, electronic equipment and storage medium
Technical Field
The present invention relates to computer technology, and in particular, to a network request interface simulation method, an interface simulation apparatus, an electronic device, and a computer readable storage medium.
Background
In the micro-service architecture, since each service often has many upstream and downstream dependencies, such as providing data or processing data, when testing a service writing unit, in order to ensure accuracy of data in the test, mock can be performed on HTTP requests of the service, so as to ensure stability of data returned by the HTTP requests.
However, in the related art, mock needs to rely on servlets (servlets), system resource overhead is high, and mock aspect class needs to be implemented for each mock interface by adding notes, so that the code quantity is large, and additionally, codes which are additionally implemented are packaged and issued into a system together, so that useless codes exist in the whole system, and the risk of system problems is increased. Therefore, how to conveniently and quickly realize the Mock of the HTTP request, and ensuring the stability of the system becomes a key.
Disclosure of Invention
In view of this, the present application aims to solve, at least to some extent, one of the problems in the related art. To this end, an object of the present application is to provide an interface simulation method, an interface simulation apparatus, an electronic device, and a computer-readable storage medium of a network request.
The interface simulation method for the network request in the embodiment of the application comprises the following steps:
constructing a call package of the network request;
acquiring the network request through the call encapsulation;
determining a matched Mock rule according to the network request; and
and determining a preset returning body according to the Mock rule and returning the preset returning body.
The interface simulation device for network request in the embodiment of the application comprises:
the construction module is used for constructing call encapsulation of the network request;
the acquisition module is used for acquiring the network request through the calling encapsulation;
the determining module is used for determining matched Mock rules according to the network request; and
and the return module determines a preset return body according to the Mock rule and returns the preset return body.
The electronic device of an embodiment of the application comprises a processor for:
constructing a call package of the network request;
acquiring the network request through the call encapsulation;
determining a matched Mock rule according to the network request; and
and determining a preset returning body according to the Mock rule and returning the preset returning body.
The electronic device of the embodiment of the application comprises one or more processors and a memory; and
one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the interface simulation method. The interface simulation method comprises the following steps: constructing a call package of the network request, acquiring the network request through the call package, and determining a matched Mock rule according to the network request; and determining a preset returning body according to the Mock rule and returning the preset returning body.
The computer readable storage medium of the embodiments of the present application includes a computer program, which when executed by one or more processors, causes the processors to perform the interface simulation method. The interface simulation method comprises the following steps: constructing a call package of the network request, acquiring the network request through the call package, and determining a matched Mock rule according to the network request; and determining a preset returning body according to the Mock rule and returning the preset returning body.
In the interface simulation method, the interface simulation device, the electronic equipment and the computer readable storage medium for the network request, the network request of the tested system is obtained by constructing the calling package according to the network request, and then the corresponding Mock rule is matched according to the network request to realize the Mock for the network request, so that the data corresponding to the network request is returned. Therefore, the Mock of the network request is realized, the stability of the returned data of the network request is ensured, in addition, the network request of the tested system is acquired by calling and packaging, the code invasion of the tested system is avoided, and the stability of the tested system is improved.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of an interface simulation method for network requests according to some embodiments of the present application.
Fig. 2 is a block diagram of an interface simulation apparatus for network requests according to some embodiments of the present application.
Fig. 3 is a block diagram of an electronic device according to some embodiments of the present application.
Fig. 4 is a block diagram of an electronic device according to some embodiments of the present application.
FIG. 5 is a schematic diagram of a connection of a processor and a computer-readable storage medium of certain embodiments of the present application.
Fig. 6 is a schematic diagram of one scenario of an interface simulation method according to some embodiments of the present application.
Fig. 7 is a further schematic illustration of an interface simulation method of some embodiments of the present application.
Fig. 8 is a further flow diagram of an interface simulation method of some embodiments of the present application.
Description of main reference numerals:
the electronic device 1, the interface simulation apparatus 10, the construction module 11, the acquisition module 12, the determination module 13, the return module 14, the processor 20, the memory 30, the program 32, the computer-readable storage medium 40, the computer program 42.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or an implicit indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless specifically defined otherwise.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; may be mechanically connected, may be electrically connected, or may be in communication with each other; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
The following disclosure provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present application. Furthermore, the present application may repeat reference numerals and/or letters in the various examples, which are for the purpose of brevity and clarity, and which do not in themselves indicate the relationship between the various embodiments and/or arrangements discussed.
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
The entire system of the micro-service architecture is typically dispersed into a plurality of service systems, each of which implements a respective function, and the service systems typically interact with each other through a remote call protocol such as hypertext transfer protocol (HyperText Transfer Protocol, HTTP) or Dubbo.
Unit testing is an effective means of ensuring code quality. It finds out possible problems in the code as early as possible by testing the local methods, classes, etc. at the encoding stage and repairs them.
When writing a unit test for a service system, a scene that interaction is requested by a network such as HTTP or Dubbo is often serviced, and the accuracy of data cannot be ensured in the test process, so that the test for the service system frequently fails due to external factors. Thus, to address this problem, unit testing may Mock HTTP requests external to the service system, ensuring the data stability of the data requests returned.
One skilled in the relevant art will appreciate that mock is the creation of a virtual object to simulate the behavior of an object during testing for objects that are not easily constructed/obtained.
However, in the related art, the dock scheme adopted for performing dock on the HTTP request depends on a Spring Framework of a three-party, and with upgrading of the Framework version, dock may be unavailable. In terms of scheme performance, mock needs to rely on servlets (servlets), each time use needs to start engineering, system resource overhead is high, and a Mock aspect class needs to be realized for each Mock interface by adding notes, so that code quantity is large. In addition, the codes additionally realized are packaged and issued into the system of the micro-service architecture, so that useless codes exist in the whole system, and the risk of system problems is increased. Therefore, when testing the system, how to conveniently and rapidly realize the HTTP request for Mock, and ensuring the stability of the service system becomes a key.
In view of this, referring to fig. 1, an embodiment of the present application provides an interface simulation method for a network request, where the interface simulation method includes the steps of:
s11: constructing a call package of a network request;
s12: acquiring a network request by calling encapsulation;
s13: determining a matched Mock rule according to the network request; and
s14: and determining a preset returning body according to the Mock rule and returning the preset returning body.
Referring further to fig. 2, an interface simulation apparatus 10 for network request is provided in an embodiment of the present application. The interface simulation apparatus 10 includes a construction module 11, an acquisition module 12, a determination module 13, and a return module 14.
Step S11 may be implemented by the construction module 11, step S12 may be implemented by the acquisition module 12, step S13 may be implemented by the determination module 13, and step S14 may be implemented by the return module 14.
Alternatively, the construction module 11 may be configured to construct a call encapsulation of the network request.
The acquisition module 12 may be used to acquire network requests by invoking encapsulation.
The determining module 13 may be configured to determine matching Mock rules based on the network request.
The return module 14 may determine a preset return according to the Mock rules and return the preset return.
Referring to fig. 3, an electronic device 1 is provided in an embodiment of the present application, and an interface simulation method of the present application may be completed by the electronic device 1. The electronic device 1 comprises a processor 20.
Processor 20 may be configured to construct a call encapsulation of the network request and to retrieve the network request via the call encapsulation. The processor 20 may also be configured to determine matching Mock rules based on the network request and to determine a preset returned volume based on the Mock rules and return the preset returned volume.
Referring to fig. 4, the present application provides an electronic device 1 including one or more processors 20, a memory 30; and one or more programs 32, wherein the one or more programs 32 are stored in the memory 30 and executed by the one or more processors 20, the programs 32 being executed by the processors 20 with instructions of the interface emulation method.
Referring to fig. 5, the present application provides one or more non-transitory computer-readable storage media 40 containing a computer program 42 that, when executed by one or more processors 20, causes the processors 20 to perform an interface simulation method.
In the interface simulation method, the interface simulation device 10, the electronic apparatus 1 and the computer readable storage medium 40 for network requests in these embodiments, the network request of the tested system is obtained by establishing a call package for the network request, and the call package matches a corresponding Mock rule according to the network request, and finally the Mock rule is used to implement the Mock for the network request, thereby determining a corresponding preset return body. In addition, the network request of the tested system is acquired by calling the package, so that the code invasion of the tested system is avoided, and the stability of the tested system is improved.
In some embodiments, the electronic device 1 may be a cell phone, a computer, a smart wearable device (smart watch, smart bracelet, smart helmet, smart glasses, etc.), a virtual reality device or a head display device.
The present embodiment is described taking the electronic apparatus 1 as an example of a computer, that is, the interface simulation method and the interface simulation apparatus 10 are applied to, but not limited to, a computer. The interface simulation apparatus 10 may be hardware or software preinstalled on a computer, and may perform an interface simulation method when starting up operation on the computer. For example, the interface simulation apparatus 10 may be a piece of underlying software code of a computer or part of an operating system.
In some embodiments, the interface analog device 10 may be part of the electronic apparatus 1. Alternatively, the electronic device 1 comprises an interface simulation means 10.
In some embodiments, the interface simulation apparatus 10 may be a discrete component assembled in a manner to have the aforementioned functions, or a chip in the form of an integrated circuit having the aforementioned functions, or a computer software code segment that when run on a computer causes the computer to have the aforementioned functions.
In some embodiments, as hardware, the interface simulation apparatus 10 may be attached to a computer or computer system either separately or as an additional peripheral component. The interface simulation apparatus 10 may also be integrated into a computer or computer system, for example, the interface simulation apparatus 10 may be integrated into the processor 20 when the interface simulation apparatus 10 is part of the electronic device 1.
In some embodiments in which the interface simulation apparatus 10 is part of the electronic device 1, the code segments corresponding to the interface simulation apparatus 10 may be stored as software on the memory 30 for execution by the processor 20 to perform the aforementioned functions. Or interface simulation apparatus 10, includes one or more of the programs 32 described above, or one or more of the programs 32 described above includes interface simulation apparatus 10.
In some embodiments, the computer readable storage medium 40 may be a storage medium built in the electronic device 1, for example, may be the memory 30, or may be a storage medium that is removably plugged into the electronic device 1, for example, an SD card, or the like.
It should be noted that the electronic device may store a system under test, and the interface simulation method in the present application is used for unit test of the system under test. The tested system can comprise, but is not limited to, server programs of a browser, a short video, a magazine and the like, that is, when the server programs of the browser, the short video, the magazine and the like are used for carrying out unit test on the tested system, the network request of the server programs of the browser, the short video, the magazine and the like can be carried out by the interface simulation method of the application, and the stability of the returned data of the network request is ensured.
It should be further noted that the electronic device 1 further includes a network interface, where the network interface is configured to remotely interact with other services, and the network interface is configured to send a network request to the other services and receive data corresponding to the network request. Or, receiving network requests or data sent by other services, etc.
The network request includes, but is not limited to, an HTTP request or a Dubbo request, etc. Dubbo refers to a lightweight remote call protocol developed by aleba. HTTP request refers to a request message from a client to a server. The HTTP requests include Location requests, header requests, uniform resource locator parameter (Uniform Resource Location, URL) requests, and the like. The URL is an internal string on the Internet that describes information resources, including files, addresses and directories of servers, etc.
In this application, the network request is described by taking an HTTP request as an example, that is, the network request sent by the tested system is an HTTP request, but is not limited to the HTTP request.
Referring to fig. 6, specifically, the electronic device 1 includes a unit testing module for implementing unit testing of a tested system, where the tested system includes, but is not limited to, a server program of a browser, a short video, a magazine, and the like. The unit test module comprises a call encapsulation Channel and a thread local variable thread.
As will be appreciated by those skilled in the relevant art, encapsulating channels refers to packaging something together and then presenting it in a new, complete form; the manner in which the attributes, methods, or implementation details are hidden is referred to as encapsulation. In the present application, the call encapsulation refers to encapsulation generated by implementing that the network requests to call the function for encapsulation.
It should be noted that, because the call encapsulation is encapsulation for implementing the function of the network request call, the call encapsulation can avoid the code invasion of the tested system during the unit test, and improve the stability of the tested system.
The call encapsulation may be constructed by the processor 20 for retrieving network requests for the system under test. Specifically, the call package includes a Mock interface for Mock, which may be an application program interface (Application Programming Interface, API), which is also called an application programming interface, which is a set of definitions, programs, and protocols through which communication between computer software can be achieved. And calling and packaging to acquire the HTTP request through an application program interface for Mock in the process that the tested system sends the network request to the network interface.
ThreadLocal is a storage class inside a thread, and can store data in a specified thread, and after data storage, only the specified thread can obtain the stored data. In this application, thread local variables may be used to store HTTP Mock rules and preset returns.
The HTTP Mock rule is used for realizing Mock on the HTTP request. The HTTP Mock rules may include a plurality of HTTP Mock rules, one for each HTTP request, so that Mock of a plurality of HTTP requests may be implemented.
The preset returning body refers to data returned after the HTTP request is Mock. The preset return body comprises normal return data or abnormal state codes.
The normal return data may include, but is not limited to, location parameters, header parameters, and uniform resource locator parameters. It is understood that the location parameter is responsive to a location request of the HTTP request, the header parameter is responsive to a header parameter request of the HTTP request, and the uniform resource locator parameter is responsive to a uniform resource locator parameter request.
The abnormal state code may include a plurality, for example, the abnormal state code may be 403, 404, 500, 503, or the like. Wherein. The exception status code 403 indicates that the HTTP request of the system under test is rejected, i.e., rejected. The exception status code 404 indicates that the requested resource path does not exist. The exception status code 500 indicates that the request cannot be completed due to an internal error in the server. The abnormal status code 503 indicates that the service is not available. In the process of performing Mock on the HTTP request according to the HTTP Mock rule, if an abnormality occurs, a corresponding abnormal status code is returned, for example, the HTTP Mock rule refuses to perform Mock on the HTTP request, and then the method may return to 403.
Specifically, after the HTTP request is obtained by calling the encapsulation, the encapsulated Mock interface can query the ThreadLocal, match the HTTP request with the HTTP Mock rule in the ThreadLocal, and when the HTTP request is matched with the corresponding HTTP Mock rule, mock the HTTP request according to the HTTP Mock rule and return data. And if the Mock is abnormal, returning the corresponding abnormal state code.
Referring to fig. 7, it should be noted that, if the HTTP Mock rule matched with the HTTP request is not obtained when the encapsulated Mock interface is called to query ThreadLocal, the call encapsulation initiates the HTTP request to the network interface, so as to obtain data from the network interface, so as to complete the actual service flow.
In summary, in the interface simulation method, the interface simulation apparatus 10, the electronic device 1, and the nonvolatile computer readable storage medium 40 executing and storing the interface simulation method and the interface simulation apparatus according to the embodiments of the present application, in performing the unit test on the tested system, the package is called to intercept the HTTP request sent by the tested system to the network interface, and the corresponding HTTP Mock rule is queried, so that the Mock can be performed on the HTTP request according to the HTTP Mock rule, so that the data in the preset returned body is matched according to the HTTP request, and thus, the data desired to be obtained in the unit test is returned, and the stability of the unit test is ensured. Moreover, the method has no invasion to the tested system, avoids influencing the functions of the tested system, and improves the stability of the tested system.
Referring to fig. 8, in some embodiments, S12 further includes the steps of:
s122: sending a test request to a tested system so that the tested system generates a network request;
s124: and intercepting a network request generated by the tested system.
Referring further to fig. 2, in some embodiments, step S122 and step S124 may be implemented by the acquisition module 12.
In other words, the acquiring module 12 is configured to send a test request to the system under test to enable the system under test to generate a network request, and the acquiring module 12 may be further configured to intercept the network request generated by the system under test.
In some embodiments, the processor 20 may be configured to send a test request to the system under test to cause the system under test to generate a network request, and the processor 20 may be further configured to intercept the network request generated by the system under test.
With further reference to fig. 6 or 7, it should be noted that the unit Test module further includes a Test Case (Test Case), where the Test Case refers to a description of a Test task performed on a specific software product, so as to embody a Test scheme, a method, a technology and a policy. In the application, the unit test module sends a test request to the tested system through the test case so that the tested system generates a network request and receives data returned according to the network request.
It will be appreciated that, typically, after the system under test generates a network request, the network request is sent to the network interface, so that return data corresponding to the network request can be obtained from the network interface. Therefore, the network request is prevented from being sent to the network interface, so that the subsequent Mock of the network request can be realized, data corresponding to the network request is returned, and the network request is intercepted by calling encapsulation in the process that the tested system sends the network request to the network interface. Therefore, the decoupling requirement on the network interface is met, the writing efficiency of unit test is improved, and the stability of the unit test is ensured. .
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (8)

1. A method for interface simulation of a network request, comprising:
constructing a call package of the network request;
acquiring the network request through the call encapsulation;
determining a matched Mock rule according to the network request;
determining a preset returning body according to the Mock rule and returning the preset returning body; or (b)
In the case that the Mock matched with the network request is not acquired, initiating a network request to a network interface by the call encapsulation to acquire data from the network interface;
the obtaining the network request through the call encapsulation includes:
sending a test request to a tested system so that the tested system generates a network request;
intercepting the network request generated by the tested system.
2. The interface emulation method of claim 1, wherein the network request comprises an HTTP request, the HTTP request comprising a location request, a header request, and a uniform resource locator parameter request.
3. The interface simulation method according to claim 1, wherein the preset returned body includes normal returned data and an abnormal status code.
4. An interface simulation apparatus for a network request, the interface simulation apparatus comprising:
the construction module is used for constructing call encapsulation of the network request;
the acquisition module is used for acquiring the network request through the calling encapsulation;
the determining module is used for determining matched Mock rules according to the network request; and
the return module determines a preset return body according to the Mock rule and returns the preset return body; in the case that the Mock matched with the network request is not acquired, initiating a network request to a network interface by the call encapsulation to acquire data from the network interface;
the acquisition module is also used for sending a test request to a tested system so that the tested system generates a network request and intercepting the network request generated by the tested system.
5. An electronic device comprising a processor and a test case, the processor configured to:
constructing a call package of a network request;
acquiring the network request through the call encapsulation;
determining a matched Mock rule according to the network request;
determining a preset returning body according to the Mock rule and returning the preset returning body; or (b)
In the case that the Mock matched with the network request is not acquired, initiating a network request to a network interface by the call encapsulation to acquire data from the network interface;
the test case is used for sending a test request to a tested system so that the tested system generates a network request;
the processor is also used for intercepting the network request generated by the tested system.
6. The electronic device of claim 5, wherein the electronic device comprises a thread local variable for storing a Mock rule and a preset return.
7. An electronic device comprising one or more processors, memory; and
one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs comprising instructions for performing the interface emulation method of a network request according to any one of claims 1-3.
8. A non-transitory computer-readable storage medium containing a computer program, which when executed by one or more processors causes the processors to perform the interface emulation method of a network request of any one of claims 1-3.
CN202011287863.3A 2020-11-17 2020-11-17 Interface simulation method and device for network request, electronic equipment and storage medium Active CN112383434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011287863.3A CN112383434B (en) 2020-11-17 2020-11-17 Interface simulation method and device for network request, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011287863.3A CN112383434B (en) 2020-11-17 2020-11-17 Interface simulation method and device for network request, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112383434A CN112383434A (en) 2021-02-19
CN112383434B true CN112383434B (en) 2023-08-08

Family

ID=74584012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011287863.3A Active CN112383434B (en) 2020-11-17 2020-11-17 Interface simulation method and device for network request, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112383434B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN107122292A (en) * 2016-10-21 2017-09-01 北京小度信息科技有限公司 A kind of method and system of analog service
CN108199921A (en) * 2017-12-29 2018-06-22 上海瑞家信息技术有限公司 The method, apparatus and storage medium of a kind of simulation test
CN108733554A (en) * 2017-04-21 2018-11-02 北京京东尚科信息技术有限公司 Mock method and apparatus
CN108897691A (en) * 2018-06-29 2018-11-27 百度在线网络技术(北京)有限公司 Data processing method, device, server and medium based on interface analog service
CN109491905A (en) * 2018-11-02 2019-03-19 北京金山云网络技术有限公司 Head end test method, apparatus and electronic equipment
US10305962B1 (en) * 2015-12-30 2019-05-28 EMC IP Holding Company LLC Unit testing clients of web services
CN110162464A (en) * 2019-04-19 2019-08-23 平安普惠企业管理有限公司 Mcok test method and system, electronic equipment and readable storage medium storing program for executing
CN110851364A (en) * 2019-11-12 2020-02-28 深圳市前海随手数据服务有限公司 Software testing method, system and related equipment
CN111124873A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Method and device for returning Mock data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
US10305962B1 (en) * 2015-12-30 2019-05-28 EMC IP Holding Company LLC Unit testing clients of web services
CN107122292A (en) * 2016-10-21 2017-09-01 北京小度信息科技有限公司 A kind of method and system of analog service
CN108733554A (en) * 2017-04-21 2018-11-02 北京京东尚科信息技术有限公司 Mock method and apparatus
CN108199921A (en) * 2017-12-29 2018-06-22 上海瑞家信息技术有限公司 The method, apparatus and storage medium of a kind of simulation test
CN108897691A (en) * 2018-06-29 2018-11-27 百度在线网络技术(北京)有限公司 Data processing method, device, server and medium based on interface analog service
CN111124873A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Method and device for returning Mock data
CN109491905A (en) * 2018-11-02 2019-03-19 北京金山云网络技术有限公司 Head end test method, apparatus and electronic equipment
CN110162464A (en) * 2019-04-19 2019-08-23 平安普惠企业管理有限公司 Mcok test method and system, electronic equipment and readable storage medium storing program for executing
CN110851364A (en) * 2019-11-12 2020-02-28 深圳市前海随手数据服务有限公司 Software testing method, system and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
封装网络请求及 mock 数据;iKcamp;《https://www.jianshu.com/p/2888d0f65246》;20171023;第1页—第5页 *

Also Published As

Publication number Publication date
CN112383434A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
US7287190B2 (en) Simultaneous execution of test suites on different platforms
CN110765024B (en) Simulation test method, simulation test device, electronic equipment and computer readable storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN111143087A (en) Interface calling method and device, storage medium and server
CN107977260B (en) Task submitting method and device
CN111859205A (en) Analytic method and equipment for batch processing tasks
US7289989B2 (en) Pattern based web services
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN112383434B (en) Interface simulation method and device for network request, electronic equipment and storage medium
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN113645260A (en) Service retry method, device, storage medium and electronic equipment
CN111538672A (en) Test case layered test method, computer device and computer-readable storage medium
CN111159033A (en) Software testing method and device
CN117131545A (en) Data processing method and device, storage medium and terminal
CN113342353B (en) Mock data generation method and device
CN112637085B (en) Flow recording method and device, computer equipment and storage medium
CN111367694B (en) Event processing method, server and computer storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN112860770A (en) Report generation method and device, electronic equipment and storage medium
CN111857736A (en) Cloud computing product generation method, device, equipment and storage medium
CN111597020A (en) Application Programming Interface (API) debugging method and debugging terminal
CN110601926A (en) Statistical method and device for throughput of Web service end system
CN113901377B (en) Service calling method, device, storage medium and equipment of legacy system
US10936431B2 (en) Method, device and computer readable medium for restoring files
CN116303087A (en) Application debugging method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant