CN114070752A - Test method, test device, electronic equipment and computer readable storage medium - Google Patents
Test method, test device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN114070752A CN114070752A CN202111365218.3A CN202111365218A CN114070752A CN 114070752 A CN114070752 A CN 114070752A CN 202111365218 A CN202111365218 A CN 202111365218A CN 114070752 A CN114070752 A CN 114070752A
- Authority
- CN
- China
- Prior art keywords
- data packet
- target node
- original data
- test result
- topology
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 142
- 238000010998 test method Methods 0.000 title claims description 6
- 238000000034 method Methods 0.000 claims abstract description 48
- 230000002159 abnormal effect Effects 0.000 claims abstract description 37
- 230000008569 process Effects 0.000 claims abstract description 21
- 230000035772 mutation Effects 0.000 claims description 40
- 238000012545 processing Methods 0.000 claims description 33
- 230000004044 response Effects 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 14
- 230000002547 anomalous effect Effects 0.000 claims 1
- 241000465502 Tobacco latent virus Species 0.000 description 26
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 8
- 230000006855 networking Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000005856 abnormality Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000005065 mining Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000009225 memory damage Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
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/04—Processing captured monitoring data, e.g. for logfile generation
-
- 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/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
-
- 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/12—Discovery or management of network topologies
-
- 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/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Environmental & Geological Engineering (AREA)
- Data Mining & Analysis (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure provides a testing method, a testing device, electronic equipment and a computer-readable storage medium, and relates to the technical field of computers, in particular to the technical field of automatic testing. The specific implementation scheme is as follows: sending the variant data packet to a target node, and enabling the target node to process the variant data packet; the test result is determined by sending a topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a testing method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
In the prior art, the running state of the device to be tested is generally detected by serial port detection or by sending an Internet Packet explorer (ping) Packet to the device to be tested, so as to realize anomaly monitoring.
However, in some scenarios, the test task is not executed by the independently arranged device under test, which results in that the abnormal monitoring in the test process cannot be performed by the conventional serial port detection or the way of sending ping packets to the device under test, and thus the automatic test cannot be normally realized.
Disclosure of Invention
In order to solve at least one of the above-mentioned drawbacks, the present disclosure provides a testing method, an apparatus, an electronic device, and a computer-readable storage medium.
According to a first aspect of the present disclosure, there is provided a test method, the method comprising:
sending the variant data packet to a target node, and enabling the target node to process the variant data packet;
the test result is determined by sending a topology query message to the target node.
According to a second aspect of the present disclosure, there is provided a test apparatus, the apparatus comprising:
the variant data sending module is used for sending the variant data packet to a target node so that the target node processes the variant data packet;
and the test result determining module is used for determining a test result by sending the topology query message to the target node.
According to a third aspect of the present disclosure, there is provided an electronic apparatus comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test method.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to execute the above-described test method.
According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the above-described testing method.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow chart of a testing method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of a test system provided by an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram of another testing method provided by the embodiments of the present disclosure;
FIG. 4 is a schematic structural diagram of a testing device provided in accordance with the present disclosure;
FIG. 5 is a schematic structural diagram of another testing device provided in accordance with the present disclosure;
FIG. 6 is a block diagram of an electronic device used to implement the testing method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Easy network (Easy Mesh) is a networking authentication object for a plurality of wireless devices, which is proposed by the wireless fidelity (WiFi) alliance, and a plurality of wireless access points supporting the standard can construct a multi-node and wide-coverage wireless local area network.
Because Easy Mesh is an emerging technology, no vulnerability mining tool and method aiming at Easy Mesh exists at present.
A data Packet in the Easy Mesh network control stage is generally processed by one network node in the Mesh networking, and the network node in the Mesh networking may not be a specific device, but one device may also include a plurality of network nodes, so that when an automatic test is performed, the running state of the network node cannot be detected in a traditional serial port detection or Internet Packet explorer (ping) Packet sending mode, and abnormal monitoring during the test cannot be realized, so that the automatic test cannot be normally realized.
The embodiment of the application provides a testing method, a testing device, an electronic device and a computer-readable storage medium, which aim to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a schematic flowchart of a testing method provided by an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes:
step S110: sending the variant data packet to a target node, and enabling the target node to process the variant data packet;
step S120: the test result is determined by sending a topology query message to the target node.
The variant packet is a packet for fuzz testing after variant processing, and may be, for example, a packet in an Easy Mesh network control stage after variant processing.
The target node is configured to process the variant data packet after receiving the variant data packet, and the target node may not be a specific device but be a logical entity, which may be separately deployed in a device or may be deployed in a device together with other target nodes. As an example, the target node may be a network node in a Mesh networking.
The topology query message is used for querying the topology information of the target node.
In the embodiment of the disclosure, the operation state of the target node can be determined by sending the topology query message to the target node, and the operation state of the target node can reflect the test result.
According to the method provided by the embodiment of the disclosure, the variant data packet is sent to the target node, so that the target node processes the variant data packet, and the test result is determined by sending the topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
In an optional mode of the present disclosure, determining a test result by sending a topology query message to a target node includes:
sending a topology query message to a target node;
if receiving topology response information returned by the target node based on the topology query message, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
In the embodiment of the present disclosure, the operation state of the target node may be normal operation or abnormal. When the target node normally operates, if the topology query message is received, the target node immediately responds and returns topology response information, wherein the topology response information contains the topology information of the target node. When the target node is in an abnormal state and cannot normally operate, if the topology query message is received, the response cannot be performed, and the topology response information cannot be returned.
In the embodiment of the disclosure, the running state of the target node can be judged by whether the topology response information returned by the target node is received or not, when the running state of the target node is abnormal, it can be considered that the variant data packet is processed so that the target node cannot work normally, and at this time, the test result can be determined to be abnormal, so that the effective monitoring of the abnormality generated in the test is realized.
In the embodiment of the present disclosure, after each variant data packet is sent, a topology query message may be sent to the target node to determine a test result for the variant data packet.
As an example, the Topology Query Message may be a "Topology Query Message" in EasyMesh for querying another network node for Topology information. The Topology response Message may be a "Topology response Message" in Easy Mesh, for returning Topology information after receiving the "Topology Query Message". Therefore, the abnormal test monitoring of the automatic fuzzy test in the Easy Mesh network control stage is realized.
In an optional mode of the present disclosure, the method further includes:
and carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
In the embodiment of the present disclosure, the data packet collected under the actual working condition may be used as the original data packet, for example, the data packet may be a data packet of a real Easy Mesh network control stage.
In an optional manner of the present disclosure, the original data packet is a data packet in a Type-Length-Value (Type, Length, Value, TLV) format, and the original data packet acquired in advance is subjected to mutation processing based on a preconfigured mutation policy, where the method includes any one of the following steps:
modifying the value of a Length field in the original data packet;
and modifying a TLV group in the original data packet, wherein the TLV group consists of a Type (Type) field, a Length field and a Value (Value) field.
The data packet in the network control phase of Easy Mesh is based on the Institute of Electrical and Electronics Engineers (IEEE) 1905.1a protocol, in which the data format of the data packet is defined as TLV, wherein the Length field defines the Length of the Value, and the Value field represents the actual Value.
In the embodiment of the present disclosure, the mutation policy may include modifying a Value of a Length field in the original data packet, modifying the Length field to an abnormal Value inconsistent with a Value field, and possibly triggering some memory corruption vulnerabilities in a TLV parsing process.
As an example, modifying the value of the Length field in the original data packet includes:
and modifying the value of the Length field in the original data packet to ensure that the modified value of the Length field is greater than a first preset value or smaller than a second preset value, wherein the first preset value is greater than the second preset value.
The first preset value can be set to be a larger value, the second preset value can be set to be a smaller value, and the value of the Length field is modified, so that the variant value obtained after the variation is too large or too small, the problem of out-of-bounds reading or integer overflow and the like can be caused when the value of the Length field is too small, and the problem of out-of-bounds writing and the like can be caused when the value of the Length field is too large.
In the embodiment of the present disclosure, the mutation policy may also include modifying the TLV group in the original data packet. A triplet of a Type field, a Length field, and a Value field included in one TLV data may be determined as a TLV group. Modification of the TLV set may result in a logical breach related to memory corruption, such as Double-Free (Double-Free), Use-After-release (Use-After-Free), and the like.
As an example, the set of TLVs in the original data packet is modified, including any of:
adding TLV groups in the original data packet;
deleting TLV groups in the original data packet;
the TLV groups in the original data packet are modified.
In the embodiment of the present disclosure, the TLV groups in the original data packet are added, and a mode of copying the original TLV groups in the original data packet may be adopted. And modifying the TLV group in the original data packet, namely correspondingly modifying the Type field, the Length field and the Value field.
In the embodiment of the disclosure, the variant data packet obtained after the variant processing based on the variant strategy is subjected to the fuzzy test, which can cover most problems in TLV analysis.
In an optional manner of the present disclosure, after determining that the test result is abnormal, the method further includes:
and storing the corresponding variant data packet when the test result is abnormal.
In the embodiment of the present disclosure, after it is determined that there is an anomaly in the test, the variant data packet causing the anomaly may be stored, so as to facilitate subsequent analysis to determine a vulnerability.
In the embodiment of the present disclosure, after the test for one variant data packet is completed, if the test result is normal, the test for the next variant data packet may be performed; if the test result is abnormal, the variant data packet causing the abnormality can be stored, and then the target node is restarted.
The scheme provided by the embodiment of the disclosure can be applied to automatic fuzzy test in the control stage of the Easy Mesh network, and vulnerability mining aiming at Easy Mesh is realized. The method does not need manual intervention, can automatically cover all protocol fields of the network control stage of the easy mesh, and cover all memory damage scenes caused by TLV analysis, and has higher test efficiency.
As an example, fig. 2 shows a schematic structural diagram of a test system provided by an embodiment of the present disclosure.
As shown in fig. 2, the IEEE1905.1a network controls raw data input for acquiring pre-collected raw data packets as input data for the test system.
And performing TLV mutation, namely performing mutation processing on the original data packet based on the mutation strategy to obtain a mutated data packet.
And the IEEE1905.1a packet sender is used for sending the variant data packet to the target node for fuzzing test.
Ieee1905.1a crash (crash) monitoring for anomalies under test.
Ieee1905.1a crash Log (crash Log) for logging anomalies under test.
Fig. 3 shows a schematic flowchart of another testing method provided in the embodiment of the present disclosure, and as shown in fig. 3, the method mainly includes:
step S310: carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet;
step S320: sending the variant data packet to a target node, and enabling the target node to process the variant data packet;
step S330: sending a topology query message to a target node;
step S340: if receiving topology response information returned by the target node based on the topology query message, determining that the test result is normal; and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
The data packet collected under the actual working condition may be used as an original data packet, for example, the data packet may be a data packet in a control phase of a real Easy Mesh network.
The variant packet is a variant packet used for fuzz testing, and may be, for example, a variant packet in Easy Mesh network control stage.
The target node is configured to process the variant data packet after receiving the variant data packet, and the target node may not be a specific device but be a logical entity, which may be separately deployed in a device or may be deployed in a device together with other target nodes. As an example, the target node may be a network node in a Mesh networking.
The topology query message is used for querying the topology information of the target node.
In the embodiment of the disclosure, the operation state of the target node can be determined by sending the topology query message to the target node, and the operation state of the target node can reflect the test result.
In the embodiment of the present disclosure, the operation state of the target node may be normal operation or abnormal. When the target node normally operates, if the topology query message is received, the target node immediately responds and returns topology response information, wherein the topology response information contains the topology information of the target node. When the target node is in an abnormal state and cannot normally operate, if the topology query message is received, the response cannot be performed, and the topology response information cannot be returned.
In the embodiment of the disclosure, the running state of the target node can be judged by whether the topology response information returned by the target node is received or not, when the running state of the target node is abnormal, it can be considered that the variant data packet is processed so that the target node cannot work normally, and at this time, the test result can be determined to be abnormal, so that the effective monitoring of the abnormality generated in the test is realized.
In the embodiment of the present disclosure, after each variant data packet is sent, a topology query message may be sent to the target node to determine a test result for the variant data packet.
As an example, the Topology Query Message may be a "Topology Query Message" in Easy Mesh for querying another network node for Topology information. The Topology response Message may be a "Topology response Message" in Easy Mesh, for returning Topology information after receiving the "Topology Query Message". Therefore, the abnormal test monitoring of the automatic fuzzy test in the Easy Mesh network control stage is realized.
The method provided by the disclosure comprises the steps of carrying out mutation processing on a pre-collected original data packet to obtain a variable data packet, sending the variable data packet to a target node, enabling the target node to process the variable data packet, sending a topology query message to the target node, and determining that a test result is normal if topology response information returned by the target node based on the topology query message is received; and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
Based on the same principle as the method shown in fig. 1, fig. 4 shows a schematic structural diagram of a testing apparatus provided by an embodiment of the present disclosure, and as shown in fig. 4, the testing apparatus 40 may include:
a variant data sending module 410, configured to send the variant data packet to a target node, so that the target node processes the variant data packet;
and a test result determining module 420, configured to determine a test result by sending the topology query message to the target node.
According to the device provided by the disclosure, the variant data packet is sent to the target node, so that the target node processes the variant data packet, and the test result is determined by sending the topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
Optionally, the test result determining module is specifically configured to:
sending a topology query message to a target node;
if receiving topology response information returned by the target node based on the topology query message, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
Optionally, the apparatus further comprises:
and the mutation processing module is used for carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
Optionally, the original data packet is a data packet in a TLV format, and the mutation processing module is specifically configured to any one of the following items when performing mutation processing on the pre-acquired original data packet based on a preconfigured mutation policy:
modifying the value of a Length field in an original data packet;
and modifying a TLV group in the original data packet, wherein the TLV group is composed of a Type field, a Length field and a Value field.
Optionally, when modifying the value of the Length field in the original data packet, the mutation processing module is specifically configured to:
and modifying the value of the Length field in the original data packet to ensure that the modified value of the Length field is greater than a first preset value or smaller than a second preset value, wherein the first preset value is greater than the second preset value.
Optionally, when modifying the TLV group in the original data packet, the mutation processing module is specifically configured to:
adding TLV groups in the original data packet;
deleting TLV groups in the original data packet;
the TLV groups in the original data packet are modified.
Optionally, the apparatus further comprises:
and the exception recording module is used for storing the variant data packet corresponding to the abnormal test result after determining that the test result is abnormal.
It is understood that the above modules of the testing device in the embodiment of the present disclosure have functions of implementing the corresponding steps of the testing method in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the testing method in the embodiment shown in fig. 1, and details are not repeated here.
Based on the same principle as the method shown in fig. 3, fig. 5 shows a schematic structural diagram of another testing apparatus provided by the embodiment of the present disclosure, and as shown in fig. 5, the testing apparatus 50 may include:
a mutation processing module 510, configured to perform mutation processing on a pre-acquired original data packet based on a preconfigured mutation policy to obtain a mutated data packet;
a variant data sending module 520, configured to send the variant data packet to the target node, so that the target node processes the variant data packet;
a topology query message sending module 530, configured to send a topology query message to a target node;
the test result determining module 540 is configured to determine that the test result is normal when receiving topology response information returned by the target node based on the topology query message; and when the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
The device provided by the disclosure obtains a variant data packet by carrying out variant processing on a pre-collected original data packet, sends the variant data packet to a target node, enables the target node to process the variant data packet, sends a topology query message to the target node, and determines that a test result is normal if topology response information returned by the target node based on the topology query message is received; and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
It is understood that the above modules of the testing device in the embodiment of the present disclosure have functions of implementing the corresponding steps of the testing method in the embodiment shown in fig. 3. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the testing method in the embodiment shown in fig. 3, and details are not repeated here.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the testing method as provided by the embodiments of the present disclosure.
Compared with the prior art, the electronic equipment has the advantages that the variant data packet is sent to the target node, so that the target node processes the variant data packet, and the test result is determined by sending the topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the test processing method provided by the embodiments of the present disclosure.
Compared with the prior art, the readable storage medium enables the target node to process the variant data packet by sending the variant data packet to the target node, and determines the test result by sending the topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
The computer program product, comprising a computer program which, when executed by a processor, implements a testing method as provided by embodiments of the present disclosure.
Compared with the prior art, the computer program product enables the target node to process the variant data packet by sending the variant data packet to the target node, and determines the test result by sending the topology query message to the target node. According to the scheme, the operation state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operation state of the target node, the abnormal condition generated in the test is effectively monitored, and the normal realization of the automatic test is ensured.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the device 600 includes a computing unit 610 that may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)620 or a computer program loaded from a storage unit 680 into a Random Access Memory (RAM) 630. In the RAM 630, various programs and data required for the operation of the device 600 can also be stored. The computing unit 610, the ROM 620, and the RAM 630 are connected to each other by a bus 640. An input/output (I/O) interface 650 is also connected to bus 640.
Various components in device 600 are connected to I/O interface 650, including: an input unit 660 such as a keyboard, a mouse, etc.; an output unit 670 such as various types of displays, speakers, and the like; a storage unit 680, such as a magnetic disk, optical disk, or the like; and a communication unit 690 such as a network card, modem, wireless communication transceiver, etc. The communication unit 690 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (17)
1. A method of testing, comprising:
sending the variant data packet to a target node, and enabling the target node to process the variant data packet;
and determining a test result by sending a topology query message to the target node.
2. The method of claim 1, wherein said determining test results by sending topology query messages to the target node comprises:
sending a topology query message to the target node;
if receiving topology response information returned by the target node based on the topology query message, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
3. The method of claim 1 or 2, further comprising:
and carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
4. The method according to claim 3, wherein the original data packet is a type-length-value TLV format data packet, and the mutating the pre-acquired original data packet based on the preconfigured mutation policy includes any one of:
modifying the value of the Length field in the original data packet;
and modifying a TLV group in the original data packet, wherein the TLV group consists of a Type field, a Length field and a Value field.
5. The method of claim 4, wherein the modifying the value of the Length field in the original data packet comprises:
and modifying the numerical value of the Length field in the original data packet to enable the modified numerical value of the Length field to be larger than a first preset value or smaller than a second preset value, wherein the first preset value is larger than the second preset value.
6. The method according to claim 4 or 5, wherein the modifying the TLV group in the original data packet comprises any one of:
adding TLV groups in the original data packet;
deleting the TLV groups in the original data packet;
and modifying the TLV group in the original data packet.
7. The method of any of claims 2-6, after determining that the test result is anomalous, the method further comprising:
and storing the corresponding variant data packet when the test result is abnormal.
8. A test apparatus, comprising:
the variant data sending module is used for sending the variant data packet to a target node so that the target node processes the variant data packet;
and the test result determining module is used for determining a test result by sending the topology query message to the target node.
9. The apparatus of claim 8, wherein the test result determination module is specifically configured to:
sending a topology query message to the target node;
if receiving topology response information returned by the target node based on the topology query message, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
10. The apparatus of claim 8 or 9, further comprising:
and the mutation processing module is used for carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
11. The apparatus according to claim 10, wherein the raw data packet is a TLV format data packet, and the mutation processing module is specifically configured to perform mutation processing on the pre-collected raw data packet based on a preconfigured mutation policy, where the mutation processing is performed on any one of the following:
modifying the value of a Length field in the original data packet;
and modifying a TLV group in the original data packet, wherein the TLV group consists of a Type field, a Length field and a Value field.
12. The apparatus according to claim 11, wherein the mutation processing module, when modifying the value of the Length field in the original data packet, is specifically configured to:
and modifying the numerical value of the Length field in the original data packet to enable the modified numerical value of the Length field to be larger than a first preset value or smaller than a second preset value, wherein the first preset value is larger than the second preset value.
13. The apparatus according to claim 11 or 12, wherein the mutation processing module, when modifying the TLV group in the original data packet, is specifically configured to any one of:
adding TLV groups in the original data packet;
deleting the TLV groups in the original data packet;
and modifying the TLV group in the original data packet.
14. The apparatus of any of claims 9-13, further comprising:
and the exception recording module is used for storing the variant data packet corresponding to the abnormal test result after determining that the test result is abnormal.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111365218.3A CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111365218.3A CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114070752A true CN114070752A (en) | 2022-02-18 |
CN114070752B CN114070752B (en) | 2023-09-12 |
Family
ID=80277607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111365218.3A Active CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114070752B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114928482A (en) * | 2022-05-13 | 2022-08-19 | 北京百度网讯科技有限公司 | Method and device for testing network communication function of software |
CN114978644A (en) * | 2022-05-13 | 2022-08-30 | 北京百度网讯科技有限公司 | Method and device for testing distribution network function of software |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130250810A1 (en) * | 2011-08-30 | 2013-09-26 | Qualcomm Incorporated | Topology discovery in a hybrid network |
CN108337266A (en) * | 2018-03-07 | 2018-07-27 | 中国科学院信息工程研究所 | A kind of efficient protocol client vulnerability mining method and system |
CN112217680A (en) * | 2020-10-19 | 2021-01-12 | 中国信息通信研究院 | Controller capability benchmark test method and device based on software-defined wide area network |
CN113507436A (en) * | 2021-06-02 | 2021-10-15 | 中国人民解放军63880部队 | Power grid embedded terminal fuzzy test method aiming at GOOSE protocol |
-
2021
- 2021-11-17 CN CN202111365218.3A patent/CN114070752B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130250810A1 (en) * | 2011-08-30 | 2013-09-26 | Qualcomm Incorporated | Topology discovery in a hybrid network |
CN108337266A (en) * | 2018-03-07 | 2018-07-27 | 中国科学院信息工程研究所 | A kind of efficient protocol client vulnerability mining method and system |
CN112217680A (en) * | 2020-10-19 | 2021-01-12 | 中国信息通信研究院 | Controller capability benchmark test method and device based on software-defined wide area network |
CN113507436A (en) * | 2021-06-02 | 2021-10-15 | 中国人民解放军63880部队 | Power grid embedded terminal fuzzy test method aiming at GOOSE protocol |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114928482A (en) * | 2022-05-13 | 2022-08-19 | 北京百度网讯科技有限公司 | Method and device for testing network communication function of software |
CN114978644A (en) * | 2022-05-13 | 2022-08-30 | 北京百度网讯科技有限公司 | Method and device for testing distribution network function of software |
Also Published As
Publication number | Publication date |
---|---|
CN114070752B (en) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114070752B (en) | Test method, test device, electronic equipment and computer readable storage medium | |
US10831630B2 (en) | Fault analysis method and apparatus based on data center | |
EP4024765A1 (en) | Method and apparatus for extracting fault propagation condition, and storage medium | |
CN114024884B (en) | Test method, test device, electronic equipment and storage medium | |
US9641595B2 (en) | System management apparatus, system management method, and storage medium | |
JP2017069895A (en) | Fault separation method and administrative server for performing fault separation | |
CN113656252B (en) | Fault positioning method, device, electronic equipment and storage medium | |
CN113312560B (en) | Group detection method and device and electronic equipment | |
CN110955604A (en) | Information display method, device, server and storage medium | |
CN114598506A (en) | Industrial control network security risk tracing method and device, electronic equipment and storage medium | |
CN113641388A (en) | Cloud mobile phone updating method, related device and computer program product | |
CN113965514A (en) | Link construction and display method and device and electronic equipment | |
CN118170617B (en) | Cluster anomaly detection method and device, electronic equipment and storage medium | |
CN114567536B (en) | Abnormal data processing method, device, electronic equipment and storage medium | |
CN117499161B (en) | Network security testing method and device, electronic equipment and storage medium | |
CN117424850B (en) | Abnormal link aggregation method, query method, device, equipment and medium | |
CN116418600B (en) | Node security operation and maintenance method, device, equipment and storage medium | |
CN116541833A (en) | Processing method, device and storage medium for network malicious model | |
CN116909757B (en) | Cluster management control system, method, electronic device and storage medium | |
EP4277223A1 (en) | Data processing method, apparatus and system, and storage medium | |
CN117319252A (en) | Network quality detection result display method, device, equipment and storage medium | |
CN118118389A (en) | Link detection method, device and system, electronic equipment and storage medium | |
CN117931369A (en) | Method and device for processing abnormal pod based on Kubernetes, electronic equipment and storage medium | |
CN117459373A (en) | Network diagnosis method, device and storage medium | |
CN117527547A (en) | Fault node detection 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |