CN109347700B - Test method, test device, electronic equipment and storage medium - Google Patents

Test method, test device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109347700B
CN109347700B CN201811302023.2A CN201811302023A CN109347700B CN 109347700 B CN109347700 B CN 109347700B CN 201811302023 A CN201811302023 A CN 201811302023A CN 109347700 B CN109347700 B CN 109347700B
Authority
CN
China
Prior art keywords
test
target
server
monitoring process
data
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
CN201811302023.2A
Other languages
Chinese (zh)
Other versions
CN109347700A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811302023.2A priority Critical patent/CN109347700B/en
Publication of CN109347700A publication Critical patent/CN109347700A/en
Application granted granted Critical
Publication of CN109347700B publication Critical patent/CN109347700B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a testing method, a testing device, electronic equipment and a storage medium, wherein the method is applied to a client, the client is provided with a monitoring process, and the client is connected with a preset server; the method comprises the following steps: starting the monitoring process; determining first communication data to be sent to the server; sending first communication data matched with the monitoring process to a test tool connected with the monitoring process; receiving first test data returned by the test tool; sending the first test data to the server; the server is configured to respond to the first test data. The embodiment of the invention can realize the test of the function and the stability of the server, effectively prevent the hidden danger that the communication data is leaked and falsified because of the leakage of the test tool, and increase the stability and the safety of a software system consisting of the client and the server.

Description

Test method, test device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a test method, an apparatus, an electronic device, and a storage medium.
Background
A Client/Server architecture, also called C/S architecture, is a software system architecture with very wide application, and the Client and the Server need to communicate through a specified protocol. Because the client is distributed to internet users, when the communication content between the client and the server is transmitted through the internet, the communication protocol has the possibility of being hijacked, generally, a client developer needs to test the communication content to prevent the communication content from being sent to the server after being hijacked and then being tampered, so that serious errors occur in the server.
In an existing testing scheme, a testing tool is independently developed outside a client, and the testing tool is used for forwarding and modifying contents sent by the client to a server, so that a protocol testing function is realized.
In the above solution, the testing tool needs to maintain a set of communication modules, which are the same as the client and the server, for encrypting and decrypting the forwarding modified content. Different communication modules need to be developed aiming at different clients, so that the test cost is increased, and in addition, if a test tool is cracked, the normal work of the whole software system can be directly influenced.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a testing method and a corresponding testing apparatus, electronic device, storage medium that overcome or at least partially solve the above problems.
In order to solve the above problems, the embodiment of the present invention discloses a test method, which is applied to a client, wherein the client is provided with a monitoring process, and is connected with a preset server; the method comprises the following steps:
starting the monitoring process;
determining first communication data to be sent to the server;
sending first communication data matched with the monitoring process to a test tool connected with the monitoring process;
receiving first test data returned by the test tool;
sending the first test data to the server; the server is configured to respond to the first test data.
Preferably, the step of starting the listening process includes:
receiving a connection request sent by a preset testing tool; the connection request comprises target address information and target port information;
determining address information and port information of the monitoring process;
and when the address information of the monitoring process is consistent with the target address information and the port information of the monitoring process is consistent with the target port information, establishing a communication link between the monitoring process and the test tool.
Preferably, the client is provided with an initial communication function, and the monitoring process is provided with a target communication function; the step of sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process comprises the following steps:
receiving a test starting instruction sent by the test tool to the monitoring process;
replacing the initial communication function with the target communication function;
and sending first communication data matched with the test starting instruction to the test tool by adopting the target communication function.
Preferably, the step of sending the first communication data matched with the start test instruction to the test tool by using the target communication function includes:
judging whether target message name information exists in the test starting instruction or not;
if the target message name information does not exist in the test starting instruction, determining that the first communication data to be sent to the server are target first communication data;
if target message name information exists in the test starting instruction, determining first communication data containing the target message name information as target first communication data;
and sending the target first communication data to the test tool by adopting the target communication function.
Preferably, the start test instruction is a start listening instruction; the method further comprises the following steps:
and sending the first communication data to the server.
Preferably, the start test instruction is a start interception instruction; the method further comprises the following steps:
stopping sending the first communication data to the server.
Preferably, the method further comprises:
receiving second communication data sent by the server;
sending second communication data matched with the monitoring process to the test tool;
receiving second test data returned by the test tool;
responding to the second test data.
The embodiment of the invention also discloses a testing device which is applied to a client, wherein the client is provided with a monitoring process and is connected with a preset server; the device comprises:
the starting module is used for starting the monitoring progress;
an initial data module, configured to determine initial first communication data to be sent to the server;
the target data module is used for sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process;
the first receiving module is used for receiving first test data returned by the test tool;
the first sending module is used for sending the first test data to the server; the server is configured to respond to the first test data.
Preferably, the starting module comprises:
the connection request receiving submodule is used for receiving a connection request sent by a preset testing tool; the connection request comprises target address information and target port information;
the process information determining submodule is used for determining the address information and the port information of the monitoring process;
and the link establishing submodule is used for establishing a communication link between the monitoring process and the test tool when the address information of the monitoring process is consistent with the target address information and the port information of the monitoring process is consistent with the target port information.
Preferably, the client is provided with an initial communication function, and the monitoring process is provided with a target communication function; the target data module includes:
the instruction receiving submodule is used for receiving a test starting instruction sent by the test tool to the monitoring process;
a function replacing submodule for replacing the initial communication function with the target communication function;
and the target data sending submodule is used for sending the first communication data matched with the test starting instruction to the test tool by adopting the target communication function.
Preferably, the target data transmission submodule includes:
a message name judging unit, configured to judge whether target message name information exists in the test start instruction;
a first target determining unit, configured to determine, if target message name information does not exist in the start test instruction, that the first communication data to be sent to the server is target first communication data;
a second target determining unit, configured to determine, if target message name information exists in the start test instruction, that first communication data including the target message name information is target first communication data;
and the target sending unit is used for sending the target first communication data to the test tool by adopting the target communication function.
Preferably, the start test instruction is a start listening instruction; the device further comprises:
and the first communication data sending module is used for sending the first communication data to the server.
Preferably, the start test instruction is a start interception instruction; the device further comprises:
and the sending stopping module is used for stopping sending the first communication data to the server.
Preferably, the apparatus may further comprise:
the second communication data receiving module is used for receiving second communication data sent by the server;
the second communication data sending module is used for sending the second communication data matched with the monitoring process to the test tool;
the second test data receiving module is used for receiving second test data returned by the test tool;
and the second test data response module is used for responding to the second test data.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the computer program realizes the steps of the test method when being executed by the processor.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the steps of the test method when being executed by a processor.
The embodiment of the invention has the following advantages: by setting the monitoring process in the client, when the client is started, the monitoring process can be started immediately, so that the client can screen the first communication data to be sent to the server after determining the first communication data, and send the first communication data matched with the monitoring process to the test tool. The client side receives first test data generated by the test tool after modification based on the first communication data, and sends the first test data to the server, so that the client side sends the first test data to the server by adding a monitoring process in the client side, and the server can respond to the first test data, thereby realizing testing of functions and stability of the server.
Because the monitoring process is added or deleted in the client, the steps are simple and convenient, the internal logic does not need to be changed, the test cost of a client developer is greatly reduced, meanwhile, the developer can take the client with the monitoring process as a test version and take the client without the monitoring process as an open version, the hidden danger that communication data (such as a pass protocol) is leaked and tampered due to the leakage of a test tool is effectively prevented, and the stability and the safety of a software system formed by the client and the server are improved.
Drawings
FIG. 1 is a flow chart of the steps of a first embodiment of a testing method of the present invention;
FIG. 2 is a flowchart illustrating steps of a second embodiment of a testing method according to the present invention;
FIG. 3 is a block diagram of a testing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart of a first testing method embodiment of the present invention is shown, where the method is applied to a client, the client is provided with a monitoring process, and the client is connected to a preset server; the embodiment of the invention specifically comprises the following steps:
step 101, starting the monitoring process;
when the client starts, the monitoring process set in the client also starts immediately.
Step 102, determining first communication data to be sent to the server;
the client is provided with a communication interface for data transmission with the server, and first communication data to be sent to the server can be determined by detecting the state of the communication interface. The client may be provisioned with at least one initial communication protocol. Wherein the first communication data may include a target communication protocol determined by the client and initial communication content generated by the client.
103, sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process;
the first communication data to be sent to the server may be screened, the first communication data matched with the monitoring process is screened, and the screened first communication data is sent to the test tool, while the first communication data unmatched with the monitoring process is not sent to the test tool.
104, receiving first test data returned by the test tool;
the client can receive first test data sent by a test tool through a listening process, wherein the first test data comprises: and the test communication protocol is obtained by modifying the test based on the target communication protocol, and/or the test communication content is obtained by modifying the test based on the initial communication content. That is, the client may modify only the target communication protocol in the first communication data, or modify only the target communication content in the first communication data, or modify both the target communication protocol and the target communication content.
Step 105, sending the first test data to the server; the server is configured to respond to the first test data.
The client may send the first test data received from the test tool to the server, and the server may respond to the first test data to test a response result of the server to the modified communication protocol and/or the modified communication content.
In the embodiment of the invention, the monitoring process is arranged in the client, and when the client is started, the monitoring process can be started immediately, so that the client can screen the first communication data to be sent to the server after determining the first communication data, and the first communication data matched with the monitoring process is sent to the test tool. The client side receives first test data generated by the test tool after modification based on the first communication data, and sends the first test data to the server, so that the client side sends the first test data to the server by adding a monitoring process in the client side, and the server can respond to the first test data, thereby realizing testing of functions and stability of the server.
Because the monitoring process is added or deleted in the client, the steps are simple and convenient, the internal logic does not need to be changed, the test cost of a client developer is greatly reduced, meanwhile, the developer can take the client with the monitoring process as a test version and take the client without the monitoring process as an open version, the hidden danger that communication data (such as a pass protocol) is leaked and tampered due to the leakage of a test tool is effectively prevented, and the stability and the safety of a software system formed by the client and the server are improved.
Referring to fig. 2, a flowchart of steps of a second embodiment of a testing method according to the present invention is shown, where the method is applied to a client, the client is provided with a monitoring process, and the client is connected to a preset server; the embodiment of the invention specifically comprises the following steps:
step 201, starting the monitoring process;
when the client starts, the monitoring process set in the client also starts immediately. The monitoring process may be a transfer function rpyc of an open source in a computer program voice Python.
In a preferred embodiment of the present invention, step 201 may include:
a substep S11, receiving a connection request sent by a preset test tool; the connection request comprises target address information and target port information;
the test tool may be used to connect with different clients at different times. When a certain client needs to be tested, a tester can send a connection request to the client in a test tool.
Substep S12, determining address information and port information of the listening process;
the client, upon receiving the connection request, may determine the current address information (e.g., IP address, i.e., internet protocol address) of the listening process, and the current communication interface information of the listening process.
And a substep S13, when the address information of the monitoring process is consistent with the target address information and the port information of the monitoring process is consistent with the target port information, establishing a communication link between the monitoring process and the test tool.
If the target address information in the connection request is inconsistent with the address information of the monitoring process, or the target port information in the connection request is inconsistent with the port information of the monitoring process, the connection between the monitoring process and the test tool fails, and the monitoring process cannot establish a communication link with the test tool.
Step 202, determining first communication data to be sent to the server;
the client is provided with a communication interface for data transmission with the server, and first communication data to be sent to the server can be determined by detecting the state of the communication interface. The client may be provisioned with at least one initial communication protocol. Wherein the first communication data may include a target communication protocol determined by the client and initial communication content generated by the client.
The communication interface may refer to a software interface or a hardware interface, and the embodiment of the present invention does not limit the type of the communication interface.
Step 203, sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process;
the first communication data to be sent to the server may be screened, the first communication data matched with the monitoring process is screened, and the screened first communication data is sent to the test tool, while the first communication data unmatched with the monitoring process is not sent to the test tool.
In a preferred embodiment of the present invention, the client is provided with an initial communication function, and the monitoring process is provided with a target communication function; step 203 may comprise:
substep S21, receiving a test starting instruction sent by the test tool to the monitoring process;
a substep S22 of replacing the initial communication function with the target communication function;
the initial communication function set by the client is used for carrying out bidirectional data transmission with the server, and the target communication function can be used for carrying out bidirectional data transmission with the server and the test tool.
And a substep S23, sending the first communication data matched with the start test instruction to the test tool by using the target communication function.
The client may screen the first communication data to be sent to the server, determine first communication data matched with the test starting instruction, and send the first communication data matched with the test starting instruction to the test tool by using a target communication function.
In a preferred embodiment of the present invention, the sub-step S23 may include:
substep S231, determining whether target message name information exists in the start test instruction;
the start test instruction may include target message name information; the target message name information may be a function name specified by the tester.
Substep S232, if not, determining that the first communication data to be sent to the server is target first communication data;
and determining whether target message name information exists in the test starting instruction, and determining all first communication data to be sent to the server as target first communication data.
In the sub-step S233, if yes, the first communication data including the target message name information is determined as the target first communication data;
and if the target message name exists in the test starting instruction, screening the first communication data information, and determining the first communication data containing the target message name information as target first communication data.
And a substep S234, sending the target first communication data to the test tool by using the target communication function.
In a preferred embodiment of the present invention, the start test instruction is a start snoop instruction; after step 203, the method may further comprise: and sending the first communication data to the server.
When the monitoring process receives a monitoring starting instruction, the target communication function performs data transmission with the test tool and sends the target first communication data to the test tool, and also performs data transmission with the server and sends the first communication data to be sent to the server.
In a preferred embodiment of the present invention, the start test instruction is a start interception instruction; after step 203, the method may further comprise: stopping sending the first communication data to the server.
When the interception process receives the interception starting instruction, the target communication function transmits target first communication data to the test tool except for transmitting the data with the test tool, and also prevents the client from transmitting the data with the server and stops transmitting the first communication data to the server.
Step 204, receiving first test data returned by the test tool;
the client can receive first test data sent by a test tool through a listening process, wherein the first test data comprises: and the test communication protocol is obtained by modifying the test tool based on the target communication protocol, and/or the test communication content is obtained by modifying the initial communication content. That is, the client may modify only the target communication protocol in the first communication data, or modify only the target communication content in the first communication data, or modify both the target communication protocol and the target communication content.
In practical application, the first communication data received by the test tool is a data packet encrypted by the client, the test tool can decrypt the first communication data by adopting a decryption mode matched with the client encryption mode, and extract and display a target communication protocol and target communication content in the first communication data, and a manager of the test tool can directly modify the target communication protocol and/or the target communication content and carry out the same encryption mode as the client to encrypt the data to generate the first test data.
In addition, the transmission mode of the client and the test tool is asynchronous transmission, the client is provided with a transmission queue, the transmission queue is used for numbering each target first communication data to be sent, and when the target first communication data are sent but corresponding first test data returned by the test tool are not received, new target first communication data are continuously sent to the test tool according to the numbering sequence.
Step 205, sending the first test data to the server; the server is configured to respond to the first test data.
The client may send the first test data received from the test tool to the server, and the server may respond to the first test data to test a response result of the server to the modified communication protocol and/or the modified communication content.
Step 206, receiving second communication data sent by the server;
because the target communication function can realize the bidirectional data transmission between the server and the client, the client can still receive the data sent by the server after the initial communication function is replaced by the target communication function.
Step 207, sending the second communication data matched with the monitoring process to the test tool;
the second data may be filtered and sent to the testing tool. Specifically, step 207 may include: judging whether target message name information exists in the test starting instruction or not; if the target message name information does not exist in the test starting instruction, determining all the second communication data as target second communication data; if the target message name information exists in the test starting instruction, determining second communication data containing the target message name information as target second communication data; and sending the target second communication data to the test tool by adopting the target communication function.
And sending the target first communication data to the test tool by adopting the target communication function.
Step 208, receiving second test data returned by the test tool;
the client may receive second test data sent by the test tool through the monitoring process, where the second test data may be generated and obtained by modifying a communication protocol based on the second data and/or modifying communication content by the test tool.
Step 209, responding to the second test data.
The client may perform the associated operation on the second test data.
In practical application, the test tool may send at least one of a stop test instruction and a disconnect request to the monitor process, in addition to the connection request and the start test instruction to the monitor process, where the stop test instruction includes one of a stop monitor instruction and a stop intercept instruction.
When the client receives an interception stopping instruction sent by the test tool to the monitoring process, the client still executes the steps 203-204, and the target communication function performs data transmission with the test tool, sends the target first communication data to the test tool, performs data transmission with the server, and sends the first communication data to be sent to the server.
When the client receives a monitoring stopping instruction sent by the test tool to the monitoring process, the client replaces the target communication function with the initial communication function, the client directly performs bidirectional data transmission with the server, and stops sending the target first communication data and the target second communication data to the test tool.
When the client receives a disconnection request sent by the test tool to the monitoring process, the client replaces the target communication function with the initial communication function, simultaneously disconnects the connection between the monitoring process and the test tool, and closes the monitoring process.
In the embodiment of the invention, the monitoring process is arranged in the client, and when the client is started, the monitoring process can be started immediately, so that the client can screen the first communication data to be sent to the server after determining the first communication data, and the first communication data matched with the monitoring process is sent to the test tool. The client side receives first test data generated by the test tool after modification based on the first communication data, and sends the first test data to the server, so that the client side sends the first test data to the server by adding a monitoring process in the client side, and the server can respond to the first test data, thereby realizing testing of functions and stability of the server.
The monitoring process can also receive second communication data sent by the server, and send the screened second communication data to the test tool, and the client can receive the second communication data generated by the test tool based on the second communication data, and then respond to the second test data. Therefore, the client side is tested.
Because the monitoring process is added or deleted in the client, the steps are simple and convenient, the internal logic does not need to be changed, the test cost of a client developer is greatly reduced, meanwhile, the developer can take the client with the monitoring process as a test version and take the client without the monitoring process as an open version, the hidden danger that communication data (such as a pass protocol) is leaked and tampered due to the leakage of a test tool is effectively prevented, and the stability and the safety of a software system formed by the client and the server are improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a testing apparatus according to an embodiment of the present invention is shown, where the testing apparatus may be applied to a client, where the client is provided with a monitoring process, and the client is connected to a preset server; the apparatus may include the following modules:
a starting module 301, configured to start the monitoring process;
an initial data module 302, configured to determine initial first communication data to be sent to the server;
a target data module 303, configured to send the first communication data matched with the monitoring process to a test tool connected to the monitoring process;
a first receiving module 304, configured to receive first test data returned by the test tool;
a first sending module 305, configured to send the first test data to the server; the server is configured to respond to the first test data.
In a preferred embodiment of the present invention, the starting module 301 may include:
the connection request receiving submodule is used for receiving a connection request sent by a preset testing tool; the connection request comprises target address information and target port information;
the process information determining submodule is used for determining the address information and the port information of the monitoring process;
and the link establishing submodule is used for establishing a communication link between the monitoring process and the test tool when the address information of the monitoring process is consistent with the target address information and the port information of the monitoring process is consistent with the target port information.
In a preferred embodiment of the present invention, the client is provided with an initial communication function, and the monitoring process is provided with a target communication function; the target data module 303 may include:
the instruction receiving submodule is used for receiving a test starting instruction sent by the test tool to the monitoring process;
a function replacing submodule for replacing the initial communication function with the target communication function;
and the target data sending submodule is used for sending the first communication data matched with the test starting instruction to the test tool by adopting the target communication function.
In a preferred embodiment of the present invention, the target data transmission sub-module may include:
a message name judging unit, configured to judge whether target message name information exists in the test start instruction;
a first target determining unit, configured to determine, if target message name information does not exist in the start test instruction, that the first communication data to be sent to the server is target first communication data;
a second target determining unit, configured to determine, if target message name information exists in the start test instruction, that first communication data including the target message name information is target first communication data;
and the target sending unit is used for sending the target first communication data to the test tool by adopting the target communication function.
In a preferred embodiment of the present invention, the start test instruction is a start snoop instruction; the apparatus may further include:
and the first communication data sending module is used for sending the first communication data to the server.
In a preferred embodiment of the present invention, the start test instruction is a start interception instruction; the apparatus may further include:
and the sending stopping module is used for stopping sending the first communication data to the server.
In a preferred embodiment of the present invention, the apparatus may further include:
the second communication data receiving module is used for receiving second communication data sent by the server;
the second communication data sending module is used for sending the second communication data matched with the monitoring process to the test tool;
the second test data receiving module is used for receiving second test data returned by the test tool;
and the second test data response module is used for responding to the second test data.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the computer program realizes the steps of the test method when being executed by the processor.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the steps of the test method when being executed by a processor.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be 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 terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description of the testing method and the testing apparatus provided by the present invention, and the specific examples applied herein have been provided to explain the principles and embodiments of the present invention, and the above descriptions of the embodiments are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A test method is characterized in that the test method is applied to a client, the client is provided with a monitoring process, and the client is connected with a preset server; the method comprises the following steps:
starting the monitoring process;
determining first communication data to be sent to the server;
sending first communication data matched with the monitoring process to a test tool connected with the monitoring process;
receiving first test data returned by the test tool;
sending the first test data to the server; the server is configured to respond to the first test data.
2. The method of claim 1, wherein the step of initiating the listening process comprises:
receiving a connection request sent by a preset testing tool; the connection request comprises target address information and target port information;
determining address information and port information of the monitoring process;
and when the address information of the monitoring process is consistent with the target address information and the port information of the monitoring process is consistent with the target port information, establishing a communication link between the monitoring process and the test tool.
3. The method according to claim 2, wherein the client is provided with an initial communication function, and the listening process is provided with a target communication function; the step of sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process comprises the following steps:
receiving a test starting instruction sent by the test tool to the monitoring process;
replacing the initial communication function with the target communication function;
and sending first communication data matched with the test starting instruction to the test tool by adopting the target communication function.
4. The method of claim 3, wherein the step of sending the first communication data matching the start test instruction to the test tool using the target communication function comprises:
judging whether target message name information exists in the test starting instruction or not;
if not, determining that the first communication data to be sent to the server are target first communication data;
if so, determining first communication data containing the target message name information as target first communication data;
and sending the target first communication data to the test tool by adopting the target communication function.
5. The method of claim 3, wherein the start test instruction is a start snoop instruction; after the step of sending the first communication data matched with the listening process to the testing tool connected with the listening process, the method further comprises:
and sending the first communication data to the server.
6. The method of claim 3, wherein the start test instruction is a start intercept instruction; after the step of sending the first communication data matched with the listening process to the testing tool connected with the listening process, the method further comprises:
stopping sending the first communication data to the server.
7. The method of claim 1, further comprising:
receiving second communication data sent by the server;
sending second communication data matched with the monitoring process to the test tool;
receiving second test data returned by the test tool;
responding to the second test data.
8. The testing device is characterized by being applied to a client, wherein the client is provided with a monitoring process and is connected with a preset server; the device comprises:
the starting module is used for starting the monitoring progress;
an initial data module, configured to determine initial first communication data to be sent to the server;
the target data module is used for sending the first communication data matched with the monitoring process to a test tool connected with the monitoring process;
the first receiving module is used for receiving first test data returned by the test tool;
the first sending module is used for sending the first test data to the server; the server is configured to respond to the first test data.
9. Electronic device, characterized in that it comprises a processor, a memory and a computer program stored on said memory and capable of running on said processor, said computer program, when executed by said processor, implementing the steps of the test method according to any one of claims 1 to 7.
10. Computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the testing method according to one of claims 1 to 7.
CN201811302023.2A 2018-11-02 2018-11-02 Test method, test device, electronic equipment and storage medium Active CN109347700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811302023.2A CN109347700B (en) 2018-11-02 2018-11-02 Test method, test device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811302023.2A CN109347700B (en) 2018-11-02 2018-11-02 Test method, test device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109347700A CN109347700A (en) 2019-02-15
CN109347700B true CN109347700B (en) 2020-09-11

Family

ID=65313268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811302023.2A Active CN109347700B (en) 2018-11-02 2018-11-02 Test method, test device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109347700B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471852A (en) * 2019-08-12 2019-11-19 中国工商银行股份有限公司 Online test method, system and electronic equipment
CN111460103B (en) * 2020-03-31 2024-01-16 网易(杭州)网络有限公司 Information detection method and device, electronic equipment and storage medium
CN111555940B (en) * 2020-04-28 2022-02-01 北京字节跳动网络技术有限公司 Client test method and device, electronic equipment and computer readable storage medium
CN112115049B (en) * 2020-08-27 2023-06-02 北京奇艺世纪科技有限公司 Application program testing method, device, equipment and computer readable storage medium
CN112418678A (en) * 2020-11-24 2021-02-26 深圳集智数字科技有限公司 Engineering quality measuring method, server and client
CN113852426A (en) * 2021-09-24 2021-12-28 博鼎实华(北京)技术有限公司 Remote testing method, device and system
WO2023221004A1 (en) * 2022-05-18 2023-11-23 北京小米移动软件有限公司 Test data processing method and apparatus, and electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905258A (en) * 2012-12-24 2014-07-02 百度国际科技(深圳)有限公司 Method and apparatus for testing data uploading function of client
CN104301410A (en) * 2014-10-16 2015-01-21 浪潮软件集团有限公司 Self-service tax handling terminal design method for realizing internal and external network interconnection in client monitoring mode
CN108241580A (en) * 2016-12-30 2018-07-03 深圳壹账通智能科技有限公司 The test method and terminal of client-side program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060067055A (en) * 2004-12-14 2006-06-19 삼성전자주식회사 System and method for controlling tester remotely
CN106776287A (en) * 2016-11-24 2017-05-31 泰康保险集团股份有限公司 Servlet interface test methods and test client

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905258A (en) * 2012-12-24 2014-07-02 百度国际科技(深圳)有限公司 Method and apparatus for testing data uploading function of client
CN104301410A (en) * 2014-10-16 2015-01-21 浪潮软件集团有限公司 Self-service tax handling terminal design method for realizing internal and external network interconnection in client monitoring mode
CN108241580A (en) * 2016-12-30 2018-07-03 深圳壹账通智能科技有限公司 The test method and terminal of client-side program

Also Published As

Publication number Publication date
CN109347700A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
CN109347700B (en) Test method, test device, electronic equipment and storage medium
US10554420B2 (en) Wireless connections to a wireless access point
US10855694B2 (en) Methods, systems, and computer readable media for monitoring encrypted packet flows within a virtual network environment
US9130935B2 (en) System and method for providing access credentials
US9900161B2 (en) Method for certifying android client application by local service unit
JP2020080530A (en) Data processing method, device, terminal, and access point computer
US9294463B2 (en) Apparatus, method and system for context-aware security control in cloud environment
US20200162245A1 (en) Method and system for performing ssl handshake
CN104935593A (en) Data message transmitting method and device
US11824854B2 (en) Communication system and computer readable storage medium
US9049012B2 (en) Secured cryptographic communication system
CN111786996A (en) Cross-domain synchronous login state method and device and cross-domain synchronous login system
CN107026828B (en) Anti-stealing-link method based on Internet cache and Internet cache
CN109905352B (en) Method, device and storage medium for auditing data based on encryption protocol
CN111726328A (en) Method, system and related device for remotely accessing a first device
CN111193730B (en) IoT trusted scene construction method and device
CN113992387B (en) Resource management method, device, system, electronic equipment and readable storage medium
CN112219416A (en) Techniques for authenticating data transmitted over a cellular network
US9071596B2 (en) Securely establishing a communication channel between a switch and a network-based application using a unique identifier for the network-based application
CN111221764B (en) Cross-link data transmission method and system
CN113992734A (en) Session connection method, device and equipment
CN114630316A (en) Routing method, system and terminal for terminal outgoing service data
TW201445945A (en) Data transmission system, data sending terminal and data receiving terminal
CN107332821A (en) It is a kind of to realize the method communicated between client and server, device and server
CN107241310A (en) A kind of client identity verification method and device

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