CN114050991A - Method, device, equipment and storage medium for testing proxy - Google Patents

Method, device, equipment and storage medium for testing proxy Download PDF

Info

Publication number
CN114050991A
CN114050991A CN202111341474.9A CN202111341474A CN114050991A CN 114050991 A CN114050991 A CN 114050991A CN 202111341474 A CN202111341474 A CN 202111341474A CN 114050991 A CN114050991 A CN 114050991A
Authority
CN
China
Prior art keywords
information
connection information
processing result
connection
combination
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
CN202111341474.9A
Other languages
Chinese (zh)
Other versions
CN114050991B (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 Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software 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 Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202111341474.9A priority Critical patent/CN114050991B/en
Publication of CN114050991A publication Critical patent/CN114050991A/en
Application granted granted Critical
Publication of CN114050991B publication Critical patent/CN114050991B/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

Landscapes

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

Abstract

The application provides a method, a device, equipment and a storage medium for testing an agent, wherein the method comprises the following steps: and obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information. The testing efficiency is improved to a certain extent.

Description

Method, device, equipment and storage medium for testing proxy
Technical Field
The present application relates to the field of testing, and in particular, to a method, an apparatus, a device, and a storage medium for testing an agent.
Background
The proxy is a widely used technology, and is of a type of forward proxy, reverse proxy, transparent proxy, and the like. The proxy technology can break through the access limit of the client, protect the server and provide better service for the user, and is a bottom technology for realizing the content security detection and processing of the application protocol layer. Therefore, testing of agents is also important. The structure relating to the agent, client and server may be as shown in figure 1.
The existing testing method acquires quintuple information, an agent processing identifier, forward direction information and reverse direction information in communication connection, and then checks whether the quintuple information is correct, the agent processing identifier is correct, the forward direction information is correct and the reverse direction information is correct, so that a testing result is obtained.
Therefore, when a plurality of communication connections are provided in a target scenario, for example, a load balancing scenario, it is determined whether the quintuple information, the proxy processing identifier, the forward direction information, and the reverse direction information are correct for each of the plurality of communication connections, and then a test result is obtained, which results in low test efficiency.
Disclosure of Invention
Based on this, a method, an apparatus, a device and a storage medium for testing an agent are provided to solve the technical problem of low testing efficiency in the prior art.
In a first aspect, a method for testing an agent is provided, including:
acquiring first connection information and second connection information corresponding to a target scene, wherein the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, positive direction information and negative direction information, the agent processing identifier reflects whether the agent terminal processes aiming at connection, the positive direction information reflects whether the agent terminal initiates connection, and the negative direction information reflects whether the client or the server terminal initiates connection;
combining the proxy processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
processing the proxy combination information, the positive combination information and the negative combination information corresponding to the first connection information, and the proxy combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information;
and obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
The method for testing the agent comprises the steps of combining the agent processing identification, the forward direction information and the reverse direction information in each connection information respectively to obtain combined information corresponding to the agent processing identification, the forward direction information and the reverse direction information, then processing each combined information to obtain a processing result of each combined information, and finally obtaining a test result according to each processing result. Therefore, when a target scene has a plurality of communication connections, because the test result is obtained through the processing result of 6 combined information, compared with each communication connection corresponding to the target scene, whether quintuple information, the proxy processing identifier, the forward direction information and the reverse direction information are correct or not needs to be determined, and then the test result is obtained, so that the test efficiency is improved to a certain extent.
In an embodiment, before the combining the proxy processing identifier, the forward direction information, and the backward direction information in each of the first connection information and the second connection information to obtain proxy combination information, forward combination information, and backward combination information corresponding to the first connection information, and before the proxy combination information, forward combination information, and backward combination information corresponding to the second connection information, further includes:
respectively performing information conversion processing on the agent processing identifier, the forward direction information and the reverse direction information in each piece of connection information in the first connection information and the second connection information to obtain a binary value corresponding to the agent processing identifier, a binary value corresponding to the forward direction information and a binary value corresponding to the reverse direction information;
the method for combining the agent processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain the agent combination information, the forward combination information and the reverse combination information corresponding to the first connection information, and the agent combination information, the forward combination information and the reverse combination information corresponding to the second connection information comprises the following steps:
and combining binary values corresponding to the agent processing identifications in the first connection information and the second connection information, binary values corresponding to the forward direction information and binary values corresponding to the reverse direction information respectively to obtain agent combination information, forward combination information and reverse combination information corresponding to the first connection information, and agent combination information, forward combination information and reverse combination information corresponding to the second connection information.
In the above embodiment, the agent processing identifier, the forward direction information, and the reverse direction information are converted into binary values, and the binary values are combined by the combination information to obtain the binary string, so that the processing is performed according to the binary string in the following step, thereby improving the processing efficiency.
In one embodiment, the processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, respectively, includes:
and carrying out logic bitwise and processing on the agent combination information, the positive combination information and the negative combination information corresponding to the first connection information and the agent combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information.
In the above embodiment, after the binary value is converted, the processing result can be obtained by simple logical bitwise and processing.
In an embodiment, the obtaining a test result according to the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information includes:
if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, the test result is normal;
alternatively, the first and second electrodes may be,
and if the identification processing result corresponding to the first connection information is 1, the positive direction processing result is 1, and the negative direction processing result is 0, and the identification processing result corresponding to the second connection information is 1, the positive direction processing result is 0, and the negative direction processing result is 1, the test result is normal.
The above examples illustrate how test results can be obtained based on the final and results.
In one embodiment, the processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, respectively, includes:
adding binary values in the proxy combination information corresponding to the first connection information and the second connection information respectively to obtain an identification processing result corresponding to the first connection information and an identification processing result corresponding to the second connection information;
adding binary values in positive combination information corresponding to the first connection information and the second connection information respectively to obtain a positive direction processing result corresponding to the first connection information and a positive direction processing result corresponding to the second connection information;
and adding binary values in the anti-combination information corresponding to the first connection information and the second connection information respectively to obtain an opposite direction processing result corresponding to the first connection information and an opposite direction processing result corresponding to the second connection information.
In the above embodiment, the identification processing result, the forward direction processing result, and the reverse direction processing result are obtained by adding binary values in the combination information.
In an embodiment, the obtaining a test result according to the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information includes:
and if the identification processing result corresponding to the first connection information is equal to the quantity of the connection information in the first connection information, the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the first connection information, the identification processing result corresponding to the second connection information is equal to the quantity of the connection information in the second connection information, and the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the second connection information, the test result between the server side and the agent side is normal.
The above examples illustrate how test results can be obtained from the results of the addition.
In an embodiment, the proxy processing identifier includes a processing identifier and a target processing identifier, where the processing identifier reflects whether the proxy performs processing on a connection, and the target processing identifier reflects whether the proxy performs target processing.
In the embodiment, the proxy processing identifier includes two identifiers, and whether the proxy side performs the target processing can be determined through the two identifiers, so that the test depth is increased, and the test result for the target processing can be further obtained.
In a second aspect, an apparatus for testing an agent is provided, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first connection information and second connection information corresponding to a target scene, the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, forward direction information and reverse direction information, the agent processing identifier reflects whether the agent terminal processes connection or not, the forward direction information reflects whether the agent terminal initiates connection or not, and the reverse direction information reflects whether the client or the server terminal initiates connection or not;
the combination module is used for respectively combining the proxy processing identifier, the forward direction information and the reverse direction information in each piece of connection information in the first connection information and the second connection information to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
a processing module, configured to process the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information, respectively, to obtain an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the first connection information, and an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the second connection information;
and the result module is used for obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
In one embodiment, the apparatus 600 of the test agent further comprises: a binary conversion module, configured to perform information conversion processing on the proxy processing identifier, the forward direction information, and the reverse direction information in each piece of connection information in the first connection information and the second connection information, respectively, to obtain a binary value corresponding to the proxy processing identifier, a binary value corresponding to the forward direction information, and a binary value corresponding to the reverse direction information; the combination module is specifically used for: and combining binary values corresponding to the agent processing identifications in the first connection information and the second connection information, binary values corresponding to the forward direction information and binary values corresponding to the reverse direction information respectively to obtain agent combination information, forward combination information and reverse combination information corresponding to the first connection information, and agent combination information, forward combination information and reverse combination information corresponding to the second connection information.
In one embodiment, the processing module is specifically configured to: and carrying out logic bitwise and processing on the agent combination information, the positive combination information and the negative combination information corresponding to the first connection information and the agent combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information.
In one embodiment, the result module is specifically configured to: if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, the test result is normal; or if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, the test result is normal.
In one embodiment, the processing module is specifically configured to: adding binary values in the proxy combination information corresponding to the first connection information and the second connection information respectively to obtain an identification processing result corresponding to the first connection information and an identification processing result corresponding to the second connection information; adding binary values in positive combination information corresponding to the first connection information and the second connection information respectively to obtain a positive direction processing result corresponding to the first connection information and a positive direction processing result corresponding to the second connection information; and adding binary values in the anti-combination information corresponding to the first connection information and the second connection information respectively to obtain an opposite direction processing result corresponding to the first connection information and an opposite direction processing result corresponding to the second connection information.
In one embodiment, the result module is specifically configured to: and if the identification processing result corresponding to the first connection information is equal to the quantity of the connection information in the first connection information, the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the first connection information, the identification processing result corresponding to the second connection information is equal to the quantity of the connection information in the second connection information, and the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the second connection information, the test result between the server side and the agent side is normal.
In an embodiment, the proxy processing identifier includes a processing identifier and a target processing identifier, where the processing identifier reflects whether the proxy performs processing on a connection, and the target processing identifier reflects whether the proxy performs target processing.
In a third aspect, a computer device is provided, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of testing an agent as described above when executing the computer program.
In a fourth aspect, a computer readable storage medium is provided, having stored thereon computer program instructions which, when read and executed by a processor, perform the steps of the method of testing an agent as described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an agent side, a client side and a server side in the embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating an implementation of a method for testing an agent according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating the structure of the test agent apparatus according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an internal structure of a computer device in the embodiment of the present application.
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 one embodiment, a method of testing an agent is provided. The execution subject of the method for testing the agent according to the embodiment of the present invention is a computer device capable of implementing the method for testing the agent according to the embodiment of the present invention, and the computer device may include, but is not limited to, a terminal and a server. The terminal comprises a desktop terminal and a mobile terminal, wherein the desktop terminal comprises but is not limited to a desktop computer and a vehicle-mounted computer; mobile terminals include, but are not limited to, cell phones, tablets, laptops, and smartwatches. The server includes a high performance computer and a cluster of high performance computers. The server executing the method for testing the proxy according to the embodiment of the present invention may be a client, a server, and a proxy, or may be a computer device independent of the client, the proxy, and the server, for example, a computer device executing a test script.
In one embodiment, as shown in FIG. 2, there is provided a method of testing an agent, comprising:
step 100, acquiring first connection information and second connection information corresponding to a target scene, wherein the first connection information is connection information between a client and an agent, the second connection information is connection information between the agent and a server, the connection information comprises an agent processing identifier, positive direction information and negative direction information, the agent processing identifier reflects whether the agent processes connection, the positive direction information reflects whether the agent initiates connection, and the negative direction information reflects whether the client or the server initiates connection.
The target scenario is an actual application scenario, which includes a scenario with multiple connections, for example, the target scenario is a load balancing scenario. When the agent is to be tested, the agent can be tested according to different application scenarios to obtain the test result of each application scenario.
The first connection information is connection information between the client and the agent, and the first connection information comprises a plurality of connection information; and the second connection information is connection information between the agent terminal and the server terminal, and the second connection information comprises a plurality of pieces of connection information. The plurality of the connection information comprises two or more than two, when the first connection information comprises a plurality of connection information, the client side and the agent side are considered to be in multiple communication connection, and when the second connection information comprises a plurality of connection information, the server side and the agent side are considered to be in multiple communication connection; the connection information in the plurality of connection information is information corresponding to one communication connection. The proxy side may be a device between the client side and the server side, and the device may be capable of performing related management on the client side and the server side, for example, the device may be capable of performing processing (what is specifically performed, and is not specifically limited herein) on a connection between the client side and the server side, that is, the proxy side in the embodiment of the present invention is not limited to the proxy mentioned in the background art, and a device capable of performing management (for example, processing a connection between the client side and the server side) on the client side and the server side may be referred to as the proxy side. Each of the plurality of connection information includes a proxy process identifier, forward direction information, and reverse direction information.
The agent processing identifier reflects whether the agent performs processing for the connection, and if the agent performs related processing for the communication connection, the agent processing identifier is a, and if the agent does not perform processing for the communication connection, the agent processing identifier is B, the client initiates the communication connection to the agent, where a is 10 and B is 0, for example, the client initiates a communication connection to the agent, and if the agent performs related processing for the communication connection, the agent processing identifier is 10, and if the agent does not perform the related processing for the communication connection, the agent processing identifier is 0.
The positive direction information reflects whether the proxy initiates connection, if the communication connection is initiated by the proxy, the positive direction information is t1, and if the communication connection is not initiated by the proxy, the positive direction information is t 2; the reverse direction information reflects whether the client or the server initiates a connection, and is t1 if the communication connection is initiated by the client or the server, or t2 if the communication connection is not initiated by the client or the server. For example, assume that there are 5 connection information in the first connection information in total, i.e. 5 communication connections are established between the client and the proxy, moreover, the 5 communication connections are all initiated by the client, meanwhile, the second connection information also has 5 connection information in total, that is, a total of 5 communication connections are established between the server side and the proxy side, and each of the 5 communication connections is initiated by the proxy side, assuming that t1 is 10 and t2 is 0, so that the forward direction information in each of the 5 pieces of connection information in the first connection information is 0, the reverse direction information in each of the 5 pieces of connection information in the first connection information is 10, the forward direction information in each of the 5 pieces of connection information in the second connection information is 10, and the reverse direction information in each of the 5 pieces of connection information in the second connection information is 0.
In one example, first connection information and second connection information corresponding to a target scene are obtained by executing a script file.
Step 200, combining the proxy processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information.
The agent combination information corresponding to the first connection information refers to information obtained by combining agent processing identifiers in each piece of connection information in the first connection information; the positive combination information corresponding to the first connection information is information obtained by combining the positive direction information in each piece of connection information in the first connection information; the reverse combination information corresponding to the first connection information refers to information obtained by combining reverse direction information in each piece of connection information in the first connection information.
Continuing with the above example, the proxy combination information corresponding to the first connection information is 1010101010, the positive combination information corresponding to the first connection information is 00000, and the negative combination information corresponding to the first connection information is 1010101010; the proxy combination information corresponding to the second connection information is 1010101010, the positive combination information corresponding to the second connection information is 1010101010, and the negative combination information corresponding to the second connection information is 00000.
Step 300, processing the proxy combination information, the forward combination information and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information and the reverse combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information.
Continuing with the above example, proxy combination information corresponding to the first connection information is processed, for example, 10 × 10 × 10 × 10 × 10 ═ 105Then, the result of the identification processing corresponding to the first connection information is 105Processing positive combination information corresponding to the first connection information, for example, 0+0+0+0+0, so that the positive direction processing result corresponding to the first connection information is 0, processing negative combination information corresponding to the first connection information, for example, 10+10+10+10, so that the negative direction processing result corresponding to the first connection information is 50, and processing proxy combination information corresponding to the second connection information, for example, 10 × 10 × 10 × 10 × 10 ═ 105Then, the result of the identification processing corresponding to the second connection information is 105The positive combination information corresponding to the second connection information is processed, for example, 10+10+10+10+10, so that the positive direction processing result corresponding to the second connection information is 50, and the negative combination information corresponding to the second connection information is processed, for example, 0+0+0+0+0, so that the negative direction processing result corresponding to the second connection information is 0. For another example, the processing is performed in a statistical manner, for example, the flag processing result corresponding to the first connection information is 5 a, the forward processing result corresponding to the first connection information is 5 t2, the reverse processing result corresponding to the first connection information is 5 t1, the flag processing result corresponding to the second connection information is 5 a, the forward processing result corresponding to the second connection information is 5 t1, and the second connection information is 5 aThe corresponding reverse direction processing results are 5 t 2.
And step 400, obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
Assuming that N communication connections are established between the client and the agent, and the N communication connections are initiated by the client, and M communication connections are established between the server and the agent, and the M communication connections are initiated by the agent, then, when the identification processing result corresponding to the first connection information is 10NThe forward direction processing result corresponding to the first connection information is 0, the reverse direction processing result corresponding to the first connection information is N × 10, and the flag processing result corresponding to the second connection information is 10MWhen the positive direction processing result corresponding to the second connection information is mx 10 and the negative direction processing result corresponding to the second connection information is 0, the test result is normal; otherwise, the test result is abnormal. For another example, the flag processing result corresponding to the first connection information is N a, the positive direction processing result corresponding to the first connection information is N t1, the negative direction processing result corresponding to the first connection information is N t2, the flag processing result corresponding to the second connection information is N a, the positive direction processing result corresponding to the second connection information is N t2, and the negative direction processing result corresponding to the second connection information is N t1, so that the test result is normal; otherwise, the test result is abnormal.
The method for testing the agent comprises the steps of combining the agent processing identification, the forward direction information and the reverse direction information in each connection information respectively to obtain combined information corresponding to the agent processing identification, the forward direction information and the reverse direction information, then processing each combined information to obtain a processing result of each combined information, and finally obtaining a test result according to each processing result. Therefore, when a target scene has a plurality of communication connections, because the test result is obtained through the processing result of 6 combined information, compared with each communication connection corresponding to the target scene, whether quintuple information, the proxy processing identifier, the forward direction information and the reverse direction information are correct or not needs to be determined, and then the test result is obtained, so that the test efficiency is improved to a certain extent.
In one embodiment, in step 200, before combining the proxy processing identifier, the forward direction information, and the reverse direction information in each of the first connection information and the second connection information to obtain proxy combination information, forward combination information, and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information, and reverse combination information corresponding to the second connection information, the method further includes: step 500; correspondingly, in step 200, the combining the proxy processing identifier, the forward direction information, and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information, and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information, and reverse combination information corresponding to the second connection information includes: step 200A.
Step 500, performing information conversion processing on the agent processing identifier, the forward direction information and the reverse direction information in each piece of connection information in the first connection information and the second connection information, to obtain a binary value corresponding to the agent processing identifier, a binary value corresponding to the forward direction information and a binary value corresponding to the reverse direction information.
Continuing the above example, a total of 5 communication connections are established between the client and the agent, and each of the 5 communication connections is initiated by the client, and at the same time, a total of 5 communication connections are established between the server and the agent, and each of the 5 communication connections is initiated by the agent, the binary value is 0 or 1, the agent process identifier is a or B, the forward direction information is t1 or t2, and the reverse direction information is t1 or t2, if the 10 communication connections are all correlated by the agent, the agent process identifiers in the 10 connection information are all a, each agent process identifier is subjected to information conversion processing, and the binary values corresponding to the 10 agent process identifiers are all 1, if the 10 communication connections are not correlated by the agent, the agent process identifiers in the 10 connection information are all B, each agent process identifier is subjected to information conversion processing, the binary values corresponding to the obtained 10 proxy processing identifiers are all 0, the forward direction information in the 5 pieces of connection information in the first connection information is all t2, the reverse direction information in the 5 pieces of connection information in the first connection information is all t1, information conversion processing is performed to obtain that the 5 pieces of forward direction information corresponding to the first connection information are all 0, the 5 pieces of reverse direction information are all 1, the forward direction information in the 5 pieces of connection information in the second connection information is all t1, the reverse direction information in the 5 pieces of connection information in the second connection information is all t2, information conversion processing is performed to obtain that the 5 pieces of forward direction information corresponding to the second connection information are all 1, and the 5 pieces of reverse direction information are all 0. A. B, t1 and t2 may both be 16-ary, for example, if A is 9, the result of the information conversion process is 1, and if A is 8, the result of the information conversion process is 0; if t1 is F, the result of the information conversion process is 1, and t1 is D, the result of the information conversion process is 0.
Step 200A, respectively combining the binary values corresponding to the proxy processing identifiers in each of the first connection information and the second connection information, the binary values corresponding to the forward direction information, and the binary values corresponding to the reverse direction information to obtain proxy combination information, forward combination information, and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information, and reverse combination information corresponding to the second connection information.
Continuing with the above example, the proxy combination information corresponding to the first connection information is 11111, the positive combination information corresponding to the first connection information is 00000, the anti-combination information corresponding to the first connection information is 11111, the proxy combination information corresponding to the second connection information is 11111, the positive combination information corresponding to the second connection information is 11111, and the anti-combination information corresponding to the second connection information is 00000.
In the above embodiment, the agent processing identifier, the forward direction information, and the reverse direction information are converted into binary values, and the binary values are combined by the combination information to obtain the binary string, so that the processing is performed according to the binary string in the following step, thereby improving the processing efficiency.
In an embodiment, the step 300 of processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information respectively to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information includes:
step 300A, performing logical bitwise and processing on the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information, respectively, to obtain an identification processing result, a forward direction processing result, and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result, and a reverse direction processing result corresponding to the second connection information.
The logical bitwise AND operation means that AND operation is performed on the result (or binary value) and the binary value corresponding to the agent combination information or the positive combination information or the negative combination information in order. The following describes the logical bitwise and processing using the agent combination information as an example. For example, the agent combination information corresponding to the first connection information is 11111, and then the 1 st and the 2 nd 1 in the agent combination information are anded to obtain the 1 st and result 1, the 1 st and result 1 and the 3 rd 1 in the agent combination information are anded to obtain the 2 nd and result 1, the 2 nd and result 1 and the 4 th 1 in the agent combination information are anded to obtain the 3 rd and result 1, the 3 rd and result 1 and the 5 th 1 in the agent combination information are anded to obtain the 4 th and result 1, and the 4 th and result is the identification processing result corresponding to the first connection information. For another example, the agent combination information corresponding to the first connection information is 11101, and then the 1 st and the 2 nd 1 in the agent combination information are anded to obtain the 1 st and result 1, the 1 st and result 1 and the 3 rd 1 in the agent combination information are anded to obtain the 2 nd and result 1, the 2 nd and result 1 and the 4 th 0 in the agent combination information are anded to obtain the 3 rd and result 0, the 3 rd and result 0 and the 5 th 1 in the agent combination information are anded to obtain the 4 th and result 0, and the 4 th and result is the identification processing result corresponding to the first connection information.
In the above embodiment, after the binary value is converted, the processing result can be obtained by simple logical bitwise and processing.
In an embodiment, the obtaining the test result according to the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information in step 400 includes: step 400A or step 400B.
Step 400A, if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, the test result is normal.
Such a scenario is: the result of the information conversion processing performed by the terminal a is 1, the result of the information conversion processing performed by the terminal t1 is 1, the result of the information conversion processing performed by the terminal t2 is 0, each communication connection in the first connection information is initiated by the client, and each communication connection in the second connection information is initiated by the agent.
Step 400B, if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, the test result is normal.
Such a scenario is: the result of the information conversion processing performed by the terminal a is 1, the result of the information conversion processing performed by the terminal t1 is 1, the result of the information conversion processing performed by the terminal t2 is 0, each communication connection in the first connection information is initiated by the agent terminal, and each communication connection in the second connection information is initiated by the server terminal.
The above examples illustrate how test results can be obtained based on the final and results.
In an embodiment, the step 300 of processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information respectively to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information includes: step 300a, step 300b and step 300 c.
The following description will be given by taking an example in which the first connection information corresponds to 5 communication connections, the second connection information corresponds to 5 communication connections, the proxy combination information corresponding to the first connection information is 11111, the positive combination information corresponding to the first connection information is 00000, the negative combination information corresponding to the first connection information is 11111, the proxy combination information corresponding to the second connection information is 11111, the positive combination information corresponding to the second connection information is 11111, and the negative combination information corresponding to the second connection information is 00000.
Step 300a, adding each binary value in the proxy combination information corresponding to the first connection information and the second connection information to obtain an identification processing result corresponding to the first connection information and an identification processing result corresponding to the second connection information.
And adding each binary value in the proxy combination information corresponding to the first connection information to obtain a result of identification processing corresponding to the first connection information as 5, and adding each binary value in the proxy combination information corresponding to the second connection information to obtain a result of identification processing corresponding to the second connection information as 5.
And 300b, adding binary values in the positive combination information corresponding to the first connection information and the second connection information respectively to obtain a positive direction processing result corresponding to the first connection information and a positive direction processing result corresponding to the second connection information.
And adding all binary values in the positive combination information corresponding to the first connection information to obtain a positive direction processing result of 0 corresponding to the first connection information, and adding all binary values in the positive combination information corresponding to the second connection information to obtain a positive direction processing result of 5 corresponding to the second connection information.
Step 300c, adding each binary value in the anti-combination information corresponding to the first connection information and the second connection information to obtain an opposite direction processing result corresponding to the first connection information and an opposite direction processing result corresponding to the second connection information.
And adding each binary value in the anti-combination information corresponding to the first connection information to obtain a reverse direction processing result of 5 corresponding to the first connection information, and adding each binary value in the anti-combination information corresponding to the second connection information to obtain a reverse direction processing result of 0 corresponding to the second connection information.
In the above embodiment, the identification processing result, the forward direction processing result, and the reverse direction processing result are obtained by adding binary values in the combination information.
In an embodiment, the obtaining the test result according to the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information in step 400 includes:
and if the identification processing result corresponding to the first connection information is equal to the quantity of the connection information in the first connection information, the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the first connection information, the identification processing result corresponding to the second connection information is equal to the quantity of the connection information in the second connection information, and the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the second connection information, the test result between the server side and the agent side is normal.
Continuing with the above example, since the flag processing result corresponding to the first connection information is 5, the flag processing result corresponding to the second connection information is also 5, the sum of the forward direction processing result and the reverse direction processing result corresponding to the first connection information is 5, and the sum of the forward direction processing result and the reverse direction processing result corresponding to the second connection information is 5, the test result is normal.
For another example, if the first connection information corresponds to 5 communication connections, the second connection information corresponds to 5 communication connections, the proxy combination information corresponding to the first connection information is 11111, the positive combination information corresponding to the first connection information is 00100, the inverse combination information corresponding to the first connection information is 11001, the proxy combination information corresponding to the second connection information is 11111, the positive combination information corresponding to the second connection information is 11011, and the inverse combination information corresponding to the second connection information is 00110, then the identification processing result corresponding to the first connection information is 5, the identification processing result corresponding to the second connection information is also 5, the sum of the forward direction processing result and the inverse direction processing result corresponding to the first connection information is 4, and the sum of the forward direction processing result and the inverse direction processing result corresponding to the second connection information is 6, and thus the test result is abnormal.
The above examples illustrate how test results can be obtained from the results of the addition.
In an embodiment, the proxy processing identifier includes a processing identifier and a target processing identifier, where the processing identifier reflects whether the proxy performs processing on a connection, and the target processing identifier reflects whether the proxy performs target processing.
For example, the application scenario is a load balancing scenario, the target process is an a process, and the first connection information corresponds to 5 communication connections, so that for each of the 5 communication connections, if the agent performs a correlation process, the value of the process flag is 1, if the agent does not perform a correlation process, the value of the process flag is 0, further, if the agent performs an a process, the value of the target process flag is 1, and if the agent does not perform an a process, the target process flag is 0. Then, as can be seen from the above, the proxy process is identified as 11 or 01 or 10.
The following example illustrates how to obtain a test result when the proxy process identifier includes a process identifier and a target process identifier, assuming that each communication connection in the first connection information is initiated by the client, each communication connection in the second connection information is initiated by the proxy, the proxy combination information corresponding to the first connection information is 1111111, the positive combination information corresponding to the first connection information is 00000, the anti-combination information corresponding to the first connection information is 11111, the proxy combination information corresponding to the second connection information is 1111111111, the positive combination information corresponding to the second connection information is 11111, the anti-combination information corresponding to the second connection information is 00000, and logic bitwise and processing are performed to obtain an identifier process result corresponding to the first connection information is 1, a forward direction process result corresponding to the first connection information is 0, and a reverse direction process result corresponding to the first connection information is 1, the processing result of the identifier corresponding to the second connection information is 1, the processing result of the positive direction corresponding to the first connection information is 1, and the processing result of the negative direction corresponding to the first connection information is 0, so that the test result is normal; otherwise, the test result is abnormal, for example, the agent combination information corresponding to the first connection information is 1011111111, so the flag processing result corresponding to the first connection information is 0, and thus the test result is abnormal.
In the embodiment, the proxy processing identifier includes two identifiers, and whether the proxy side performs the target processing can be determined through the two identifiers, so that the test depth is increased, and the test result for the target processing can be further obtained.
In one embodiment, as shown in FIG. 3, there is provided an apparatus 300 for testing an agent, comprising:
an obtaining module 301, configured to obtain first connection information and second connection information corresponding to a target scene, where the first connection information is connection information between a client and an agent, the second connection information is connection information between the agent and a server, and the connection information includes an agent processing identifier, forward direction information, and reverse direction information, where the agent processing identifier reflects whether the agent has processed a connection, the forward direction information reflects whether the agent initiates a connection, and the reverse direction information reflects whether the client or the server initiates a connection;
the combining module 302 is configured to combine the proxy processing identifier, the forward direction information, and the reverse direction information in each of the first connection information and the second connection information, respectively, to obtain proxy combination information, forward combination information, and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information, and reverse combination information corresponding to the second connection information;
a processing module 303, configured to process the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information, respectively, to obtain an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the first connection information, and an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the second connection information;
the result module 304 is configured to obtain a test result according to the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information.
In one embodiment, the apparatus 300 of the test agent further comprises: a binary conversion module, configured to perform information conversion processing on the proxy processing identifier, the forward direction information, and the reverse direction information in each piece of connection information in the first connection information and the second connection information, respectively, to obtain a binary value corresponding to the proxy processing identifier, a binary value corresponding to the forward direction information, and a binary value corresponding to the reverse direction information; the combination module 302 is specifically configured to: and combining binary values corresponding to the agent processing identifications in the first connection information and the second connection information, binary values corresponding to the forward direction information and binary values corresponding to the reverse direction information respectively to obtain agent combination information, forward combination information and reverse combination information corresponding to the first connection information, and agent combination information, forward combination information and reverse combination information corresponding to the second connection information.
In an embodiment, the processing module 303 is specifically configured to: and carrying out logic bitwise and processing on the agent combination information, the positive combination information and the negative combination information corresponding to the first connection information and the agent combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information.
In an embodiment, the result module 304 is specifically configured to: if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, the test result is normal; or if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, the test result is normal.
In an embodiment, the processing module 303 is specifically configured to: adding binary values in the proxy combination information corresponding to the first connection information and the second connection information respectively to obtain an identification processing result corresponding to the first connection information and an identification processing result corresponding to the second connection information; adding binary values in positive combination information corresponding to the first connection information and the second connection information respectively to obtain a positive direction processing result corresponding to the first connection information and a positive direction processing result corresponding to the second connection information; and adding binary values in the anti-combination information corresponding to the first connection information and the second connection information respectively to obtain an opposite direction processing result corresponding to the first connection information and an opposite direction processing result corresponding to the second connection information.
In an embodiment, the result module 304 is specifically configured to: and if the identification processing result corresponding to the first connection information is equal to the quantity of the connection information in the first connection information, the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the first connection information, the identification processing result corresponding to the second connection information is equal to the quantity of the connection information in the second connection information, and the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the second connection information, the test result between the server side and the agent side is normal.
In an embodiment, the proxy processing identifier includes a processing identifier and a target processing identifier, where the processing identifier reflects whether the proxy performs processing on a connection, and the target processing identifier reflects whether the proxy performs target processing.
In one embodiment, as shown in fig. 4, a computer device is provided, which may be a terminal or a server in particular. The computer device comprises a processor, a memory and a network interface which are connected through a system bus, wherein the memory comprises a nonvolatile storage medium and an internal memory, the nonvolatile storage medium of the computer device stores an operating system and also stores a computer program, and the computer program can enable the processor to realize the method for testing the agent when being executed by the processor. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a method of testing the agent. Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The method of testing an agent provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 4. The memory of the computer device may store therein the individual program templates of the devices constituting the test agent. Such as an acquisition module 301, a combining module 302, and a processing module 303.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring first connection information and second connection information corresponding to a target scene, wherein the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, positive direction information and negative direction information, the agent processing identifier reflects whether the agent terminal processes aiming at connection, the positive direction information reflects whether the agent terminal initiates connection, and the negative direction information reflects whether the client or the server terminal initiates connection;
combining the proxy processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
processing the proxy combination information, the positive combination information and the negative combination information corresponding to the first connection information, and the proxy combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information;
and obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
In one embodiment, a computer readable storage medium is provided, storing a computer program that, when executed by a processor, causes the processor to perform the steps of:
acquiring first connection information and second connection information corresponding to a target scene, wherein the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, positive direction information and negative direction information, the agent processing identifier reflects whether the agent terminal processes aiming at connection, the positive direction information reflects whether the agent terminal initiates connection, and the negative direction information reflects whether the client or the server terminal initiates connection;
combining the proxy processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
processing the proxy combination information, the positive combination information and the negative combination information corresponding to the first connection information, and the proxy combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information;
and obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
It should be noted that the method for testing an agent, the apparatus for testing an agent, the computer device and the computer readable storage medium described above belong to a general inventive concept, and the contents of the embodiments of the method for testing an agent, the apparatus for testing an agent, the computer device and the computer readable storage medium may be mutually applicable.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, 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.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of testing an agent, comprising:
acquiring first connection information and second connection information corresponding to a target scene, wherein the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, positive direction information and negative direction information, the agent processing identifier reflects whether the agent terminal processes aiming at connection, the positive direction information reflects whether the agent terminal initiates connection, and the negative direction information reflects whether the client or the server terminal initiates connection;
combining the proxy processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
processing the proxy combination information, the positive combination information and the negative combination information corresponding to the first connection information, and the proxy combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information;
and obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
2. The method according to claim 1, wherein before the combining the proxy process identifier, the forward direction information, and the reverse direction information in each of the first connection information and the second connection information to obtain the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information, further comprises:
respectively performing information conversion processing on the agent processing identifier, the forward direction information and the reverse direction information in each piece of connection information in the first connection information and the second connection information to obtain a binary value corresponding to the agent processing identifier, a binary value corresponding to the forward direction information and a binary value corresponding to the reverse direction information;
the method for combining the agent processing identifier, the forward direction information and the reverse direction information in each connection information of the first connection information and the second connection information respectively to obtain the agent combination information, the forward combination information and the reverse combination information corresponding to the first connection information, and the agent combination information, the forward combination information and the reverse combination information corresponding to the second connection information comprises the following steps:
and combining binary values corresponding to the agent processing identifications in the first connection information and the second connection information, binary values corresponding to the forward direction information and binary values corresponding to the reverse direction information respectively to obtain agent combination information, forward combination information and reverse combination information corresponding to the first connection information, and agent combination information, forward combination information and reverse combination information corresponding to the second connection information.
3. The method according to claim 2, wherein the processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information respectively to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information comprises:
and carrying out logic bitwise and processing on the agent combination information, the positive combination information and the negative combination information corresponding to the first connection information and the agent combination information, the positive combination information and the negative combination information corresponding to the second connection information respectively to obtain an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the first connection information, and an identification processing result, a forward direction processing result and a reverse direction processing result corresponding to the second connection information.
4. The method according to claim 3, wherein obtaining the test result according to the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information comprises:
if the identifier processing result corresponding to the first connection information is 1, the forward direction processing result is 0, and the reverse direction processing result is 1, and the identifier processing result corresponding to the second connection information is 1, the forward direction processing result is 1, and the reverse direction processing result is 0, the test result is normal;
alternatively, the first and second electrodes may be,
and if the identification processing result corresponding to the first connection information is 1, the positive direction processing result is 1, and the negative direction processing result is 0, and the identification processing result corresponding to the second connection information is 1, the positive direction processing result is 0, and the negative direction processing result is 1, the test result is normal.
5. The method according to claim 2, wherein the processing the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information respectively to obtain the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information comprises:
adding binary values in the proxy combination information corresponding to the first connection information and the second connection information respectively to obtain an identification processing result corresponding to the first connection information and an identification processing result corresponding to the second connection information;
adding binary values in positive combination information corresponding to the first connection information and the second connection information respectively to obtain a positive direction processing result corresponding to the first connection information and a positive direction processing result corresponding to the second connection information;
and adding binary values in the anti-combination information corresponding to the first connection information and the second connection information respectively to obtain an opposite direction processing result corresponding to the first connection information and an opposite direction processing result corresponding to the second connection information.
6. The method according to claim 5, wherein obtaining the test result according to the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the first connection information, and the identifier processing result, the forward direction processing result, and the reverse direction processing result corresponding to the second connection information comprises:
and if the identification processing result corresponding to the first connection information is equal to the quantity of the connection information in the first connection information, the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the first connection information, the identification processing result corresponding to the second connection information is equal to the quantity of the connection information in the second connection information, and the sum of the forward direction processing result and the reverse direction processing result is equal to the quantity of the connection information in the second connection information, the test result between the server side and the agent side is normal.
7. The method according to claim 1, wherein the proxy processing identifier includes a processing identifier reflecting whether the proxy has processed the connection and a target processing identifier reflecting whether the proxy has processed the target.
8. An apparatus for testing an agent, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring first connection information and second connection information corresponding to a target scene, the first connection information is connection information between a client and an agent terminal, the second connection information is connection information between the agent terminal and a server terminal, the connection information comprises an agent processing identifier, forward direction information and reverse direction information, the agent processing identifier reflects whether the agent terminal processes connection or not, the forward direction information reflects whether the agent terminal initiates connection or not, and the reverse direction information reflects whether the client or the server terminal initiates connection or not;
the combination module is used for respectively combining the proxy processing identifier, the forward direction information and the reverse direction information in each piece of connection information in the first connection information and the second connection information to obtain proxy combination information, forward combination information and reverse combination information corresponding to the first connection information, and proxy combination information, forward combination information and reverse combination information corresponding to the second connection information;
a processing module, configured to process the proxy combination information, the forward combination information, and the reverse combination information corresponding to the first connection information, and the proxy combination information, the forward combination information, and the reverse combination information corresponding to the second connection information, respectively, to obtain an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the first connection information, and an identifier processing result, a forward direction processing result, and a reverse direction processing result corresponding to the second connection information;
and the result module is used for obtaining a test result according to the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the first connection information, and the identification processing result, the forward direction processing result and the reverse direction processing result corresponding to the second connection information.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of testing an agent according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium having stored thereon computer program instructions which, when read and executed by a processor, perform the steps of the method of testing an agent of any of claims 1 to 7.
CN202111341474.9A 2021-11-12 2021-11-12 Method, device, equipment and storage medium for testing proxy Active CN114050991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111341474.9A CN114050991B (en) 2021-11-12 2021-11-12 Method, device, equipment and storage medium for testing proxy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111341474.9A CN114050991B (en) 2021-11-12 2021-11-12 Method, device, equipment and storage medium for testing proxy

Publications (2)

Publication Number Publication Date
CN114050991A true CN114050991A (en) 2022-02-15
CN114050991B CN114050991B (en) 2023-03-10

Family

ID=80208895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111341474.9A Active CN114050991B (en) 2021-11-12 2021-11-12 Method, device, equipment and storage medium for testing proxy

Country Status (1)

Country Link
CN (1) CN114050991B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050076238A1 (en) * 2003-10-03 2005-04-07 Ormazabal Gaston S. Security management system for monitoring firewall operation
CN102427589A (en) * 2012-01-01 2012-04-25 洛阳普天通信科技有限公司 Method and system for transmitting high traffic data by binding a plurality of wireless networks
CN104468655A (en) * 2013-09-18 2015-03-25 阿里巴巴集团控股有限公司 Method and system for testing reverse proxy software
CN108337181A (en) * 2017-01-20 2018-07-27 深圳市中兴微电子技术有限公司 A kind of switching network congestion management and device
JP2020038506A (en) * 2018-09-04 2020-03-12 Necソリューションイノベータ株式会社 Information processing system, information processing method, and program
US20200412826A1 (en) * 2019-06-27 2020-12-31 Imperva, Inc. Accelerating dynamic content delivery in a content delivery network
CN113542363A (en) * 2021-06-21 2021-10-22 安徽省交通规划设计研究总院股份有限公司 Cloud platform based on user-defined device protocol library and big data architecture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050076238A1 (en) * 2003-10-03 2005-04-07 Ormazabal Gaston S. Security management system for monitoring firewall operation
CN102427589A (en) * 2012-01-01 2012-04-25 洛阳普天通信科技有限公司 Method and system for transmitting high traffic data by binding a plurality of wireless networks
CN104468655A (en) * 2013-09-18 2015-03-25 阿里巴巴集团控股有限公司 Method and system for testing reverse proxy software
CN108337181A (en) * 2017-01-20 2018-07-27 深圳市中兴微电子技术有限公司 A kind of switching network congestion management and device
JP2020038506A (en) * 2018-09-04 2020-03-12 Necソリューションイノベータ株式会社 Information processing system, information processing method, and program
US20200412826A1 (en) * 2019-06-27 2020-12-31 Imperva, Inc. Accelerating dynamic content delivery in a content delivery network
CN113542363A (en) * 2021-06-21 2021-10-22 安徽省交通规划设计研究总院股份有限公司 Cloud platform based on user-defined device protocol library and big data architecture

Also Published As

Publication number Publication date
CN114050991B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN107040585B (en) Service checking method and device
Thing et al. Live memory forensics of mobile phones
CN108572970B (en) Structured data processing method and distributed processing system
CN108255701B (en) Scene testing method and mobile terminal
CN113205416A (en) Service processing method and system based on block chain prediction machine
CN112491659A (en) Flow playback test method and device, computer equipment and storage medium
CN109981739A (en) Session data processing method, device, equipment and medium based on block chain
CN114640503A (en) Application system verification method and device, computer equipment and storage medium
CN115484322A (en) Data packet decapsulation and uninstallation method and device, electronic device and storage medium
CN111224782A (en) Data verification method based on digital signature, intelligent device and storage medium
CN113781202A (en) Data processing method, data processing device, computer equipment and storage medium
CN114050991B (en) Method, device, equipment and storage medium for testing proxy
Ababneh et al. IMO forensics in android and windows systems
CN111737055A (en) Service processing method, device, equipment and computer readable storage medium
CN114356446A (en) Method, device and equipment for processing inter-process event and storage medium
CN111209137B (en) Data access control method and device, data access equipment and system
CN109491699B (en) Resource checking method, device, equipment and storage medium of application program
CN111522873B (en) Block generation method, device, computer equipment and storage medium
CN116107781A (en) Log tracking method, device, electronic equipment and computer program product
CN113282347A (en) Plug-in operation method, device, equipment and storage medium
CN111552696A (en) Data processing method and device based on big data, computer equipment and medium
CN113688048B (en) Application stability detection method and device, electronic equipment and storage medium
CN113485944B (en) Software testing method and system
CN112073174B (en) Communication account decryption method, device, equipment, storage medium and information interaction system
CN110442447B (en) Message queue-based load balancing method and device and computer equipment

Legal Events

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