CN116506340A - Flow link testing method and device, electronic equipment and storage medium - Google Patents
Flow link testing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116506340A CN116506340A CN202310761075.0A CN202310761075A CN116506340A CN 116506340 A CN116506340 A CN 116506340A CN 202310761075 A CN202310761075 A CN 202310761075A CN 116506340 A CN116506340 A CN 116506340A
- Authority
- CN
- China
- Prior art keywords
- test
- target
- node
- log
- standby
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 661
- 238000000034 method Methods 0.000 claims abstract description 48
- 238000004891 communication Methods 0.000 claims description 31
- 230000006870 function Effects 0.000 claims description 10
- 230000005540 biological transmission Effects 0.000 claims description 4
- 238000010998 test method Methods 0.000 claims 1
- 238000004590 computer program Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/04—Processing captured monitoring data, e.g. for logfile generation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention provides a method and a device for testing a flow link, electronic equipment and a storage medium, wherein the method comprises the following steps: generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence; testing the plurality of test nodes based on the test request to generate a plurality of test logs; determining a target test log among the plurality of test logs; and transmitting the target test log to the server. According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
Description
Technical Field
The present invention relates to the field of cloud computing, and in particular, to a method and apparatus for testing a traffic link, an electronic device, and a storage medium.
Background
With the development of cloud computing technology, it is important to ensure that traffic links function normally in a service discovery framework. In the prior art, monitoring is performed based on an original network flow technical means, whether the flow can go to a correct branch or not cannot be determined in the testing process of a flow link, a problem reason cannot be thrown out when an incorrect branch is encountered, and finally the incorrect branch cannot be determined, so that the problem of lower testing efficiency in the testing process is caused.
Disclosure of Invention
The embodiment of the invention provides a resource scheduling method, a resource scheduling device and related equipment, which solve the problem of lower testing efficiency in the prior art.
In a first aspect, an embodiment of the present invention provides a method for testing a traffic link, including:
generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence;
testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code;
and transmitting the target test log to a server.
Optionally, after determining the target test log in the plurality of test logs, the method further includes:
determining a target standby test node based on matching of the target test node in a database, wherein the database comprises a plurality of standby test nodes, the standby test nodes are in one-to-one correspondence with the test nodes, the target standby test node is a test node corresponding to the target test node in the standby test nodes, and the functions of the target standby test node and the target test node are the same;
replacing the target test node in the first flow link by using the target standby test node to obtain a second flow link;
and testing the second traffic link based on the test request.
Optionally, the replacing the target test node in the first traffic link with the target standby test node to obtain a second traffic link includes:
determining a first test node and a second test node in the first flow link based on the target test node, wherein the first test node is one test node before the target test node in the flow link, and the second test node is one test node after the target test node in the flow link;
disconnecting the communication connection between the first test node and the target test node, and disconnecting the communication connection between the second test node and the target test node;
and establishing communication connection between the target standby test node and the first test node and between the target standby test node and the second test node respectively to obtain a second flow link.
Optionally, after the target standby test node is in communication connection with the first test node and the second test node respectively to obtain the second traffic link, the method further includes:
performing communication test on the target standby test node to obtain a target standby test log;
and transmitting the target standby test log corresponding to the target standby test node to a server under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
Optionally, after the target test log is transmitted to the server, the method further includes:
generating an analysis report based on the target test log and the target backup test log, the analysis report including at least one failure cause that caused the target test node to fail to detect the target test code.
Optionally, the generating an analysis report based on the target test log and the target standby test log includes:
generating difference information based on a preset comparison rule, the target test log and the target standby test log, wherein the difference information indicates a distinguishing point between the target test log and the target standby test log;
an analysis report is generated based on the difference information.
Optionally, the fault cause includes: server failure, server downtime, request path configuration errors, service branch errors, automatic restart, or misoperations.
In a second aspect, an embodiment of the present invention further provides a device for testing a traffic link, including:
the system comprises a request generation module, a request generation module and a test module, wherein the request generation module is used for generating a test request based on a first flow link to be tested, the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence;
the log generation module is used for testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
the log determining module is used for determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code;
and the log transmission module is used for transmitting the target test log to a server.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the method for testing a traffic link according to any one of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method for testing a traffic link as in any of the first aspects.
The embodiment of the invention provides a method and a device for testing a flow link, electronic equipment and a storage medium, wherein the method comprises the following steps: generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence; testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes; determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code; and transmitting the target test log to a server. According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a method flowchart of a method for testing a traffic link according to an embodiment of the present invention;
FIG. 2 is a schematic flow diagram according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a testing device for a flow link according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," and the like in embodiments of the present invention are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Furthermore, the use of "and/or" in this application means at least one of the connected objects, such as a and/or B and/or C, is meant to encompass the 7 cases of a alone, B alone, C alone, and both a and B, both B and C, both a and C, and both A, B and C.
The embodiment of the application provides a method for testing a traffic link, as shown in fig. 1, the method comprises the following steps:
step 101, generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence.
In this embodiment, the first flow link to be tested includes a plurality of test nodes that are sequentially connected in communication, and in the testing process, the plurality of test nodes need to be tested sequentially. The test request is generally an http request, and is sent by performing system operation in the tested system program. The test data is used for testing a plurality of test nodes, and the target test code is a unique ID of the test request, specifically, b) a request unique request_id (request_id in the request is preferentially used) is generated in the request, response request return information of the http request, and the unique request of the functional operation is represented by the ID.
And 102, testing the plurality of test nodes based on the test request to generate a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes.
In this embodiment, a plurality of test logs are generated when testing the plurality of test nodes according to the test request, and each test log corresponds to one test node, so that whether the current test node is a normal node can be known through the test log. It should be noted that the test log includes the target test code request_id of the test, and the result of the request_id searched in the log is strung into a request link with complete functions according to the positive sequence of time. For example, when the service A calls the service B and the service B calls the service C, the corresponding request_id needs to be found in the running log of the corresponding branch, and the three service branches ABC are connected in series, namely a complete request link.
Step 103, determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and the test node corresponding to the target test log is a fault node which cannot detect the target test code.
In this embodiment, if the panic information is found in the target test log of the multiple test logs, another log finds the request_id, which belongs to finding the traffic link error in the request link, or finds the request_id not to appear in the target branch, it represents that the service request path has a problem. At this time, the current test node is indicated as a failed node.
And 104, transmitting the target test log to a server.
In this embodiment, after confirming the failed node, the target test log is transmitted to the server for storage. Clicking the branch node of the error report can feed back the identified error report information into the front end page to assist the personnel in checking the problem (the condition can not influence the use of the system functions, the problem of the link branch can be warned to the testing personnel, and meanwhile, the testing personnel can check the problem according to the error report information.)
In addition, it should be noted that the scheme can provide a search request_id function in the page, and the complete request link is visually displayed according to the request_id, so that a tester can verify the correctness of the link in the service discovery framework.
The embodiment of the invention provides a method for testing a flow link, which comprises the following steps: generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence; testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes; determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code; and transmitting the target test log to a server. According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
In some possible embodiments, after determining the target test log from the plurality of test logs, the method further comprises:
determining a target standby test node based on matching of the target test node in a database, wherein the database comprises a plurality of standby test nodes, the standby test nodes are in one-to-one correspondence with the test nodes, the target standby test node is a test node corresponding to the target test node in the standby test nodes, and the functions of the target standby test node and the target test node are the same;
replacing the target test node in the first flow link by using the target standby test node to obtain a second flow link;
and testing the second traffic link based on the test request.
In this embodiment, it should be noted that, a plurality of test nodes of a first traffic link belong to a sequential communication connection, after a current test node completes a test, a subsequent test node can perform a test, and when the test node is a fault node, the traffic cannot pass at this time, and then the traffic can pass through other test nodes, so that the fault node cannot perform a test. Illustratively, as shown in FIG. 2, the default branch is a standby node, where the 01 branch and the 02 branch are two different traffic test links, respectively. In the 01 branch and the 02 branch, 4 test nodes connected in turn are taken as examples for illustration, and the services corresponding to different test nodes are different. In the 02 branch, each test node is a normal test node, so that the test data sequentially passes through 4 test nodes to complete the test. In the 01 branch, the second test node and the fourth test node are fault nodes, and at this time, the test cannot be performed, and then the standby node with the same function is called for testing, for example, after the second test node uses the standby test node, the normal flow link is returned after the test is completed, that is, the normal third test node is used.
Therefore, after the target standby test node in the first flow link is replaced by the target test node, a second flow link can be obtained, and the second flow link is tested to ensure the integrity of the test.
Optionally, the replacing the target test node in the first traffic link with the target standby test node to obtain a second traffic link includes:
determining a first test node and a second test node in the first flow link based on the target test node, wherein the first test node is one test node before the target test node in the flow link, and the second test node is one test node after the target test node in the flow link;
disconnecting the communication connection between the first test node and the target test node, and disconnecting the communication connection between the second test node and the target test node;
and establishing communication connection between the target standby test node and the first test node and between the target standby test node and the second test node respectively to obtain a second flow link.
In this embodiment, as shown in fig. 2, when the second test node (corresponding to the service B) in the 01 branch is a fault node, the communication connection with the two test nodes of the service a and the service C is disconnected, and the target standby test node is used to replace the fault node, specifically, the node corresponding to the service B in the default branch is used to replace the fault node, so as to ensure that the test process is continued, at this time, the second test node is marked, for example, the fault node is set to red, and the fault branch is returned to the front page to indicate that the fault is wrong.
Optionally, after the target standby test node is in communication connection with the first test node and the second test node respectively to obtain the second traffic link, the method further includes:
performing communication test on the target standby test node to obtain a target standby test log;
and transmitting the target standby test log corresponding to the target standby test node to a server under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
In this embodiment, after the replacement is performed by using the target standby test node, the communication test is performed on the target standby test node, so that it is ensured that the test can be normally satisfied. And uploading the target standby test log generated by the target standby test node to a server for backup under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
Optionally, after the target test log is transmitted to the server, the method further includes:
generating an analysis report based on the target test log and the target backup test log, the analysis report including at least one failure cause that caused the target test node to fail to detect the target test code.
In this embodiment, the target test log and the target standby test log are uploaded to a server for analysis, and a fault cause of a specific fault node is found, where the fault cause includes: server failure, server downtime, request path configuration errors, service branch errors, automatic restart, or misoperations.
Optionally, the generating an analysis report based on the target test log and the target standby test log includes:
generating difference information based on a preset comparison rule, the target test log and the target standby test log, wherein the difference information indicates a distinguishing point between the target test log and the target standby test log;
an analysis report is generated based on the difference information.
In this embodiment, the preset comparison rule may be generated by the server side, or may be specified by a tester, and by determining a difference point between the target test log and the target standby test log, a fault cause of the fault node may be better determined, so that the test efficiency is further improved.
The embodiment of the invention provides a method for testing a flow link, which comprises the following steps: generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence; testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes; determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code; and transmitting the target test log to a server. According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
Referring to fig. 3, fig. 3 is a block diagram of a flow link testing apparatus according to an embodiment of the present invention. As shown in fig. 3, the traffic link testing apparatus 300 includes:
a request generating module 310, configured to generate a test request based on a first traffic link to be tested, where the test request includes test data and a target test code, where the target test code is configured to uniquely identify the test data, and the first traffic link to be tested includes a plurality of test nodes that are sequentially connected;
the log generating module 320 is configured to perform a test on the plurality of test nodes based on the test request, and generate a plurality of test logs, where the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
the log determining module 330 is configured to determine a target test log from the plurality of test logs, where the target test log is a test log that does not include the target test code, and a test node corresponding to the target test log is a fault node that cannot detect the target test code;
and the log transmission module 340 is configured to transmit the target test log to a server.
Optionally, the method further comprises:
the matching module is used for matching in a database based on the target test node to determine a target standby test node, wherein the database comprises a plurality of standby test nodes, the standby test nodes are in one-to-one correspondence with the test nodes, the target standby test node is a test node corresponding to the target test node in the standby test nodes, and the functions of the target standby test node and the target test node are the same;
a replacing module, configured to replace the target test node in the first traffic link with the target standby test node to obtain a second traffic link;
and the test module is used for testing the second flow link based on the test request.
Optionally, the replacing module includes:
a determining submodule, configured to determine, based on the target test node, a first test node and a second test node in the first traffic link, where the first test node is a test node before the target test node in the traffic link, and the second test node is a test node after the target test node in the traffic link;
a disconnection sub-module, configured to disconnect the communication connection between the first test node and the target test node, and disconnect the communication connection between the second test node and the target test node;
and the communication connection sub-module is used for respectively establishing communication connection between the target standby test node and the first test node and between the target standby test node and the second test node to obtain a second traffic link.
Optionally, the method further comprises:
the communication test sub-module is used for carrying out communication test on the target standby test node to obtain a target standby test log;
and the communication transmission sub-module is used for transmitting the target standby test log corresponding to the target standby test node to a server under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
Optionally, the method further comprises:
and the log analysis sub-module is used for generating an analysis report based on the target test log and the target standby test log, wherein the analysis report comprises at least one fault reason which leads the target test node to be incapable of detecting the target test code.
Optionally, the log analysis submodule includes:
the first generation unit is used for generating difference information based on a preset comparison rule, the target test log and the target standby test log, wherein the difference information indicates a distinguishing point between the target test log and the target standby test log;
and a second generation unit for generating an analysis report based on the difference information.
Optionally, the fault cause includes: server failure, server downtime, request path configuration errors, service branch errors, automatic restart, or misoperations.
According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
The embodiment of the invention also provides electronic equipment. Referring to fig. 4, a communication device may include a processor 401, a memory 402, and a program 4021 stored on the memory 402 and executable on the processor 401.
Wherein the processor 401 is configured to execute a computer program stored in the memory 402, implementing the following steps:
generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence;
testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code;
and transmitting the target test log to a server.
Optionally, after determining the target test log in the plurality of test logs, the method further includes:
determining a target standby test node based on matching of the target test node in a database, wherein the database comprises a plurality of standby test nodes, the standby test nodes are in one-to-one correspondence with the test nodes, the target standby test node is a test node corresponding to the target test node in the standby test nodes, and the functions of the target standby test node and the target test node are the same;
replacing the target test node in the first flow link by using the target standby test node to obtain a second flow link;
and testing the second traffic link based on the test request.
Optionally, the replacing the target test node in the first traffic link with the target standby test node to obtain a second traffic link includes:
determining a first test node and a second test node in the first flow link based on the target test node, wherein the first test node is one test node before the target test node in the flow link, and the second test node is one test node after the target test node in the flow link;
disconnecting the communication connection between the first test node and the target test node, and disconnecting the communication connection between the second test node and the target test node;
and establishing communication connection between the target standby test node and the first test node and between the target standby test node and the second test node respectively to obtain a second flow link.
Optionally, after the target standby test node is in communication connection with the first test node and the second test node respectively to obtain the second traffic link, the method further includes:
performing communication test on the target standby test node to obtain a target standby test log;
and transmitting the target standby test log corresponding to the target standby test node to a server under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
Optionally, after the target test log is transmitted to the server, the method further includes:
generating an analysis report based on the target test log and the target backup test log, the analysis report including at least one failure cause that caused the target test node to fail to detect the target test code.
Optionally, the generating an analysis report based on the target test log and the target standby test log includes:
generating difference information based on a preset comparison rule, the target test log and the target standby test log, wherein the difference information indicates a distinguishing point between the target test log and the target standby test log;
an analysis report is generated based on the difference information.
Optionally, the fault cause includes: server failure, server downtime, request path configuration errors, service branch errors, automatic restart, or misoperations.
According to the embodiment of the invention, the plurality of test nodes included in the first flow link to be tested are sequentially tested by generating the unique target test code, and the plurality of test logs are generated, so that the target test log and the fault node corresponding to the target test log are determined in the plurality of test logs, and the test efficiency is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the methods of the embodiments described above may be implemented by hardware associated with program instructions, where the program may be stored on a readable medium.
The embodiment of the present disclosure further provides a readable storage medium, where a computer program is stored, where the computer program when executed by a processor may implement any step in the method embodiment corresponding to fig. 1, and may achieve the same technical effect, so that repetition is avoided, and no further description is provided herein.
The computer-readable storage media of the embodiments of the present disclosure may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
While the foregoing is directed to the preferred implementation of the disclosed embodiments, it should be noted that numerous modifications and adaptations to those skilled in the art may be made without departing from the principles of the disclosure, and such modifications and adaptations are intended to be within the scope of the disclosure.
Claims (10)
1. A method for testing a traffic link, comprising:
generating a test request based on a first flow link to be tested, wherein the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence;
testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code;
and transmitting the target test log to a server.
2. The method of claim 1, wherein after determining the target test log from the plurality of test logs, the method further comprises:
determining a target standby test node based on matching of the target test node in a database, wherein the database comprises a plurality of standby test nodes, the standby test nodes are in one-to-one correspondence with the test nodes, the target standby test node is a test node corresponding to the target test node in the standby test nodes, and the functions of the target standby test node and the target test node are the same;
replacing the target test node in the first flow link by using the target standby test node to obtain a second flow link;
and testing the second traffic link based on the test request.
3. The method of claim 2, wherein replacing the target test node in the first traffic link with the target backup test node results in a second traffic link, comprising:
determining a first test node and a second test node in the first flow link based on the target test node, wherein the first test node is one test node before the target test node in the flow link, and the second test node is one test node after the target test node in the flow link;
disconnecting the communication connection between the first test node and the target test node, and disconnecting the communication connection between the second test node and the target test node;
and establishing communication connection between the target standby test node and the first test node and between the target standby test node and the second test node respectively to obtain a second flow link.
4. A method according to claim 3, wherein after said communicatively connecting said target backup test node to said first test node and said second test node, respectively, to obtain a second traffic link, the method further comprises:
performing communication test on the target standby test node to obtain a target standby test log;
and transmitting the target standby test log corresponding to the target standby test node to a server under the condition that the target standby test log characterizes that the target standby test node can normally communicate with the first test node and the second test node.
5. The method of claim 4, wherein after transmitting the target test log to the server, the method further comprises:
generating an analysis report based on the target test log and the target backup test log, the analysis report including at least one failure cause that caused the target test node to fail to detect the target test code.
6. The method of claim 5, wherein the generating an analysis report based on the target test log and the target backup test log comprises:
generating difference information based on a preset comparison rule, the target test log and the target standby test log, wherein the difference information indicates a distinguishing point between the target test log and the target standby test log;
an analysis report is generated based on the difference information.
7. The method of claim 5, wherein the cause of the fault comprises: server failure, server downtime, request path configuration errors, service branch errors, automatic restart, or misoperations.
8. A traffic link testing apparatus, comprising:
the system comprises a request generation module, a request generation module and a test module, wherein the request generation module is used for generating a test request based on a first flow link to be tested, the test request comprises test data and target test codes, the target test codes are used for uniquely identifying the test data, and the first flow link to be tested comprises a plurality of test nodes which are connected in sequence;
the log generation module is used for testing the plurality of test nodes based on the test request, and generating a plurality of test logs, wherein the plurality of test logs are in one-to-one correspondence with the plurality of test nodes;
the log determining module is used for determining a target test log in the plurality of test logs, wherein the target test log is a test log which does not comprise the target test code, and a test node corresponding to the target test log is a fault node which cannot detect the target test code;
and the log transmission module is used for transmitting the target test log to a server.
9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method of testing a traffic link as claimed in any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the method for testing a traffic link according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310761075.0A CN116506340A (en) | 2023-06-27 | 2023-06-27 | Flow link testing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310761075.0A CN116506340A (en) | 2023-06-27 | 2023-06-27 | Flow link testing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116506340A true CN116506340A (en) | 2023-07-28 |
Family
ID=87320567
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310761075.0A Pending CN116506340A (en) | 2023-06-27 | 2023-06-27 | Flow link testing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116506340A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113689937A (en) * | 2021-07-07 | 2021-11-23 | 阿里巴巴新加坡控股有限公司 | Image annotation method, storage medium and processor |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200201746A1 (en) * | 2017-10-20 | 2020-06-25 | Mitsubishi Electric Corporation | Data verification apparatus, data verification method, and coputer readable medium |
CN112714042A (en) * | 2020-12-22 | 2021-04-27 | 北京字节跳动网络技术有限公司 | Pressure testing method and device, electronic equipment and storage medium |
CN113485880A (en) * | 2021-07-12 | 2021-10-08 | 浙江网商银行股份有限公司 | Test method and device |
CN114286358A (en) * | 2020-09-27 | 2022-04-05 | 大唐移动通信设备有限公司 | Method, device and system for processing test data and readable storage medium |
US20230044935A1 (en) * | 2021-08-09 | 2023-02-09 | International Business Machines Corporation | Monitoring stack memory usage to optimize programs |
CN116107913A (en) * | 2023-04-06 | 2023-05-12 | 阿里云计算有限公司 | Test control method, device and system of single-node server |
-
2023
- 2023-06-27 CN CN202310761075.0A patent/CN116506340A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200201746A1 (en) * | 2017-10-20 | 2020-06-25 | Mitsubishi Electric Corporation | Data verification apparatus, data verification method, and coputer readable medium |
CN114286358A (en) * | 2020-09-27 | 2022-04-05 | 大唐移动通信设备有限公司 | Method, device and system for processing test data and readable storage medium |
CN112714042A (en) * | 2020-12-22 | 2021-04-27 | 北京字节跳动网络技术有限公司 | Pressure testing method and device, electronic equipment and storage medium |
CN113485880A (en) * | 2021-07-12 | 2021-10-08 | 浙江网商银行股份有限公司 | Test method and device |
US20230044935A1 (en) * | 2021-08-09 | 2023-02-09 | International Business Machines Corporation | Monitoring stack memory usage to optimize programs |
CN116107913A (en) * | 2023-04-06 | 2023-05-12 | 阿里云计算有限公司 | Test control method, device and system of single-node server |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113689937A (en) * | 2021-07-07 | 2021-11-23 | 阿里巴巴新加坡控股有限公司 | Image annotation method, storage medium and processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110730246A (en) | Distributed link tracking method under micro-service architecture | |
CN110088744B (en) | Database maintenance method and system | |
CN103138988B (en) | Positioning treatment method and positioning treatment device of network faults | |
CN113162808B (en) | Storage link fault processing method and device, electronic equipment and storage medium | |
CN111913824B (en) | Method for determining data link fault cause and related equipment | |
CN116506340A (en) | Flow link testing method and device, electronic equipment and storage medium | |
CN110851471A (en) | Distributed log data processing method, device and system | |
US8327189B1 (en) | Diagnosing an incident on a computer system using a diagnostics analyzer database | |
CN112311574B (en) | Network topology connection checking method, device and equipment | |
CN105207797A (en) | Fault locating method and fault locating device | |
CN109815124B (en) | MBSE-based interlocking function defect analysis method and device and interlocking system | |
CN110708715A (en) | Service fault finding method and device for 5G base station | |
CN115705190A (en) | Method and device for determining dependence degree | |
CN110609761B (en) | Method and device for determining fault source, storage medium and electronic equipment | |
CN110943759A (en) | Electric power communication link data checking method based on depth-first search algorithm | |
CN115686921A (en) | Multipath anomaly detection and repair method, device, equipment and medium | |
CN112860562B (en) | Automatic test method and device | |
CN112131127B (en) | Interface testing method, device and system and electronic equipment | |
CN114168108A (en) | Code merging method and device, electronic equipment and computer readable storage medium | |
CN111694752B (en) | Application testing method, electronic device and storage medium | |
CN109302322B (en) | Test system and method for improving test accuracy of nuclear security level network | |
CN113448786A (en) | PCIe equipment testing method, device, equipment and readable storage medium | |
CN113050925B (en) | Block chain intelligent contract repairing method and device | |
RU2801825C2 (en) | Method, complex for processing information about failures of devices of wireless sensor networks for data transmission and related networks | |
CN115639972B (en) | Data migration method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20230728 |