CN109739656B - Interface data simulation method and device, storage medium and electronic equipment - Google Patents

Interface data simulation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109739656B
CN109739656B CN201811446132.1A CN201811446132A CN109739656B CN 109739656 B CN109739656 B CN 109739656B CN 201811446132 A CN201811446132 A CN 201811446132A CN 109739656 B CN109739656 B CN 109739656B
Authority
CN
China
Prior art keywords
target
interface
annotation
data
mock
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
CN201811446132.1A
Other languages
Chinese (zh)
Other versions
CN109739656A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201811446132.1A priority Critical patent/CN109739656B/en
Publication of CN109739656A publication Critical patent/CN109739656A/en
Application granted granted Critical
Publication of CN109739656B publication Critical patent/CN109739656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The disclosure relates to an interface data simulation method, an interface data simulation device, a storage medium and an electronic device, wherein the method comprises the following steps: initiating a calling request to a target interface according to an input parameter sent by a calling direction to the target interface, wherein the target interface is connected with a service system with a target service function; after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation; and returning the target data to the caller through the target interface. The method can directly simulate and output the service data returned by the interface according to the interface function, reduce the influence of the development progress of a single interface on the whole development progress, avoid the step of simulating the interface, reduce the workload required by maintaining the simulation interface and improve the whole development efficiency.

Description

Interface data simulation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of network development, and in particular, to an interface data simulation method, apparatus, storage medium, and electronic device.
Background
In today's network development (e.g., Java Web development), developers are increasingly inclined towards a front-end separated development approach. Specifically, the backend (also called a service end) only provides processing of the service logic and provides a service interface to the outside. And the front end acquires data by calling an interface provided by the server and displays the data to the user through a page. In many cases, the integration among a plurality of systems can be completed through an interface provided by the service system. Based on the development scenario, in most cases, the format of interface data (input parameters and output parameters) provided by the server to the outside is defined first, and corresponding interface documents are generated based on the agreed format, and then, each service system independently completes the development of its own function according to the interface documents. In the development scenario, a calling party can debug the interface only after the development of the server-side interface is completed, and a large number of interface connections are generated in the interface debugging process.
In the related art, in order to avoid the influence of the development progress of a single server or a business system on the overall development progress, a system with a Mock function is generally required to be configured for a development environment, and then the invocation of an actual interface and the receiving and outputting of data are simulated through a simulation interface created by the system. Therefore, even if the function of the actual interface is not developed and completed, the calling party can still independently complete the function of the calling party according to the data output by the simulation interface. And after the function development of the actual interface is completed, the simulation interface is switched to the actual interface, and then the whole joint debugging work is completed. However, in actual operation, the Mock system still has the problems of complicated system construction steps, large workload for maintaining the analog interface, easy occurrence of address errors when switching the analog interface and the actual interface, and the like, and affects the overall efficiency of network development.
Disclosure of Invention
To overcome the problems in the related art, it is an object of the present disclosure to provide an interface data simulation method, apparatus, storage medium, and electronic device.
In order to achieve the above object, according to a first aspect of embodiments of the present disclosure, there is provided an interface data simulation method, including:
initiating a calling request to a target interface according to an input parameter sent by a calling direction to the target interface, wherein the target interface is connected with a service system with a target service function;
after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation;
and returning the target data to the caller through the target interface.
Optionally, before the triggering the call request to the target interface according to the interface entry sent by the caller, the method further includes:
and adding the Mock annotation to the target interface according to the target service function.
Optionally, the preset frame is a Spring model-view-controller Spring MVC frame, and after the call request is initiated, the analog Mock annotation attached to the target interface is intercepted by a facet-oriented programming AOP technology under the preset frame to obtain the target data, where the method includes:
after the call request is initiated, detecting whether the Mock annotation is attached to the target interface;
intercepting the Mock annotation through the AOP technology of the Spring MVC framework when detecting that the Mock annotation is attached to the target interface;
and analyzing the Mock annotation through the AOP technology of the Spring MVC frame to obtain the simulation data as the target data.
Optionally, the initiating a call request to the target interface according to the input parameter sent by the calling party to the target interface includes:
receiving the input parameters;
determining whether the input parameter has parameter attributes required for invoking the target interface, the parameter attributes including: parameter name, parameter type and request mode;
and when the input parameter is determined to have the parameter attribute required for calling the target interface, initiating the calling request.
According to a second aspect of the embodiments of the present disclosure, there is provided an interface data simulation apparatus, the apparatus including:
the request initiating module is used for initiating a calling request to a target interface according to an input parameter sent to the target interface by a calling party, and the target interface is connected with a service system with a target service function;
the annotation intercepting module is used for intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame after the call request is initiated so as to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation;
and the data return module is used for returning the target data to the caller through the target interface.
Optionally, the apparatus further comprises:
and the annotation adding module is used for adding the Mock annotation to the target interface according to the target service function.
Optionally, the preset frame is a Spring model-view-controller Spring MVC frame, and the annotation intercepting module includes:
the annotation detection submodule is used for detecting whether the Mock annotation is attached to the target interface or not after the call request is initiated;
the annotation interception sub-module is used for intercepting the Mock annotation through the AOP technology of the Spring MVC framework when the fact that the Mock annotation is attached to the target interface is detected;
and the data acquisition sub-module is used for analyzing the Mock annotation through the AOP technology of the Spring MVC frame to acquire the simulation data as the target data.
Optionally, the request initiating module includes:
the parameter receiving submodule is used for receiving the input parameters;
the parameter detection submodule determines whether the input parameter has parameter attributes required for calling the target interface, wherein the parameter attributes comprise: parameter name, parameter type and request mode;
and the request initiating submodule is used for initiating the calling request when the input parameter is determined to have the parameter attribute required for calling the target interface.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of the interface data simulation method provided by the first aspect of the embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the interface data simulation method provided by the first aspect of the embodiments of the present disclosure.
Through the technical scheme, the method and the device can initiate the calling request of the target interface according to the input parameters sent by the calling direction to the target interface, and the target interface is connected with a business system with a target business function; after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation; and returning the target data to the caller through the target interface. The method can directly simulate and output the service data returned by the interface according to the interface function, reduce the influence of the development progress of a single interface on the whole development progress, avoid the step of simulating the interface, reduce the workload required by maintaining the simulation interface and improve the whole development efficiency.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a method of interface data simulation in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating another interface data simulation method according to the embodiment shown in FIG. 1;
FIG. 3 is a flow diagram illustrating an annotation interception method according to the embodiment shown in FIG. 2;
FIG. 4 is a flow diagram illustrating a method of call request initiation according to the embodiment shown in FIG. 2;
FIG. 5 is a block diagram illustrating an interface data simulation apparatus according to an exemplary embodiment;
FIG. 6 is a block diagram of another interface data simulation apparatus according to the embodiment shown in FIG. 5;
FIG. 7 is a block diagram of an annotation interception module according to the embodiment shown in FIG. 6;
FIG. 8 is a block diagram illustrating a request initiation module according to the embodiment shown in FIG. 6;
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a method of interface data simulation according to an exemplary embodiment, as shown in fig. 1, the method comprising:
step 101, initiating a call request to a target interface according to an input parameter sent to the target interface by a call direction.
Wherein, the target interface is connected with a service system with a target service function.
Taking the target service function as an example of querying the user information, at this time, the target interface is an interface taking the user ID as an input parameter and taking the user information corresponding to the user ID as an output parameter. After a user ID is input to the target interface from a calling party, the parameter name, the parameter type and the request mode of the user ID input at this time need to be detected, and a calling request is initiated when the user ID meets the parameter attribute defined by the target interface. It should be noted that the business system is part of a network development project, and the network development project is an integration of a plurality of business systems. Moreover, the business system is not developed at this time, that is, the target business function cannot be realized through the calling of the target interface and the input and output of the parameter.
And step 102, after the call request is initiated, intercepting the simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data.
The target data is simulation data of business data corresponding to the target business function generated through the Mock annotation. The default framework may be a Spring MVC (Model-View-Controller) framework. The data formats of the input parameters and the target data are both in a JSON (JavaScript Object Notation) format. The Mock annotation may directly support JSON format strings. The Spring MVC framework can provide an AOP (Aspect Oriented Programming) technology, and all parts of business logic can be isolated by using the AOP technology, so that the coupling degree between all parts of the business logic is reduced, and the reusability of a program is improved. In the embodiment of the disclosure, the AOP technology may perform fragment interception on the code according to the code function.
Still taking the target business function as an example for querying the user information, the target interface with the Mock annotation can be expressed as follows:
Figure BDA0001885753120000061
the "public Map < String, Object > getuser (String userid)" is defined as the parameter attribute of the target interface, and the "return null" position is the position where the service system is connected with the target interface after the development is completed (in the embodiment of the present disclosure, the return value of the interface is defined as "return null" to avoid the adverse effect of the uncompleted service system on the annotation interception process). In addition, "@ Mock (" { \\ "code \": 0\ ", \" name \ ": zhang \ three \ and \" mobile \ ": 18611112222 \") "is the above-mentioned Mock annotation. It can be understood that the detection and interception of the Mock annotation is actually the detection of the above-mentioned "@ Mock ()" character, and the content in the parenthesis of the "@ Mock ()" character is the business data to be output in the JSON format.
In addition, the target data in the JSON format generated according to the annotation is:
Figure BDA0001885753120000071
the user information such as the user number, the user name, the telephone number and the like is the output parameter corresponding to the input parameter 'user ID'. It will be appreciated that these output parameters are not output by the interface, but are modeled from the Mock annotation attached to the target interface.
Step 103, returning the target data to the caller through the target interface.
To sum up, the present disclosure can initiate a call request to a target interface according to an input parameter sent by the call direction to the target interface, where the target interface is connected to a service system having a target service function; after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation; and returning the target data to the caller through the target interface. The method can directly simulate and output the service data returned by the interface according to the interface function, reduce the influence of the development progress of a single interface on the whole development progress, avoid the step of simulating the interface, reduce the workload required by maintaining the simulation interface and improve the whole development efficiency.
Fig. 2 is a flowchart illustrating another interface data simulation method according to the embodiment shown in fig. 1, and as shown in fig. 2, before step 101, the method may further include:
and 104, adding the Mock annotation to the target interface according to the target service function.
Illustratively, before simulating the business data output by the target interface through step 101-. The added Mock annotation needs to be based on the service function corresponding to the interface, and the data format of the simulated data is ensured to be consistent with the data format output by the service system.
Fig. 3 is a flowchart of an annotation interception method according to the embodiment shown in fig. 2, and as shown in fig. 3, the step 102 may include:
step 1021, after the call request is initiated, detecting whether the Mock annotation is attached to the target interface.
Illustratively, when detecting that the Mock annotation is attached to the target interface, steps 1022 and 1023 may be continued to obtain the target data returned by the interface; and when detecting that the Mock annotation is not attached to the target interface, generating actual business data according to the input parameters through a business system corresponding to the target interface, and returning the actual business data through the target interface. In fact, in the embodiment of the present disclosure, a Mock annotation is added to each interface that is not developed and completed by the business system, and the output parameter of the interface that is not developed and completed by the business system is usually defined as a null value. Therefore, for an interface which is not developed and completed by a business system, when the fact that the Mock annotation is not attached to the target interface is detected, the actual business data returned here is null.
And step 1022, intercepting the Mock annotation by the AOP technology of the Spring MVC framework when detecting that the Mock annotation is attached to the target interface.
Step 1023, parsing the Mock annotation by the AOP technology of the Spring MVC framework to obtain the simulation data as the target data.
Fig. 4 is a flowchart illustrating a method for initiating a call request according to the embodiment shown in fig. 2, where, as shown in fig. 4, the step 101 may include:
at step 1011, the input parameters are received.
At step 1012, it is determined whether the input parameter has the parameter attribute required to invoke the target interface.
Wherein the parameter attribute comprises: parameter name, parameter type and request mode.
Step 1013, when it is determined that the input parameter has the parameter attribute required for calling the target interface, the call request is initiated.
For example, when the interface is a normal interface connected to a developed business system, the original process of inputting the parameter into the target interface actually includes a function of detecting the parameter attribute of the input parameter, but the target data may be generated by direct simulation according to the Mock annotation (that is, the parameter attribute of the interface is not checked), and therefore, when the input parameter is received, the parameter attribute of the input parameter needs to be detected to ensure that the input parameter is the input parameter matched with the target interface.
To sum up, the present disclosure can initiate a call request to a target interface according to an input parameter sent by the call direction to the target interface, where the target interface is connected to a service system having a target service function; after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation; and returning the target data to the caller through the target interface. The method can directly simulate and output the service data returned by the interface according to the interface function, reduce the influence of the development progress of a single interface on the whole development progress, avoid the step of simulating the interface, reduce the workload required by maintaining the simulation interface and improve the whole development efficiency.
Fig. 5 is a block diagram illustrating an interface data simulation apparatus according to an exemplary embodiment, and as shown in fig. 5, the apparatus 500 includes:
a request initiating module 510, configured to initiate a call request for a target interface according to an input parameter sent by a call direction to the target interface, where the target interface is connected to a service system having a target service function;
an annotation intercepting module 520, configured to intercept, after the call request is initiated, a Mock annotation attached to the target interface by using a facet-oriented programming AOP technology in a preset frame, so as to obtain target data, where the target data is simulated data of service data corresponding to the target service function generated by the Mock annotation;
a data return module 530 for returning the target data to the caller via the target interface.
Fig. 6 is a block diagram of another interface data simulation apparatus according to the embodiment shown in fig. 5, and as shown in fig. 6, the apparatus 500 further includes:
and the annotation adding module 540 is configured to add the Mock annotation to the target interface according to the target service function.
Fig. 7 is a block diagram of an annotation interception module according to the embodiment shown in fig. 6, where the preset framework is a Spring model-view-controller Spring MVC framework shown in fig. 7, and the annotation interception module 520 includes:
an annotation detection submodule 521, configured to detect whether the Mock annotation is attached to the target interface after the call request is initiated;
an annotation interception sub-module 522, configured to intercept the Mock annotation through the AOP technology of the Spring MVC framework when detecting that the Mock annotation is attached to the target interface;
the data obtaining sub-module 523 is configured to parse the Mock annotation through the AOP technology of the Spring MVC framework to obtain the simulation data as the target data.
Fig. 8 is a block diagram illustrating a request initiation module according to the embodiment shown in fig. 6, as shown in fig. 8,
the request initiating module comprises:
the parameter receiving submodule is used for receiving the input parameter;
the parameter detection submodule determines whether the input parameter has a parameter attribute required for calling the target interface, wherein the parameter attribute comprises: parameter name, parameter type and request mode;
and the request initiating submodule is used for initiating the calling request when the input parameter is determined to have the parameter attribute required for calling the target interface.
To sum up, the present disclosure can initiate a call request to a target interface according to an input parameter sent by the call direction to the target interface, where the target interface is connected to a service system having a target service function; after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation; and returning the target data to the caller through the target interface. The method can directly simulate and output the service data returned by the interface according to the interface function, reduce the influence of the development progress of a single interface on the whole development progress, avoid the step of simulating the interface, reduce the workload required by maintaining the simulation interface and improve the whole development efficiency.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 9 is a block diagram illustrating an electronic device 900 in accordance with an example embodiment. As shown in fig. 9, the electronic device 900 may include: a processor 901, a memory 902, multimedia components 903, input/output (I/O) interfaces 904, and communications components 905.
The processor 901 is configured to control the overall operation of the electronic device 900, so as to complete all or part of the steps in the interface data simulation method. The memory 902 is used to store various types of data to support operation of the electronic device 900, such as instructions for any application or method operating on the electronic device 900 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 902 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 903 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 902 or transmitted through the communication component 905. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 904 provides an interface between the processor 901 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 905 is used for wired or wireless communication between the electronic device 900 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 905 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described interface data simulation method.
In another exemplary embodiment, a computer readable storage medium comprising program instructions, such as a memory 902 comprising program instructions, executable by a processor 901 of an electronic device 900 to perform the interface data emulation method described above is also provided.
Preferred embodiments of the present disclosure are described in detail above with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and other embodiments of the present disclosure may be easily conceived by those skilled in the art within the technical spirit of the present disclosure after considering the description and practicing the present disclosure, and all fall within the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. Meanwhile, any combination can be made between various different embodiments of the disclosure, and the disclosure should be regarded as the disclosure of the disclosure as long as the combination does not depart from the idea of the disclosure. The present disclosure is not limited to the precise structures that have been described above, and the scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method for interface data simulation, the method comprising:
initiating a calling request to a target interface according to an input parameter sent by a calling direction to the target interface, wherein the target interface is connected with a service system with a target service function;
after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation;
returning the target data to the caller through the target interface;
the preset frame is a Spring model-view-controller Spring MVC frame, and after the call request is initiated, intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under the preset frame to obtain target data, wherein the method comprises the following steps:
after the call request is initiated, detecting whether the Mock annotation is attached to the target interface;
intercepting the Mock annotation through the AOP technology of the Spring MVC framework when detecting that the Mock annotation is attached to the target interface;
and analyzing the Mock annotation through the AOP technology of the Spring MVC frame to obtain the simulation data as the target data.
2. The method of claim 1, wherein before the triggering the call request to the target interface according to the interface entry sent by the caller, the method further comprises:
and adding the Mock annotation to the target interface according to the target service function.
3. The method of claim 1, wherein initiating a call request to a target interface according to an input parameter sent by a caller to the target interface comprises:
receiving the input parameters;
determining whether the input parameter has parameter attributes required for invoking the target interface, the parameter attributes including: parameter name, parameter type and request mode;
and when the input parameter is determined to have the parameter attribute required for calling the target interface, initiating the calling request.
4. An interface data simulation apparatus, the apparatus comprising:
the request initiating module is used for initiating a calling request to a target interface according to an input parameter sent to the target interface by a calling party, and the target interface is connected with a service system with a target service function;
the annotation intercepting module is used for intercepting a simulation Mock annotation attached to the target interface through a section-oriented programming AOP technology under a preset frame after the call request is initiated so as to obtain target data, wherein the target data is simulation data of service data corresponding to the target service function generated through the Mock annotation;
the data return module is used for returning the target data to the caller through the target interface;
the preset frame is a Spring model-view-controller Spring MVC frame, and the annotation interception module comprises:
the annotation detection submodule is used for detecting whether the Mock annotation is attached to the target interface or not after the call request is initiated;
the annotation interception sub-module is used for intercepting the Mock annotation through the AOP technology of the Spring MVC framework when the fact that the Mock annotation is attached to the target interface is detected;
and the data acquisition sub-module is used for analyzing the Mock annotation through the AOP technology of the Spring MVC frame to acquire the simulation data as the target data.
5. The apparatus of claim 4, further comprising:
and the annotation adding module is used for adding the Mock annotation to the target interface according to the target service function.
6. The apparatus of claim 4, wherein the request initiation module comprises:
the parameter receiving submodule is used for receiving the input parameters;
the parameter detection submodule determines whether the input parameter has parameter attributes required for calling the target interface, wherein the parameter attributes comprise: parameter name, parameter type and request mode;
and the request initiating submodule is used for initiating the calling request when the input parameter is determined to have the parameter attribute required for calling the target interface.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
8. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 3.
CN201811446132.1A 2018-11-29 2018-11-29 Interface data simulation method and device, storage medium and electronic equipment Active CN109739656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811446132.1A CN109739656B (en) 2018-11-29 2018-11-29 Interface data simulation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811446132.1A CN109739656B (en) 2018-11-29 2018-11-29 Interface data simulation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109739656A CN109739656A (en) 2019-05-10
CN109739656B true CN109739656B (en) 2020-11-27

Family

ID=66358307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811446132.1A Active CN109739656B (en) 2018-11-29 2018-11-29 Interface data simulation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109739656B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147326B (en) * 2019-05-23 2023-05-26 四川新网银行股份有限公司 Microservice automatic test method based on Redis database
CN110460583B (en) * 2019-07-15 2022-06-03 中国平安人寿保险股份有限公司 Sensitive information recording method and device and electronic equipment
CN112241332B (en) * 2019-07-16 2023-09-22 北京京东振世信息技术有限公司 Interface compensation method and device
CN110502224B (en) * 2019-08-22 2023-04-28 深圳前海环融联易信息科技服务有限公司 Interface simulation method and device based on HTTP request and computer equipment
CN110515962B (en) * 2019-08-30 2021-06-25 北京三快在线科技有限公司 Method and device for caching data, electronic equipment and storage medium
CN111400178A (en) * 2020-03-13 2020-07-10 深圳前海环融联易信息科技服务有限公司 Automatic interface number making method and device, computer equipment and storage medium
CN113722020A (en) * 2020-05-26 2021-11-30 腾讯科技(深圳)有限公司 Interface calling method, device and computer readable storage medium
CN111797020A (en) * 2020-07-03 2020-10-20 北京每日优鲜电子商务有限公司 Mock data method and device based on dynamic bytecode
CN111831277B (en) * 2020-09-21 2021-06-25 腾讯科技(深圳)有限公司 Virtual data generation method, system, device and computer readable storage medium
CN115344502B (en) * 2022-10-18 2023-03-10 中建电子商务有限责任公司 Method for automatically generating mock data and automatically loading mock data based on real data

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291375B2 (en) * 2004-03-29 2012-10-16 Sybase, Inc. Attribute-based component programming system and methodology for object-oriented languages

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902619B (en) * 2011-07-29 2015-09-09 阿里巴巴集团控股有限公司 The regression testing method of web application and device
US20150074647A1 (en) * 2012-04-20 2015-03-12 Doron Levi Testing system for an integrated software system
CN106528393A (en) * 2015-09-09 2017-03-22 北京京东尚科信息技术有限公司 Method and device for Mock testing of WebService
CN105389256B (en) * 2015-11-11 2018-07-03 中国建设银行股份有限公司 A kind of unit test method and system
CN107179984A (en) * 2016-03-10 2017-09-19 北京京东尚科信息技术有限公司 A kind of interface mock methods and interface test method
CN107220169B (en) * 2016-03-21 2021-05-28 创新先进技术有限公司 Method and equipment for simulating server to return customized data
CN108427631B (en) * 2017-02-14 2022-04-12 北京京东尚科信息技术有限公司 Application test system, method, electronic equipment and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291375B2 (en) * 2004-03-29 2012-10-16 Sybase, Inc. Attribute-based component programming system and methodology for object-oriented languages

Also Published As

Publication number Publication date
CN109739656A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109739656B (en) Interface data simulation method and device, storage medium and electronic equipment
CN108345531B (en) Test method, device and system
US9495543B2 (en) Method and apparatus providing privacy benchmarking for mobile application development
CN108182131B (en) Method and device for monitoring application running state, storage medium and electronic equipment
CN109391676B (en) Terminal device control method, terminal device, and computer-readable storage medium
WO2020211360A1 (en) Mock test method and system, electronic device, and computer non-volatile readable storage medium
CN107423218B (en) Application testing method, device and terminal
CN111459685A (en) Communication method, device, equipment and readable medium of page end and native end
CN111444103A (en) Automatic testing method for Web page and related equipment
KR20210042283A (en) Data processing method, device, equipment and medium for applet
CN113778897B (en) Automatic test method, device and equipment for interface and storage medium
KR20150003651A (en) Computing system and control method thereof
CN108920358B (en) Message bus routing table generation method and device, storage medium and electronic equipment
WO2023169193A1 (en) Method and device for generating smart contract
CN108616657B (en) Method and device for realizing soft phone dialing in mobile terminal
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN113626321B (en) Bridging test method, device, system and storage medium
CN111338961B (en) Application debugging method and device, electronic equipment and storage medium
CN112395138B (en) Method and device for checking parameters
CN114461223A (en) Code generation method and device and terminal equipment
CN111813407B (en) Game development method, game running device and electronic equipment
CN114428737A (en) Communication method, device, equipment and storage medium based on micro service system
CN108009057B (en) Test method and device for password input, storage medium and electronic equipment
CN112214404A (en) Mobile application testing method and device, storage medium and electronic equipment
CN114065141A (en) Equipment jail-crossing detection method and device, storage medium and electronic equipment

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