CN110798380A - Data acquisition method, system, device, test equipment and test server - Google Patents

Data acquisition method, system, device, test equipment and test server Download PDF

Info

Publication number
CN110798380A
CN110798380A CN201911012777.9A CN201911012777A CN110798380A CN 110798380 A CN110798380 A CN 110798380A CN 201911012777 A CN201911012777 A CN 201911012777A CN 110798380 A CN110798380 A CN 110798380A
Authority
CN
China
Prior art keywords
data
interface
call interface
procedure call
remote procedure
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.)
Granted
Application number
CN201911012777.9A
Other languages
Chinese (zh)
Other versions
CN110798380B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911012777.9A priority Critical patent/CN110798380B/en
Publication of CN110798380A publication Critical patent/CN110798380A/en
Application granted granted Critical
Publication of CN110798380B publication Critical patent/CN110798380B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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]
    • 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/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The embodiment of the invention provides a data acquisition method, a system, a device, test equipment and a test server, wherein the method comprises the following steps: when a test instruction for a service interface is acquired, whether the remote process call interface is available is judged, if not, a data request which accords with an analysis rule and contains parameters of remote process call interface data is constructed based on a hypertext transfer protocol through a preset simulation component and is sent to a test server, so that the test server analyzes the data request according to the analysis rule to obtain the parameters of the remote process call interface data, remote process call interface simulation data is constructed based on the parameters and is sent to test equipment, and the simulation data is received. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the simulation data of the remote procedure call interface to the test equipment, and the purpose of obtaining the simulation data of the remote procedure call interface is achieved.

Description

Data acquisition method, system, device, test equipment and test server
Technical Field
The present invention relates to the field of device testing technologies, and in particular, to a data acquisition method, system, device, test device, and test server.
Background
With the popularization and application of network technology, various application programs enter the aspects of people's lives. The application program uses the business interface and the coordination work of a plurality of downstream interfaces, wherein, when a user sends a business request, the business interface is triggered, at the moment, the business interface sends a data request to the downstream interfaces, response data returned by the server of the application program through the downstream interfaces are obtained, the business required by the user is realized based on the response data, and the downstream interfaces are used for providing the response data for the business interfaces. Currently, main downstream interfaces include an http (hyper text transfer protocol) interface, an rpc (remote procedure call protocol) interface, and the like.
Before an application program is online, whether the service interface is normally functional needs to be tested. If the real response data is used to test the service interface, it is necessary for multiple downstream interfaces to provide the response data at the same time, which causes great inconvenience, so that at present, more real data generated by the downstream interfaces are simulated to test the functions of the service interface in a mock test (simulation test) manner.
The mock test mode generally includes setting a corresponding relationship between a domain name and an IP address by configuring a host file (a system file without an extension), so that a test device installed with a tested application program can send a data request to a mock server, and the mock server can return mock data to the test device. The mock server can simulate the server of the application program to generate simulation response data corresponding to the data request, wherein the simulation response data comprises rpc interface data and http interface data.
When the downstream interface is an rpc interface, the rpc interface has special data encapsulation logic, so that the test equipment cannot acquire data of the rpc interface from the mock server.
Disclosure of Invention
The embodiment of the invention aims to provide a data acquisition method, a system, a device, test equipment and a test server, which are used for solving the problem that the data of a simulation rpc interface cannot be acquired in the mock test process.
The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a data acquisition method, which is applied to a test device, and the method includes:
when a test instruction aiming at a service interface is obtained, judging whether a remote procedure call interface is available;
if not, constructing a data request which accords with an analysis rule and contains parameters of the remote process call interface data based on a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by the test server;
sending the data request to a test server so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data, constructing remote procedure call interface simulation data based on the parameters, and sending the simulation data to the test equipment;
and receiving the simulation data of the remote procedure call interface.
Optionally, when determining that the remote procedure call interface is available, the method further includes:
and acquiring real data of the remote procedure call interface from a service server through the remote procedure call interface, wherein the service server is a server of an application program corresponding to the service interface.
Optionally, the method further includes:
acquiring current state information of the remote procedure call interface;
the step of judging whether the remote procedure call interface is available includes:
determining whether the remote procedure call interface is available based on the current state information.
Optionally, the method further includes:
obtaining hypertext transfer protocol interface simulation data from the test server;
and testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
In a second aspect, an embodiment of the present invention provides a data acquisition method, which is applied to a test server, and the method includes:
receiving a data request sent by test equipment, wherein the data request is a data request which is constructed by the test equipment through a preset simulation component when obtaining a test instruction, accords with an analysis rule and contains parameters of remote procedure call interface data based on a hypertext transfer protocol;
analyzing the data request based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data;
constructing remote procedure call interface simulation data based on the parameters;
and sending the remote procedure call interface simulation data to the test equipment.
In a third aspect, an embodiment of the present invention provides a data acquisition system, where the system includes:
the testing equipment is used for judging whether the remote procedure call interface is available or not when a testing instruction aiming at the service interface is obtained; if not, constructing a data request which accords with an analysis rule and contains parameters of the remote process call interface data based on a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by the test server; sending the data request to a test server; receiving remote procedure call interface simulation data;
the test server is used for receiving the data request sent by the test equipment; analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data; constructing remote procedure call interface simulation data based on the parameters; and sending the remote procedure call interface simulation data to the test equipment.
Optionally, the test device is further configured to obtain, by the remote procedure call interface, real data of the remote procedure call interface from a service server when it is determined that the remote procedure call interface is available, where the service server is a server of an application program corresponding to the service interface.
Optionally, the test device is further configured to obtain current state information of the remote procedure call interface; determining whether the remote procedure call interface is available based on the current state information.
Optionally, the test device is further configured to obtain hypertext transfer protocol interface simulation data from the test server; and testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
In a fourth aspect, an embodiment of the present invention provides a data acquisition apparatus, which is applied to test equipment, and the apparatus includes:
the interface state determining module is used for judging whether the remote procedure call interface is available or not when a test instruction aiming at the service interface is acquired;
the system comprises a data request establishing module, a data request establishing module and a data processing module, wherein the data request establishing module is used for constructing a data request which accords with an analysis rule and contains parameters of remote process call interface data on the basis of a hypertext transfer protocol through a preset simulation component when a remote process call interface is unavailable, and the analysis rule is a rule for a test server to analyze the data request;
a data request sending module, configured to send the data request to a test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, constructs remote procedure call interface simulation data based on the parameter, and sends the simulation data to the test device;
and the simulation data receiving module is used for receiving the simulation data of the remote process call interface.
Optionally, the apparatus further comprises:
and the real data acquisition module is used for acquiring real data of the remote process call interface from a service server through the remote process call interface, wherein the service server is a server of an application program corresponding to the service interface.
Optionally, the apparatus further comprises:
the state information acquisition module is used for acquiring the current state information of the remote process call interface;
the interface state determination module includes:
an interface state determination submodule for determining whether the remote procedure call interface is available based on the current state information.
Optionally, the apparatus further comprises:
the simulation data acquisition module is used for acquiring hypertext transfer protocol interface simulation data from the test server;
and the service interface testing module is used for testing the service interface based on the remote process calling interface simulation data and the hypertext transfer protocol interface simulation data.
In a fifth aspect, an embodiment of the present invention provides a data obtaining apparatus, which is applied to a test server, where the apparatus includes:
the data request receiving module is used for receiving a data request sent by the testing equipment, wherein the data request is a data request which is constructed by the testing equipment through a preset simulation component when a testing instruction is obtained and conforms to an analysis rule based on a hypertext transfer protocol and contains parameters of remote procedure call interface data;
the data request analysis module is used for analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain the parameter of the remote procedure call interface data;
the simulation data construction module is used for constructing simulation data of the remote procedure call interface based on the parameters;
and the simulation data sending module is used for sending the simulation data of the remote process call interface to the test equipment.
In a sixth aspect, an embodiment of the present invention provides a test device, where the test device includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any step of the data acquisition method applied to the test equipment when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention provides a test server, where the test server includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the data acquisition method applied to the test server when executing the program stored in the memory.
In the scheme provided by the embodiment of the invention, when a test instruction for a service interface is acquired, test equipment can judge whether a remote process call interface is available, if not, a data request which accords with an analysis rule and contains parameters of remote process call interface data is constructed on the basis of a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by a test server, the data request is sent to the test server so that the test server analyzes the data request according to the analysis rule on the basis of the hypertext transfer protocol to obtain the parameters of the remote process call interface data, remote process call interface simulation data is constructed on the basis of the parameters, the simulation data is sent to the test equipment, and the remote process call interface simulation data is received. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a data acquisition method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a test method of a service interface according to an embodiment of the present invention.
Fig. 3 is another flowchart of a data acquisition method according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a data acquisition system according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of another data acquisition apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a testing apparatus according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a test server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to obtain remote procedure call interface simulation data from a simulation test server, embodiments of the present invention provide a data obtaining method, system, apparatus, test device, test server, and computer-readable storage medium. First, a data acquisition method provided in an embodiment of the present invention is described below.
The data acquisition method provided by the embodiment of the invention can be applied to any electronic equipment needing to acquire remote procedure call interface data, such as a mobile phone, a computer, an intelligent watch and the like, and is not particularly limited herein. For convenience of description, it will be referred to as a test apparatus hereinafter.
First, a data acquisition method provided in an embodiment of the present invention is described below.
As shown in fig. 1, a data acquisition method applied to a test device includes:
s101, when a test instruction aiming at a service interface is obtained, judging whether a remote process call interface is available, if so, obtaining real data from a service server; if not, go to step S102.
S102, constructing a data request which accords with the analysis rule and contains parameters of the remote procedure call interface data based on the hypertext transfer protocol through a preset simulation component.
The analysis rule is a rule for analyzing the data request by the test server.
S103, sending the data request to a test server so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data, constructing remote procedure call interface simulation data based on the parameters, and sending the simulation data to the test equipment.
And S104, receiving the simulation data of the remote procedure call interface.
It can be seen that, in the scheme provided in the embodiment of the present invention, when obtaining a test instruction for a service interface, a test device may determine whether a remote procedure call interface is available, and if not, construct, by using a preset simulation component, a data request that conforms to an analysis rule and includes parameters of remote procedure call interface data based on a hypertext transfer protocol, where the analysis rule is a rule for a test server to analyze the data request, send the data request to the test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol, obtain parameters of the remote procedure call interface data, construct, based on the parameters, remote procedure call interface simulation data, send the simulation data to the test device, and receive the remote procedure call interface simulation data. In the related art, since the service interface may need to obtain the response data from a plurality of downstream interfaces, when the service interface needs to be tested, the simulation data may be obtained from the test server in a simulation test manner to test the function of the service interface. Since the downstream interface may be a hypertext transfer protocol interface or a remote procedure call interface, the simulation data constructed by the test server may include simulation data of the hypertext transfer protocol interface and simulation data of the remote procedure call interface.
The remote procedure call interface has special data encapsulation logic, and when the test equipment sends a data request through the interface, the sent data request is constructed based on a remote procedure call interface protocol. However, the communication protocol of the test server is based on the hypertext transfer protocol, so the test server cannot resolve the data request for acquiring the simulation data of the remote procedure call interface sent by the test equipment, and therefore the simulation data of the remote procedure call interface cannot be acquired.
In the solution provided in the embodiment of the present invention, since the data request sent by the test device is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test device, and achieve the purpose of obtaining the remote procedure call interface simulation data from the test server.
In order to facilitate the operation of the tester, the testing device may display a "test" button for the service interface to be tested, and when the tester triggers the button, the testing device may obtain a test instruction for the service interface. The manner in which the tester triggers the "test" button may be clicking, long pressing, etc., and is not specifically limited herein.
When the test instruction for the service interface is obtained, the test device may execute the step S101, that is, when the test instruction for the service interface is obtained, determine whether the remote procedure call interface is available. If the remote procedure call interface is available, the test device may obtain the real data from the service server, and if the remote procedure call interface is not available, the test device may not obtain the real data, and step S102 may be performed.
In step S102, the test device may construct, through the preset simulation component, a data request that conforms to the parsing rule and includes parameters of the remote procedure call interface data based on the hypertext transfer protocol. The preset simulation component may include a preset simulation interface, and the preset simulation interface may be connected to the test server.
In order to obtain the simulation data of the remote procedure call interface, the preset simulation interface may be a simulated interface capable of implementing the function of the remote procedure call interface. Since the communication protocol of the test server is based on the hypertext transfer protocol, that is, only the data request conforming to the parsing rule constructed based on the hypertext transfer protocol can be recognized by the test server, the preset simulation component can construct the data request conforming to the parsing rule based on the hypertext transfer protocol, so that the data request can be recognized and parsed by the test server.
The parsing rule is a rule for the test server to parse the data request, and the data request constructed based on the rule may be parsed by the test server to obtain various parameters in the data request, including a source IP address, data content, and/or data type.
The data request constructed based on the hypertext transfer protocol may include an IP Address (internet protocol Address) of the testing device and an IP Address of the testing server, so that the testing device may send the data request to the testing server through a Domain Name System (DNS) server.
The data request constructed based on the hypertext transfer protocol may further include parameters of the remote procedure call interface simulated by the preset simulation component, for example, a data type, a data format, a data range, an identifier, and the like of the remote procedure call interface.
The identifier can uniquely represent the remote procedure call interface simulated by the preset simulation component, and the device connected with the identifier can uniquely determine the remote procedure call interface according to the identifier. The identifier may be a name, a unique number, or other information capable of uniquely identifying the remote procedure call interface, and is not specifically limited herein.
After the test device constructs the data request, the test device may send the data request to the test server, i.e., execute step S103. When the test server receives the data request, the test server may parse the data request according to the parsing rule to obtain parameters of the remote procedure call interface data in the data request, for example, the parameters may be a data type, a data format, a data range, and the like.
The data request sent by the preset simulation component to the test server comprises the parameters, so that the test server can construct the interface data of the remote procedure call interface simulated by the preset simulation component according to the parameters. That is, after the test server analyzes the data request to obtain the parameters, the parameters may include various parameters such as a data type, a data format, a data range, and a unique identifier of the remote procedure call interface, so the test server may construct simulation data of the remote procedure call interface according to the parameters, and send the simulation data to the test device.
For example, when the test device obtains a test instruction for the video playing service interface sent by a tester, a data request including parameters of the test device IP, the test server IP and the remote procedure call interface data may be constructed through a preset simulation component based on a hypertext transfer protocol, and the test server may receive the data request, construct simulated original video data based on the parameters therein, and send the simulated original video data to the test device.
Before an application program is online, all interfaces are designed, so in another embodiment, in order to facilitate a test device to acquire simulation data, the test server may acquire request parameters of all interfaces in advance, and the test server may construct corresponding interface simulation data in advance according to the request parameters, that is, when the test device sends a data request to the test server, the test server may analyze the request parameters.
When the test server constructs and sends the simulation data to the test equipment, the test equipment can receive the simulation data, and then tests the service interface.
In an embodiment, in order to facilitate testing of the service interface, a storage space for storing data may be preset, and after receiving the simulation data returned by the test server, the test device may store the simulation data in the storage space, and may call the data from the storage space when testing the service interface.
As an implementation manner of the embodiment of the present invention, when determining that the remote procedure call interface is available, the method may further include:
and acquiring real data of the remote procedure call interface from a service server through the remote procedure call interface.
And the service server is a server of an application program corresponding to the service interface. The remote procedure call interface is a physical interface on the test equipment and is in communication connection with the server of the application program, when the remote procedure call interface is available, the test equipment can send a data request to the service server through the remote procedure call interface, and the service server can also send response data aiming at the data request to the test equipment through the remote procedure call interface. The service server is a server of an application program corresponding to the service interface.
In order to determine whether the remote procedure call interface is available, since each interface of the testing device is configured in advance according to its configuration file, the configuration file may include configuration information of the interface, a status parameter indicating whether the remote procedure call interface is available, a connection relationship between the interfaces, and the like.
For example, if the status parameter is 0, it indicates that the remote procedure call interface is not available, and if the status parameter is 1, it indicates that the remote procedure call interface is available.
When the test device determines that the remote procedure call interface is available, the step may be performed, that is, the real data of the remote procedure call interface may be acquired from the service server through the remote procedure call interface. That is, the test device may send a data request to the service server through the remote procedure call interface, and the service server may send response data returned based on the data request to the service interface.
Therefore, in the scheme provided by the embodiment of the invention, when the testing device judges that the remote procedure call interface is available, the real data of the remote procedure call interface is acquired from the service server through the remote procedure call interface, wherein the service server is a server of an application program corresponding to the service interface. Therefore, after the test work is finished, when the remote procedure call interface is available, the normal use of the service interface can be ensured without reconfiguring the test equipment.
As an implementation manner of the embodiment of the present invention, the method may further include:
and acquiring the current state information of the remote process call interface.
The current state information is information that can indicate whether the remote procedure call interface is currently available, and the current state information may be a number, a letter, a symbol, or the like, which is not limited herein.
In an embodiment, the current state information may be information determined based on the state parameter, and the current state information may be the same as the state parameter or may have a preset correspondence relationship. For example, if the state parameter of the remote procedure call interface is 0, it may be determined that the current state information is also 0; if the state parameter of the remote procedure call interface is 1, it can be determined that the current state information is also 1. For another example, if the state parameter of the remote procedure call interface is 0, the current state information may be determined to be a0, and if the state parameter of the remote procedure call interface is 1, the current state information may be determined to be a 1.
In another embodiment, the current status information may be information determined according to whether the service interface receives the returned data. If data from the remote procedure call interface can be received, it can be determined that the current state information is information indicating that the remote procedure call interface is currently available, for example, may be 1; conversely, if data from the remote procedure call interface cannot be received, the current state information may be determined to be information indicating that the remote procedure call interface is not currently available, which may be 0, for example.
Correspondingly, the step of determining whether the remote procedure call interface is available may include:
determining whether the remote procedure call interface is available based on the current state information.
This step may be performed after the test equipment determines the current state information of the remote procedure call interface.
Therefore, in the solution provided in the embodiment of the present invention, the test device may further obtain current state information of the remote procedure call interface, and further may determine whether the remote procedure call interface is available based on the current state information. Therefore, whether the remote procedure call interface is available or not can be quickly determined according to the current state information, and the testing efficiency is further improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, the method may further include:
s201, obtaining the simulation data of the hypertext transfer protocol interface from the test server.
The test server can construct remote procedure call interface simulation data and can also construct hypertext transfer protocol interface simulation data, and when a downstream interface of the service interface has both a remote procedure call interface and a hypertext transfer protocol interface, the test equipment can simultaneously acquire the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data from the test server.
If the downstream interface of the service interface comprises the hypertext transfer protocol interface, when a tester needs to perform simulation test on the service interface, the test equipment can also obtain the simulation data of the hypertext transfer protocol interface from the test server.
Because the hypertext transfer protocol interface transmits data based on the hypertext transfer protocol, the test equipment can send a data request to the test server through the hypertext transfer protocol interface to obtain the simulation data of the hypertext transfer protocol interface.
S202, testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
After the test equipment obtains the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data from the test server, the service interface can be tested.
In an embodiment, a downstream interface of the video playing service interface may include a remote procedure call interface and a hypertext transfer protocol interface, where the hypertext transfer protocol interface may provide original audio data for the video playing service interface, the remote procedure call interface may provide original image data for the video playing service interface, and after the video playing service interface obtains the original audio data and the original image data, the video playing service interface may process the original audio data and the original image data, and play the processed audio data and the processed image data at the same time, that is, the purpose of playing a video is achieved.
If the video playing service interface can play the processed audio data and image data normally at the same time, it can be determined that the function of the video playing service interface is normal.
If the video playing service interface can not play the processed audio data and image data normally at the same time, it can be determined that the function of the video playing service interface is abnormal.
Therefore, in the solution provided in the embodiment of the present invention, the test device may further obtain the simulation data of the hypertext transfer protocol interface from the test server, and test the service interface based on the remote procedure call interface simulation data and the simulation data of the hypertext transfer protocol interface. According to the scheme provided by the embodiment of the invention, the remote process call interface simulation data and the hypertext transfer protocol interface simulation data are obtained from the test server, so that the service interface with the data source of the remote process call interface and the hypertext transfer protocol interface can be tested, and the test requirement is met.
Corresponding to the first data obtaining method, another data obtaining method is provided in the embodiment of the present invention, and a second data obtaining method provided in the embodiment of the present invention is described below.
As shown in fig. 3, a data obtaining method applied to a test server includes:
s301, receiving a data request sent by the test equipment.
The data request is a data request which is constructed by the test equipment through a preset simulation component when the test instruction is obtained and conforms to an analysis rule based on a hypertext transfer protocol and contains parameters of remote procedure call interface data.
S302, analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain the parameters of the remote procedure call interface data.
S303, constructing simulation data of the remote procedure call interface based on the parameters.
S304, sending the remote procedure call interface simulation data to the test equipment.
It can be seen that, in the solution provided in the embodiment of the present invention, a test server may receive a data request sent by a test device, where the data request is a data request that is constructed by the test device when obtaining a test instruction, and that conforms to an analysis rule and includes a parameter of remote procedure call interface data based on a hypertext transfer protocol, and the data request is analyzed according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, and remote procedure call interface simulation data is constructed based on the parameter, and the remote procedure call interface simulation data is sent to the test device. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
In step S301, since the communication protocol of the test server is based on the hypertext transfer protocol, the data request can be identified only when the data request is constructed based on the hypertext transfer protocol and conforms to the parsing rule.
In one embodiment, when the test equipment obtains a test instruction for a service interface sent by a tester, a data request which conforms to an analysis rule and contains parameters of remote procedure call interface data can be constructed based on a hypertext transfer protocol through a preset simulation component. When the test equipment sends the data request to the test server, the data request can be identified by the test server because the data request is constructed based on the hypertext transfer protocol, and the test server can also receive the data request.
After the test server obtains the data request, step S302 may be executed. Because the data request is constructed based on the hypertext transfer protocol, the test server can identify the data request and obtain the content of the data request, and can also execute the step, i.e. the data request can be analyzed to obtain the parameters of the remote procedure call interface data, the IP address of the test equipment and the like, wherein the IP of the test equipment is used for enabling the test server to return the simulation data.
The parameters of the remote procedure call interface data are parameters of the interface data simulated by the preset simulation component, such as data type, data format, data range, and the like, and are not limited specifically herein.
After the test server obtains the parameters, step S303 may be executed, that is, remote procedure call interface simulation data may be constructed according to the parameters.
For example, after obtaining the parameters of the interface, the test server determines that the data type of the interface is an integer, the input data range is 1 to 10, and the output data size is 3 times of the input data, and the test server may construct 10 sets of corresponding input and output data, as shown in the following table:
inputting data Outputting the data Inputting data Outputting the data
1 3 6 18
2 6 7 21
3 9 8 24
4 12 9 27
5 15 10 30
After the test server constructs the simulation data of the remote procedure call interface, step S304 may be executed, that is, the simulation data is sent to the test equipment, so that the test equipment may test the service interface based on the simulation data.
According to the data acquisition method provided in the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a data acquisition system, as shown in fig. 4, the data acquisition system includes:
the test device 401 is configured to determine whether a remote procedure call interface is available when a test instruction for a service interface is obtained; if not, constructing a data request which accords with the analysis rule and contains the parameters of the remote procedure call interface data based on the hypertext transfer protocol through a preset simulation component.
The analysis rule is a rule for analyzing the data request by the test server; sending the data request to the test server; remote procedure call interface simulation data is received.
The test server 402 is configured to receive a data request sent by the test device; analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data; constructing remote procedure call interface simulation data based on the parameters; and sending the remote procedure call interface simulation data to the test equipment.
Therefore, in the scheme provided by the embodiment of the invention, the test equipment is used for judging whether the remote procedure call interface is available or not when the test instruction aiming at the service interface is obtained; if not, constructing a data request which accords with an analysis rule and contains parameters of the remote process call interface data based on a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by the test server; sending the data request to a test server; remote procedure call interface simulation data is received. The test server is used for receiving the data request sent by the test equipment; analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data; constructing remote procedure call interface simulation data based on the parameters; and sending the remote procedure call interface simulation data to the test equipment. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
As an implementation manner of the embodiment of the present invention, the test device is further configured to obtain real data of a remote procedure call interface from a service server through the remote procedure call interface when it is determined that the remote procedure call interface is available, where the service server is a server of an application program corresponding to the service interface.
As an implementation manner of the embodiment of the present invention, the test device is further configured to obtain current state information of the remote procedure call interface; determining whether the remote procedure call interface is available based on the current state information.
As an implementation manner of the embodiment of the present invention, the test device is further configured to obtain hypertext transfer protocol interface simulation data from the test server; and testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
According to the data obtaining method provided by the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a data obtaining apparatus, as shown in fig. 5, a data obtaining apparatus applied to a test device, including:
the interface state determining module 501 is configured to determine whether the remote procedure call interface is available when the test instruction for the service interface is obtained.
A data request creating module 502, configured to construct, by using a preset simulation component, a data request that conforms to the parsing rule and includes parameters of the remote procedure call interface data based on the hypertext transfer protocol when the remote procedure call interface is unavailable.
The analysis rule is a rule for analyzing the data request by the test server.
A data request sending module 503, configured to send the data request to a test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, constructs remote procedure call interface simulation data based on the parameter, and sends the simulation data to the test device.
An analog data receiving module 504, configured to receive the remote procedure call interface analog data.
It can be seen that, in the solution provided in the embodiment of the present invention, when obtaining a test instruction for a service interface, a test device may determine whether a remote procedure call interface is available, and if not, construct, by using a preset simulation component, a data request that meets an analysis rule and includes parameters of remote procedure call interface data based on a hypertext transfer protocol, where the analysis rule is a rule for a test server to analyze the data request, send the data request to the test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol, obtain parameters of the remote procedure call interface data, construct, based on the parameters, remote procedure call interface simulation data, send the simulation data to the test device, and receive the remote procedure call interface simulation data. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
As an implementation manner of the embodiment of the present invention, the apparatus may further include:
and the real data acquisition module is used for acquiring real data of the remote process call interface from a service server through the remote process call interface, wherein the service server is a server of an application program corresponding to the service interface.
As an implementation manner of the embodiment of the present invention, the apparatus may further include:
and the state information acquisition module is used for acquiring the current state information of the remote process call interface.
The interface state determination module includes:
an interface state determination submodule for determining whether the remote procedure call interface is available based on the current state information.
As an implementation manner of the embodiment of the present invention, the apparatus may further include:
and the analog data acquisition module is used for acquiring the hypertext transfer protocol interface analog data from the test server.
And the service interface testing module is used for testing the service interface based on the remote process calling interface simulation data and the hypertext transfer protocol interface simulation data.
Corresponding to the first data acquisition device, another data acquisition device is provided in the embodiments of the present invention, and a second data acquisition device provided in the embodiments of the present invention is described below.
As shown in fig. 6, a data acquisition apparatus applied to a test server includes:
the data request receiving module 601 is configured to receive a data request sent by a testing device.
The data request is a data request which is constructed by the test equipment through a preset simulation component when the test instruction is obtained and conforms to an analysis rule based on a hypertext transfer protocol and contains parameters of remote procedure call interface data.
A data request parsing module 602, configured to parse the data request according to the parsing rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data.
A simulation data constructing module 603, configured to construct remote procedure call interface simulation data based on the parameters.
A simulation data sending module 604, configured to send the remote procedure call interface simulation data to the test equipment.
It can be seen that, in the solution provided in the embodiment of the present invention, a test server may receive a data request sent by a test device, where the data request is a data request that is constructed by the test device when obtaining a test instruction, and that conforms to an analysis rule and includes a parameter of remote procedure call interface data based on a hypertext transfer protocol, and the data request is analyzed according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, and remote procedure call interface simulation data is constructed based on the parameter, and the remote procedure call interface simulation data is sent to the test device. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
The embodiment of the present invention further provides a testing apparatus, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the following steps when executing the program stored in the memory 703:
when a test instruction aiming at a service interface is obtained, judging whether a remote procedure call interface is available;
if not, constructing a data request which accords with the analysis rule and contains the parameters of the remote procedure call interface data based on the hypertext transfer protocol through a preset simulation component.
The analysis rule is a rule for analyzing the data request by the test server.
And sending the data request to a test server so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data, constructing remote procedure call interface simulation data based on the parameters, and sending the simulation data to the test equipment.
And receiving the simulation data of the remote procedure call interface.
It can be seen that, in the solution provided in the embodiment of the present invention, when obtaining a test instruction for a service interface, a test device may determine whether a remote procedure call interface is available, and if not, construct, by using a preset simulation component, a data request that meets an analysis rule and includes parameters of remote procedure call interface data based on a hypertext transfer protocol, where the analysis rule is a rule for a test server to analyze the data request, send the data request to the test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol, obtain parameters of the remote procedure call interface data, construct, based on the parameters, remote procedure call interface simulation data, send the simulation data to the test device, and receive the remote procedure call interface simulation data. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
The communication bus mentioned in the test device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the test equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
As an implementation manner of the embodiment of the present invention, when determining that the remote procedure call interface is available, the method may further include:
and acquiring real data of the remote procedure call interface from a service server through the remote procedure call interface.
The service server is a server of an application program corresponding to the service interface.
As an implementation manner of the embodiment of the present invention, the method may further include:
and acquiring the current state information of the remote process call interface.
The step of judging whether the remote procedure call interface is available includes:
determining whether the remote procedure call interface is available based on the current state information.
As an implementation manner of the embodiment of the present invention, the method may further include:
and acquiring hypertext transfer protocol interface simulation data from the test server.
And testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
The embodiment of the present invention further provides a test server, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
and receiving a data request sent by the test equipment.
The data request is a data request which is constructed by the test equipment through a preset simulation component when the test instruction is obtained and conforms to an analysis rule based on a hypertext transfer protocol and contains parameters of remote procedure call interface data.
And analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain the parameters of the remote procedure call interface data.
And constructing remote procedure call interface simulation data based on the parameters.
And sending the remote procedure call interface simulation data to the test equipment.
It can be seen that, in the solution provided in the embodiment of the present invention, a test server may receive a data request sent by a test device, where the data request is a data request that is constructed by the test device when obtaining a test instruction, and that conforms to an analysis rule and includes a parameter of remote procedure call interface data based on a hypertext transfer protocol, and the data request is analyzed according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, and remote procedure call interface simulation data is constructed based on the parameter, and the remote procedure call interface simulation data is sent to the test device. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
The communication bus mentioned in the test server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the test server and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, which, when being executed by a processor, realizes the steps of any of the data acquisition methods applied to the test equipment described above.
It can be seen that, in the solution provided in the embodiment of the present invention, when obtaining a test instruction for a service interface, a test device may determine whether a remote procedure call interface is available, and if not, construct, by using a preset simulation component, a data request that meets an analysis rule and includes parameters of remote procedure call interface data based on a hypertext transfer protocol, where the analysis rule is a rule for a test server to analyze the data request, send the data request to the test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol, obtain parameters of the remote procedure call interface data, construct, based on the parameters, remote procedure call interface simulation data, send the simulation data to the test device, and receive the remote procedure call interface simulation data. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In yet another embodiment provided by the present invention, another computer-readable storage medium is also provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data acquisition method applied to the test server.
It can be seen that, in the solution provided in the embodiment of the present invention, a test server may receive a data request sent by a test device, where the data request is a data request that is constructed by the test device when obtaining a test instruction, and that conforms to an analysis rule and includes a parameter of remote procedure call interface data based on a hypertext transfer protocol, and the data request is analyzed according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, and remote procedure call interface simulation data is constructed based on the parameter, and the remote procedure call interface simulation data is sent to the test device. Because the data request sent by the test equipment is constructed based on the hypertext transfer protocol, the test server can analyze the data request, construct and send the remote procedure call interface simulation data to the test equipment, and the purpose of obtaining the remote procedure call interface simulation data from the test server is achieved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system, the apparatus, the test device, the test server, and the computer-readable storage medium embodiments are substantially similar to the method embodiments, so that the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (18)

1. A data acquisition method is applied to test equipment and comprises the following steps:
when a test instruction aiming at a service interface is obtained, judging whether a remote procedure call interface is available;
if not, constructing a data request which accords with an analysis rule and contains parameters of the remote process call interface data based on a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by the test server;
sending the data request to a test server so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data, constructing remote procedure call interface simulation data based on the parameters, and sending the simulation data to the test equipment;
and receiving the simulation data of the remote procedure call interface.
2. The method of claim 1, wherein upon determining that a remote procedure call interface is available, the method further comprises:
and acquiring real data of the remote procedure call interface from a service server through the remote procedure call interface, wherein the service server is a server of an application program corresponding to the service interface.
3. The method of claim 1, further comprising:
acquiring current state information of the remote procedure call interface;
the step of judging whether the remote procedure call interface is available includes:
determining whether the remote procedure call interface is available based on the current state information.
4. The method of claim 1, further comprising:
obtaining hypertext transfer protocol interface simulation data from the test server;
and testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
5. A data acquisition method is applied to a test server and comprises the following steps:
receiving a data request sent by test equipment, wherein the data request is a data request which is constructed by the test equipment through a preset simulation component when obtaining a test instruction, accords with an analysis rule and contains parameters of remote procedure call interface data based on a hypertext transfer protocol;
analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data;
constructing remote procedure call interface simulation data based on the parameters;
and sending the remote procedure call interface simulation data to the test equipment.
6. A data acquisition system, characterized in that the system comprises:
the testing equipment is used for judging whether the remote procedure call interface is available or not when a testing instruction aiming at the service interface is obtained; if not, constructing a data request which accords with an analysis rule and contains parameters of the remote process call interface data based on a hypertext transfer protocol through a preset simulation component, wherein the analysis rule is a rule for analyzing the data request by the test server; sending the data request to the test server; receiving remote procedure call interface simulation data;
the test server is used for receiving the data request sent by the test equipment; analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain parameters of the remote procedure call interface data; and constructing remote procedure call interface simulation data based on the parameters, and sending the remote procedure call interface simulation data to the test equipment.
7. The system of claim 6,
the testing equipment is further used for acquiring real data of the remote procedure call interface from a service server through the remote procedure call interface when the remote procedure call interface is judged to be available, wherein the service server is a server of an application program corresponding to the service interface.
8. The system of claim 6,
the test equipment is also used for acquiring the current state information of the remote process call interface; determining whether the remote procedure call interface is available based on the current state information.
9. The system of claim 6,
the test equipment is also used for acquiring hypertext transfer protocol interface simulation data from the test server; and testing the service interface based on the remote procedure call interface simulation data and the hypertext transfer protocol interface simulation data.
10. A data acquisition device is characterized by being applied to test equipment, and the device comprises:
the interface state determining module is used for judging whether the remote procedure call interface is available or not when a test instruction aiming at the service interface is acquired;
the system comprises a data request establishing module, a data request establishing module and a data processing module, wherein the data request establishing module is used for constructing a data request which accords with an analysis rule and contains parameters of remote process call interface data on the basis of a hypertext transfer protocol through a preset simulation component when a remote process call interface is unavailable, and the analysis rule is a rule for a test server to analyze the data request;
a data request sending module, configured to send the data request to a test server, so that the test server analyzes the data request according to the analysis rule based on the hypertext transfer protocol to obtain a parameter of the remote procedure call interface data, constructs remote procedure call interface simulation data based on the parameter, and sends the simulation data to the test device;
and the simulation data receiving module is used for receiving the simulation data of the remote process call interface.
11. The apparatus of claim 10, further comprising:
and the real data acquisition module is used for acquiring real data of the remote process call interface from a service server through the remote process call interface, wherein the service server is a server of an application program corresponding to the service interface.
12. The apparatus of claim 10, further comprising:
the state information acquisition module is used for acquiring the current state information of the remote process call interface;
the interface state determination module includes:
an interface state determination submodule for determining whether the remote procedure call interface is available based on the current state information.
13. The apparatus of claim 10, further comprising:
the simulation data acquisition module is used for acquiring hypertext transfer protocol interface simulation data from the test server;
and the service interface testing module is used for testing the service interface based on the remote process calling interface simulation data and the hypertext transfer protocol interface simulation data.
14. A data acquisition device, which is applied to a test server, the device comprising:
the data request receiving module is used for receiving a data request sent by the testing equipment, wherein the data request is a data request which is constructed by the testing equipment through a preset simulation component when a testing instruction is obtained and conforms to an analysis rule based on a hypertext transfer protocol and contains parameters of remote procedure call interface data;
the data request analysis module is used for analyzing the data request according to the analysis rule based on the hypertext transfer protocol to obtain the parameter of the remote procedure call interface data;
the simulation data construction module is used for constructing simulation data of the remote procedure call interface based on the parameters;
and the simulation data sending module is used for sending the simulation data of the remote process call interface to the test equipment.
15. The test equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
16. The test server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 5 when executing a program stored in the memory.
17. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
18. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of claim 5.
CN201911012777.9A 2019-10-23 2019-10-23 Data acquisition method, system, device, test equipment and test server Active CN110798380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911012777.9A CN110798380B (en) 2019-10-23 2019-10-23 Data acquisition method, system, device, test equipment and test server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911012777.9A CN110798380B (en) 2019-10-23 2019-10-23 Data acquisition method, system, device, test equipment and test server

Publications (2)

Publication Number Publication Date
CN110798380A true CN110798380A (en) 2020-02-14
CN110798380B CN110798380B (en) 2021-08-20

Family

ID=69441025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911012777.9A Active CN110798380B (en) 2019-10-23 2019-10-23 Data acquisition method, system, device, test equipment and test server

Country Status (1)

Country Link
CN (1) CN110798380B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970349A (en) * 2020-08-07 2020-11-20 中国建设银行股份有限公司 Communication system, method, device, equipment and medium based on remote procedure call
CN112783776A (en) * 2021-01-27 2021-05-11 上海淇玥信息技术有限公司 Interface routing-based test method and device and electronic equipment
CN112905664A (en) * 2020-09-25 2021-06-04 蚂蚁智信(杭州)信息技术有限公司 Data rule mining method and device
CN112948216A (en) * 2021-03-16 2021-06-11 广州虎牙科技有限公司 Data acquisition method, device, equipment and storage medium
CN113760707A (en) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method, device, equipment and computer readable storage medium
CN114666301A (en) * 2020-12-22 2022-06-24 深圳Tcl新技术有限公司 APP testing method and system based on mock server
CN116561013A (en) * 2023-07-04 2023-08-08 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317600A1 (en) * 2013-03-15 2014-10-23 Digital River, Inc. Functional software testing framework for determinate level testing
CN105302721A (en) * 2015-10-29 2016-02-03 普元信息技术股份有限公司 System and method for realizing integration testing of centralized analog server in cloud computing platform
CN106572051A (en) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 Distributed lock service realizing method and device for distributed system
CN107122292A (en) * 2016-10-21 2017-09-01 北京小度信息科技有限公司 A kind of method and system of analog service
CN107179984A (en) * 2016-03-10 2017-09-19 北京京东尚科信息技术有限公司 A kind of interface mock methods and interface test method
CN107360261A (en) * 2017-09-07 2017-11-17 北京奇艺世纪科技有限公司 A kind of HTTP request processing method, device and electronic equipment
CN107395464A (en) * 2017-09-11 2017-11-24 北京奇艺世纪科技有限公司 A kind of server test method, apparatus and API gateway
CN108509282A (en) * 2018-02-08 2018-09-07 厦门快商通信息技术有限公司 Across the language call service administering methods of rpc based on golang reflection technologies

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317600A1 (en) * 2013-03-15 2014-10-23 Digital River, Inc. Functional software testing framework for determinate level testing
CN106572051A (en) * 2015-10-09 2017-04-19 阿里巴巴集团控股有限公司 Distributed lock service realizing method and device for distributed system
CN105302721A (en) * 2015-10-29 2016-02-03 普元信息技术股份有限公司 System and method for realizing integration testing of centralized analog server in cloud computing platform
CN107179984A (en) * 2016-03-10 2017-09-19 北京京东尚科信息技术有限公司 A kind of interface mock methods and interface test method
CN107122292A (en) * 2016-10-21 2017-09-01 北京小度信息科技有限公司 A kind of method and system of analog service
CN107360261A (en) * 2017-09-07 2017-11-17 北京奇艺世纪科技有限公司 A kind of HTTP request processing method, device and electronic equipment
CN107395464A (en) * 2017-09-11 2017-11-24 北京奇艺世纪科技有限公司 A kind of server test method, apparatus and API gateway
CN108509282A (en) * 2018-02-08 2018-09-07 厦门快商通信息技术有限公司 Across the language call service administering methods of rpc based on golang reflection technologies

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970349A (en) * 2020-08-07 2020-11-20 中国建设银行股份有限公司 Communication system, method, device, equipment and medium based on remote procedure call
CN113760707A (en) * 2020-09-23 2021-12-07 北京沃东天骏信息技术有限公司 Interface testing method, device, equipment and computer readable storage medium
CN112905664A (en) * 2020-09-25 2021-06-04 蚂蚁智信(杭州)信息技术有限公司 Data rule mining method and device
CN114666301A (en) * 2020-12-22 2022-06-24 深圳Tcl新技术有限公司 APP testing method and system based on mock server
CN112783776A (en) * 2021-01-27 2021-05-11 上海淇玥信息技术有限公司 Interface routing-based test method and device and electronic equipment
CN112948216A (en) * 2021-03-16 2021-06-11 广州虎牙科技有限公司 Data acquisition method, device, equipment and storage medium
CN112948216B (en) * 2021-03-16 2023-01-06 广州虎牙科技有限公司 Data acquisition method, device, equipment and storage medium
CN116561013A (en) * 2023-07-04 2023-08-08 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium
CN116561013B (en) * 2023-07-04 2023-09-26 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium

Also Published As

Publication number Publication date
CN110798380B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN110798380B (en) Data acquisition method, system, device, test equipment and test server
CN107368405B (en) Test system, test method, mock platform, interceptor and client
CN110221982B (en) Performance test method, device and equipment of business system and readable storage medium
CN105099811A (en) Interface testing method and device
CN108984389B (en) Application program testing method and terminal equipment
CN107436844B (en) Method and device for generating interface use case aggregate
CN109241343B (en) System, method and device for identifying brush amount user
CN112199300B (en) Interface testing method and device, electronic equipment and storage medium
CN110321154B (en) Micro-service interface information display method and device and electronic equipment
CN107291608B (en) Test script generation method, interface subscription/registration method and device
CN113127323A (en) Test method, test device, terminal equipment and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN109683997B (en) Method for accessing application program interface through sandbox, sandbox and sandbox equipment
CN109542780B (en) Test method, test device and storage medium for natural language processing application
CN110209700B (en) Data stream association method and device, electronic equipment and storage medium
CN109656791B (en) gPC performance test method and device based on Jmeter
CN112988589A (en) Interface testing method, device and system
CN112882948A (en) Stability testing method, device and system for application and storage medium
JP6047410B2 (en) Test equipment
CN113672497B (en) Method, device and equipment for generating non-buried point event and storage medium
CN108737350B (en) Information processing method and client
CN112346991B (en) Interface test script generation method and device
CN109039813B (en) Method, system and equipment for detecting internet access
CN112988560A (en) Method and device for testing system robustness
CN114866405B (en) Module configuration method, communication module, electronic device and 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