Test result storage method, device and equipment and computer readable storage medium

CN119030891APending Publication Date: 2024-11-26SHENZHEN FENGRUNDA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410970535.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种测试结果保存方法、装置、设备及计算机可读存储介质,旨在解决如何自动化对测试结果进行保存的技术问题

Benefits of technology

[0037] An embodiment of the present application proposes a test result storage method that obtains communication messages, multicast addresses, and port numbers; obtains filtering information based on the communication messages, multicast addresses, and port numbers; and obtains tests based on the filtering information. and save the test results for automated testing. Compared with the existing technology, this application configures an internal gateway protocol to achieve network-wide interoperability. The obtained communication messages, multicast addresses and port numbers are used to send the messages to the switch, and the messages are filtered to obtain filtering information to check the characteristics of the switch. Table information and source multicast tree table, so as to conduct automated testing and record test results, use automated methods to efficiently test the SSM function of pim, simplify test equipment, improve economy, and do not require manual participation, improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030891A_ABST
    Figure CN119030891A_ABST
Patent Text Reader

Abstract

The invention discloses a test result storage method, device and equipment and a computer readable storage medium, relates to the technical field of automatic testing, and discloses the test result storage method, device and equipment and the computer readable storage medium, and the method comprises the steps: obtaining a communication message, a multicast address and a port number; obtaining filtering information based on the communication message, the multicast address and the port number; and obtaining a test result based on the filtering information, and storing the test result for automatic testing. According to the method, the internal gateway protocol is configured to realize whole network intercommunication, the message is sent to the switch through the obtained communication message, multicast address and port number, the message is filtered to obtain the filtering information, the switch feature table information and the source multicast tree table are checked, automatic testing is carried out, the testing result is recorded, and the testing efficiency is improved. The ssm function of the pim is efficiently tested in an automatic mode, test equipment is simplified, economical efficiency is improved, manual participation is not needed, and efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing technology, and in particular to a test result storage method, device, equipment and computer-readable storage medium. Background Art

[0002] With the progress of society, computers have developed by leaps and bounds, and automated testing technology has also been rapidly popularized. As the test result data increases, manual testing is no longer sufficient to handle large amounts of test data. Therefore, using automation to perform efficient testing is a must.

[0003] At present: the existing practice is to manually test the SSM mode of PIM, which requires at least two computers, and requires the use of routing protocols such as RIP / OSPF to open up the network, and then configure multicast. The process is cumbersome and inefficient. Therefore, how to automatically save the test results is a technical problem that needs to be solved urgently.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a test result storage method, device, equipment and computer-readable storage medium, aiming to solve the technical problem of how to automatically save the test results.

[0006] To achieve the above purpose, the present application proposes a method for storing test results, the method comprising:

[0007] Get communication messages, multicast addresses and port numbers;

[0008] Acquire filtering information based on the communication message, multicast address and port number;

[0009] The test results are obtained based on the filtering information, and the test results are saved for automated testing.

[0010] In one embodiment, the step of obtaining the communication message, the multicast address and the port number includes:

[0011] Acquire a group adding message and a general query message, and obtain a communication message based on the group adding message and the general query message;

[0012] The core switch address is obtained, and the multicast address and port number are obtained based on the core switch address.

[0013] In one embodiment, the step of obtaining filtering information based on the communication message, multicast address and port number includes:

[0014] Acquire first filtering information based on the group adding message, the multicast address and the port number;

[0015] Acquire second filtering information based on the general query message, the multicast address and the port number;

[0016] Filtering information is obtained based on the first filtering information and the second filtering information.

[0017] In one embodiment, the step of obtaining the test result based on the filtering information includes:

[0018] Checking the switch feature table based on the first filtering information to obtain a first checking result;

[0019] Check the source multicast tree table based on the second filtering information to obtain a second checking result;

[0020] A test result is obtained based on the first inspection result and the second inspection result.

[0021] In one embodiment, the step of checking the switch feature table based on the first filtering information to obtain a first checking result includes:

[0022] Acquire switch feature table information, wherein the switch feature table information includes neighbor information, routing table information, interface information, core switch representation information, and any-source multicast tree table information;

[0023] The first filtering information is matched with the switch feature table information to obtain a first checking result.

[0024] In one embodiment, the step of checking the source multicast tree table based on the second filtering information to obtain a second checking result includes:

[0025] The source multicast tree table information is obtained, where the source multicast tree table information includes a multicast source address and a multicast group address.

[0026] The second filtering information is matched with the source multicast tree table information to obtain a second checking result.

[0027] In one embodiment, the step of obtaining a test result based on the first inspection result and the second inspection result includes:

[0028] If the first inspection result is that the test passed and the second inspection result is that the test passed, the judgment result determines that the test passed;

[0029] Otherwise, the judgment result determines that the test fails.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a test result storage device, the test result storage device comprising:

[0031] The acquisition module 10 is used to acquire the communication message, multicast address and port number;

[0032] A determination module 20, configured to obtain filtering information based on the communication message, multicast address and port number;

[0033] The execution module 30 is used to obtain the test result based on the filtering information, and save the test result for automatic testing.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a test result saving device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the test result saving method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test result saving method described above are implemented.

[0036] One or more technical solutions proposed in this application have at least the following technical effects:

[0037] A test result saving method proposed in one embodiment of the present application obtains communication messages, multicast addresses and port numbers; obtains filtering information based on the communication messages, multicast addresses and port numbers; obtains test results based on the filtering information, and saves the test results for automated testing. Compared with the prior art, the present application configures an internal gateway protocol to achieve full network intercommunication, sends messages to switches through the acquired communication messages, multicast addresses and port numbers, filters the messages to obtain filtering information, checks the switch feature table information and the source multicast tree table, and thus performs automated testing and records the test results, uses automated methods to efficiently test the SSM function of PIM, simplifies test equipment, improves economy, and does not require manual participation, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1A flowchart of the first embodiment of the test result storage method of the present application is provided;

[0041] Figure 2 A flowchart of the second embodiment of the test result storage method of the present application is provided;

[0042] Figure 3 A schematic diagram of a process flow provided for Example 3 of the method for storing test results of this application;

[0043] Figure 4 A flowchart of the fourth embodiment of the method for storing test results of the present application is provided;

[0044] Figure 5 This is a schematic diagram of the module structure of the test result storage device of the embodiment of the present application;

[0045] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the test result saving method in the embodiment of the present application.

[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solution of the embodiment of the present application is: obtain communication messages, multicast addresses and port numbers; obtain filtering information based on the communication messages, multicast addresses and port numbers; obtain test results based on the filtering information, and save the test results for automated testing.

[0050] In this embodiment, for the convenience of description, the following description is made by taking the identification automation computer as the execution subject.

[0051] The existing technology is to manually test the SSM mode of PIM, which requires at least two computers, and needs to use routing protocols such as RIP / OSPF to open the network, and then configure multicast. The process is cumbersome and inefficient.

[0052] The present application provides a solution to obtain communication messages, multicast addresses and port numbers; obtain filtering information based on the communication messages, multicast addresses and port numbers; obtain test results based on the filtering information, and save the test results for automated testing.

[0053] It can be seen from the above embodiments that the present application configures the internal gateway protocol to achieve interoperability across the entire network, sends the message to the switch through the acquired communication message, multicast address and port number, filters the message to obtain the filtering information, checks the switch feature table information and the source multicast tree table, and thus performs automated testing and records the test results. An automated method is used to efficiently test the SSM function of the PIM, simplify the test equipment, improve economy, and eliminate the need for human intervention, thereby improving efficiency.

[0054] Based on this, the present application embodiment provides a test result storage method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the test result storage method of the present application.

[0055] In this embodiment, the test result saving method includes steps S10 to S30:

[0056] Step S10, obtaining communication message, multicast address and port number;

[0057] It should be noted that the communication messages include group adding messages and general query messages, reflecting the characteristics of the transmitted data.

[0058] It can be understood that a multicast address is a special IP address used to implement one-to-many or many-to-many data transmission in the network, allowing multiple receivers to simultaneously receive traffic from a single sender. The port number is used to specify which application or service should process the multicast traffic after it reaches the receiver host.

[0059] In addition, it should be noted that the system is developed in Python, and the modules used are paramiko, scapy, re, time, threading, and opennxl. The first network card and the second network card need to be connected to the switch respectively.

[0060] In one embodiment, in order to facilitate the acquisition of communication messages, multicast addresses and port numbers, a corresponding information collection device, such as an information collection module, can be pre-set to obtain the communication messages, multicast addresses and port numbers, and store the communication messages, multicast addresses and port numbers in a corresponding storage device, wherein the specific storage method is not limited as long as it can realize the storage of the communication messages, multicast addresses and port numbers, such as a storage module, a memory, etc.

[0061] During specific implementation, the information collection device is in a real-time working state or a scheduled working state, and obtains the communication message, multicast address and port number real-time or scheduled. If at a certain moment, the information collection device obtains the communication message, multicast address and port number, subsequent processing is performed based on the communication message, multicast address and port number.

[0062] For ease of understanding, the acquisition of the communication message, multicast address and port number is taken as an example for explanation, wherein the information collection device is an information collection module, and the storage device is a memory.

[0063] The first network card connects to the switch command line through the paramiko module, configures ospf to achieve full network interoperability, can receive multicast data from any source, sets the core switch address to the core router, and performs SSM mode address configuration, such as the SSM mode address configuration is 224.0.0.0 / 4. At this time, only multicast data from a specific source will be received. The information collection module uses the scapy module to construct the igmpv3 join group message, and uses the scapy module to manufacture the igmpv3 general query message. The general query message is sent by the multicast source. Based on the join group message and the general query message, a communication message is obtained, and the multicast address is obtained, such as the multicast address is 232.4.5.6. The port number is obtained, such as the port number is 1234. Subsequent processing is performed based on the communication message, multicast address and port number.

[0064] Step S20, obtaining filtering information based on the communication message, multicast address and port number;

[0065] It should be noted that the filtering information reflects the characteristics of screening the received data to meet the expected output data.

[0066] It can be understood that the communication message is first constructed using the scapy module, the communication message is sent by the first network card based on the multicast address and the port number, and the first network card obtains filtering information based on the communication message through the command line and the re module.

[0067] In one embodiment, in order to obtain filtering information based on the communication message, multicast address and port number, a processing device, such as a processing module, can be pre-set. The processing module will search and read the communication message, multicast address and port number, obtain filtering information based on the communication message, multicast address and port number, and perform subsequent processing based on the filtering information. The specific method of searching and reading is not limited, as long as it can achieve the acquisition of the communication message, multicast address and port number, such as a memory, a processor, etc.

[0068] In a specific implementation, the processing device is in a normally closed state. If at a certain moment, the processing device obtains the communication message, multicast address and port number, it obtains filtering information based on the communication message, multicast address and port number, and performs subsequent processing based on the filtering information.

[0069] For ease of understanding, obtaining filtering information is taken as an example for explanation, wherein the information collection device is an information collection module, the storage device is a memory, and the processing device is a processing module.

[0070] The first network card connects to the switch command line through the paramiko module, configures ospf to achieve full network interoperability, sets the core switch address to the core router, performs SSM mode address configuration, and the information collection module uses the scapy module to construct the igmpv3 join group message, obtains the multicast address, such as the multicast address is 232.4.5.6, obtains the port number, such as the port number is 1234, and sends the join group message by the first network card. The first filtering information is obtained through the command line and the re module filtering, and subsequent processing is performed based on the first filtering information.

[0071] Use the scapy module to create an igmpv3 general query message, including setting the message type to query, setting an appropriate query interval and query response interval, setting a multicast address as the target group for the query, and sending the constructed message through scapy. If a multicast source is detected on the third switch under test, it will forward the message to the core switch. After receiving the general query message, the third switch under test will decide whether to forward the message to the core switch based on its internal multicast routing table and multicast monitoring status. After receiving the message, the core switch will forward the message to the second switch under test based on its multicast routing table. The second switch under test will receive the message. The switch sends the general query message to the automated computer according to the (*,G) table. After receiving the message, the automated computer will check whether it is a member of the multicast group. If so, it will construct a join group message and initiate a join request to the multicast source. At this time, the switches along the way will automatically forward according to the multicast routing table. After receiving the join group message, the switches along the way will update their multicast routing tables according to the information in the message, update the (*,G) table item to the (S,G) table item, and automatically construct it through the multicast routing table. After constructing the join group message, the first network card filters through the command line and the re module to obtain the second filter information, and performs subsequent processing based on the second filter information.

[0072] Step S30, obtaining test results based on the filtering information, and saving the test results for automated testing.

[0073] It can be understood that if the test result is that the test passes, the opennxl module is used to write the information into Excel for storage; if the test result is that the test fails, the information is written as failed.

[0074] In one embodiment, in order to obtain the test results based on the filtering information and save the test results for automated testing, a corresponding execution device, such as an execution module, can be pre-set to query and obtain the test results. If the test result is that the test passes, the opennxl module is used to write the information into Excel for storage. If the test result is that the test fails, the information is written as failed to implement automated testing. The specific method of querying and obtaining is not limited as long as the test results can be obtained, such as a control module, an execution module, etc.

[0075] During the specific implementation, the execution device is in a normally closed state. If at a certain moment, the execution device obtains the test result, if the test result is that the test passes, the opennxl module is used to write the information into Excel for storage; if the test result is that the test fails, the failure is written to realize automated testing.

[0076] For ease of understanding, the example of obtaining a test result is used for explanation, wherein the information collection device is an information collection module, the storage device is a memory, and the execution device is an execution module.

[0077] The first network card connects to the switch command line through the paramiko module, configures ospf to achieve full network interoperability, sets the core switch address to the core router, performs SSM mode address configuration, and the information collection module obtains the communication message, multicast address and port number, obtains the first filtering information and the second filtering information based on the communication message, multicast address and port number, matches the first filtering information with the switch feature table to obtain the first inspection result, matches the second filtering information with the source multicast tree table to obtain the second inspection result, if the first inspection result is that the test passes and the second inspection result is that the test passes, the test result determines that the test passes, otherwise, the test result determines that the test fails, if the test result is that the test passes, the opennxl module is used to write the information into Excel for storage, and if the test result is that the test fails, write failure to achieve automated testing.

[0078] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later.

[0079] In this embodiment, the test result saving method includes steps S40 to S60: Figure 2 , Figure 2 This is a flow chart of the second embodiment of the test result storage method of the present application.

[0080] Step S40, checking the switch feature table based on the first filtering information to obtain a first checking result;

[0081] It should be noted that the first check result reflects the characteristics of the first filtering information and the switch feature table that are matched and checked.

[0082] In addition, it should be noted that the automation computer, the first tested switch, and the second tested switch will maintain the switch feature table until the real multicast source appears.

[0083] In one embodiment, in order to check the switch feature table based on the first filtering information and obtain a first inspection result, an inspection device, such as an inspection module, can be pre-set. The inspection module will search and read the first filtering information and the switch feature table, check the switch feature table based on the first filtering information, obtain the first inspection result, and perform subsequent processing based on the first inspection result. The specific method of searching and reading is not limited, as long as it can realize searching and reading the first filtering information and the switch feature table, such as a memory, a processor, etc.

[0084] In a specific implementation, the inspection device is in a normally closed state. If at a certain moment, the inspection device obtains the first filtering information and the switch feature table, checks the switch feature table based on the first filtering information, obtains a first inspection result, and performs subsequent processing based on the first inspection result.

[0085] For ease of understanding, obtaining the first inspection result is taken as an example for explanation, wherein the information collection device is the information collection module, the storage device is the memory, and the inspection device is the inspection module.

[0086] The first network card connects to the switch command line through the paramiko module, configures ospf to achieve full network interoperability, sets the core switch address to the core router, performs SSM mode address configuration, and the information collection module obtains the communication message, multicast address and port number, obtains the first filtering information based on the communication message, multicast address and port number, and the inspection module can check the neighbor information based on the first filtering information. The neighbor information is automatically generated after the pim is correctly configured, displays the neighbor information of the opposite end, checks the routing table information, and constructs the multicast routing table information according to the unicast routing table learned by the internal gateway protocol, and checks the interface information. The interface information identifies the local The interface status and address information of the device are checked, and the bsr information is checked. The bsr information is used to dynamically elect the core switch. At this time, the core switch is statically configured and there is no dynamic election. However, the appearance still needs to be checked for correctness. The (*, G) table information is checked. The (*, G) path is the shortest path from the automated computer to the core switch, which is automatically constructed through unicast routing. In the (*, G) table, * represents any source representing the core switch, and G identifies a specific multicast group. The current G is 232.4.5.6. If all matches are successful, the first check result is determined to be a test pass. Otherwise, the first check result is determined to be a test fail, and subsequent processing is performed based on the first check result.

[0087] Step S50, checking the source multicast tree table based on the second filtering information to obtain a second checking result;

[0088] It should be noted that the second check result reflects the feature of checking the second filtering information by matching the source multicast tree table.

[0089] In addition, it should be noted that after constructing the group adding message, the first network card filters through the command line and the re module to obtain the second filtering information, and checks whether there is an (S, G) representation on the first tested switch and the third tested switch, where S in the (S, G) table is the multicast source address of the multicast, which is currently the address of the second network card, and G is the multicast group address, and the current G is 232.4.5.6.

[0090] In one embodiment, in order to check the source multicast tree table based on the second filtering information and obtain a second inspection result, an inspection device, such as an inspection module, can be pre-set. The inspection module will search and read the second filtering information and the source multicast tree table, check the source multicast tree table based on the second filtering information, obtain the second inspection result, and perform subsequent processing based on the second inspection result. The specific method of searching and reading is not limited, as long as it can be achieved to search and read the second filtering information and the source multicast tree table, such as a memory, a processor, etc.

[0091] In specific implementation, the inspection device is in a normally closed state. If at a certain moment, the inspection device obtains the second filtering information and the source multicast tree table, checks the source multicast tree table based on the second filtering information, obtains the second inspection result, and performs subsequent processing based on the second inspection result.

[0092] For ease of understanding, obtaining the second inspection result is taken as an example for explanation, wherein the information collection device is the information collection module, the storage device is the memory, and the inspection device is the inspection module.

[0093] The first network card connects to the switch command line through the paramiko module, configures ospf to achieve full network interoperability, sets the core switch address to the core router, performs SSM mode address configuration, and the information collection module obtains the communication message, multicast address and port number. The second filtering information is obtained based on the communication message, multicast address and port number. The scapy module is used to create a general query message of igmpv3, including setting the message type to query, setting an appropriate query interval and query response interval, setting a multicast address as the target group for the query, and sending the constructed message through scapy. If a multicast source is detected on the third switch under test, it will forward the message to the core switch. After receiving the general query message, the third switch under test will decide whether to forward the message to the core switch based on its internal multicast routing table and multicast monitoring status. After receiving the message, the core switch will forward the message to the second switch under test based on its multicast routing table. The second switch under test will forward the message to the second switch under test based on its multicast routing table. According to the (*, G) table, the general query message is sent to the automated computer. After receiving the message, the automated computer will check whether it is a member of the multicast group. If so, it will construct a join group message and initiate a join request to the multicast source. At this time, the switches along the way will automatically forward according to the multicast routing table. After receiving the join group message, the switches along the way will update their multicast routing tables according to the information in the message, and update the (*, G) table item to the (S, G) table item. The multicast routing table is automatically constructed. After constructing the join group message, the first network card filters through the command line and the re module to obtain the second filtering information, and checks whether there are (S, G) appearances on the first tested switch and the third tested switch, wherein S in the (S, G) table is the multicast source address of the multicast, which is currently the address of the second network card, and G is the multicast group address, which is currently 232.4.5.6. If all matches are successful, the second check result is determined to be a test pass, otherwise, the second check result is determined to be a test fail, and subsequent processing is performed based on the second check result.

[0094] Step S60: obtaining a test result based on the first inspection result and the second inspection result.

[0095] It should be noted that the test result reflects the characteristics of the final result obtained by checking the switch feature table and the source multicast tree table.

[0096] In one embodiment, in order to obtain a test result based on the first inspection result and the second inspection result, a judgment device, such as a judgment module, can be pre-set. The judgment module will search and read the first inspection result and the second inspection result, obtain the test result based on the first inspection result and the second inspection result, and perform subsequent processing based on the test result. The specific method of searching and reading is not limited, as long as it can achieve searching and reading the first inspection result and the second inspection result, such as a memory, a processor, etc.

[0097] In a specific implementation, the inspection device is in a normally closed state. If at a certain moment, the inspection device obtains the first inspection result and the second inspection result, obtains a test result based on the first inspection result and the second inspection result, and performs subsequent processing based on the test result.

[0098] For ease of understanding, the example of obtaining test results is used for explanation, wherein the information collection device is the information collection module, the storage device is the memory, and the judgment device is the judgment module.

[0099] The information collection device obtains the first filtering information and the second filtering information and stores them in the memory. The judgment device matches the first filtering information with the switch feature table to obtain the first inspection result, matches the second filtering information with the source multicast tree table to obtain the second inspection result. If the first inspection result is that the test passes and the second inspection result is that the test passes, the test result determines that the test passes. Otherwise, the test result determines that the test fails. If the test result is that the test passes, the opennxl module is used to write the information into Excel for storage. If the test result is that the test fails, write failure to achieve automated testing.

[0100] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiments one and two can be referred to the above introduction and will not be repeated later.

[0101] In this embodiment, the test result saving method includes steps S70 to S80: Figure 3 , Figure 3 This is a flow chart of the third embodiment of the test result storage method of the present application.

[0102] Step S70, obtaining switch feature table information, wherein the switch feature table information includes neighbor information, routing table information, interface information, core switch representation information, and any-source multicast tree table information;

[0103] It should be noted that the switch feature table information reflects the features of the multicast configuration test.

[0104] In one embodiment, in order to facilitate the acquisition of switch feature table information, a corresponding information collection device, such as an information collection module, can be pre-set to obtain the switch feature table information, wherein the switch feature table information includes neighbor information, routing table information, interface information, core switch representation information, and any source multicast tree table information, and the switch feature table information is stored in a corresponding storage device, wherein the specific storage method is not limited as long as the switch feature table information can be stored, such as a storage module, a memory, etc.

[0105] During specific implementation, the information collection device is in a real-time working state or a scheduled working state, and obtains the switch feature table information real-timely or regularly. If at a certain moment, the information collection device obtains the switch feature table information, subsequent processing is performed based on the neighbor information, routing table information, interface information, core switch representation information and any source multicast tree table information in the switch feature table information.

[0106] For ease of understanding, the example of obtaining the switch feature table information is used for explanation, wherein the information collection device is an information collection module, and the storage device is a memory.

[0107] The information collection module obtains the switch feature table information and stores it in the memory, and performs subsequent processing based on the neighbor information, routing table information, interface information, core switch representation information and any-source multicast tree table information in the switch feature table information.

[0108] Step S80: Match the first filtering information with the switch feature table information to obtain a first inspection result.

[0109] It can be understood that based on the first filtering information, the neighbor information can be checked. The neighbor information is automatically generated by the pim after the correct configuration is completed. The neighbor information of the opposite end is displayed, the routing table information is checked, and the routing table information constructs the multicast routing table information according to the unicast routing table learned by the internal gateway protocol. The interface information is checked. The interface information identifies the interface status and address information of the interface itself. The bsr information is checked. The bsr information is used to dynamically elect the core switch. At this time, the core switch is statically configured and there is no dynamic election. However, the appearance still needs to be checked for correctness. Check the (*, G) table information. The (*, G) path is the shortest path from the automated computer to the core switch, which is automatically constructed through unicast routing. In the (*, G) table, * is an arbitrary source representing the core switch, and G identifies a specific multicast group. The current G is 232.4.5.6.

[0110] For ease of understanding, the example of obtaining switch feature table information is used for explanation, wherein the information collection device is the information collection module, the storage device is the memory, and the inspection device is the inspection module.

[0111] The information acquisition module obtains the switch feature table information and the first filtering information and stores them in the memory. The inspection module matches the first filtering information with the switch feature table information to obtain the first inspection result. The neighbor information is checked. The neighbor information is automatically generated after the pim is correctly configured. The opposite end neighbor information is displayed. The routing table information is checked. The routing table information constructs the multicast routing table information according to the unicast routing table learned by the internal gateway protocol. The interface information is checked. The interface information identifies the interface status and address information. The bsr information is checked. The bsr information is used to dynamically elect the core switch. At this time, the core switch is statically configured and there is no dynamic election. However, the appearance still needs to be checked for correctness. The (*, G) table information is checked. The (*, G) path is the shortest path from the automated computer to the core switch, which is automatically constructed through unicast routing. In the (*, G) table, * is an arbitrary source representing the core switch, and G identifies a specific multicast group. The current G is 232.4.5.6. If all matches are successful, the first inspection result is determined to be a test pass. Otherwise, the first inspection result is determined to be a test fail.

[0112] Based on the first to third embodiments of the present application, in the fourth embodiment of the present application, the same or similar contents as those of the above-mentioned embodiments one to three can be referred to the above introduction and will not be repeated later.

[0113] In this embodiment, the test result saving method includes steps S90 to S100: Figure 4 , Figure 4 This is a flow chart of the fourth embodiment of the test result storage method of the present application.

[0114] Step S90: Acquire source multicast tree table information, where the source multicast tree table information includes a multicast source address and a multicast group address.

[0115] It should be noted that the source multicast tree table information reflects the characteristics of performing a multicast response test.

[0116] In one embodiment, in order to facilitate the acquisition of source multicast tree table information, a corresponding information collection device, such as an information collection module, can be pre-set to obtain the source multicast tree table information, wherein the source multicast tree table information includes a multicast source address and a multicast group address, and the source multicast tree table information is stored in a corresponding storage device, wherein the specific storage method is not limited as long as the source multicast tree table information can be stored, such as a storage module, a memory, etc.

[0117] During specific implementation, the information collection device is in a real-time working state or a scheduled working state, and obtains the source multicast tree table information real-timely or regularly. If at a certain moment, the information collection device obtains the source multicast tree table information, subsequent processing is performed based on the multicast source address and multicast group address in the source multicast tree table information.

[0118] For ease of understanding, the acquisition of the source multicast tree table information is taken as an example for explanation, wherein the information collection device is an information collection module, and the storage device is a memory.

[0119] The information collection module obtains the source multicast tree table information and stores it in the memory, and performs subsequent processing based on the multicast source address and the multicast group address in the source multicast tree table information.

[0120] Step S100: Match the second filtering information with the source multicast tree table information to obtain a second checking result.

[0121] It can be understood that the use of the scapy module to create an igmpv3 general query message includes setting the message type to query, setting an appropriate query interval and query response interval, setting a multicast address as the target group for the query, and sending the constructed message through scapy. If a multicast source is detected on the third switch under test, it will forward the message to the core switch. After receiving the general query message, the third switch under test will decide whether to forward the message to the core switch based on its internal multicast routing table and multicast monitoring status. After receiving the message, the core switch will forward the message to the second switch under test according to its multicast routing table. The second switch under test will forward the general query message to the core switch according to the (*, G) table. The query message is sent to the automation computer. After receiving the message, the automation computer will check whether it is a member of the multicast group. If so, it will construct a join group message and initiate a join request to the multicast source. At this time, the switches along the way will automatically forward it according to the multicast routing table. After receiving the join group message, the switches along the way will update their multicast routing tables according to the information in the message, and update the (*, G) table entry to the (S, G) table entry, where S represents the IP address of the multicast source, and the (S, G) path is the shortest path from the automation computer to the multicast source, which is automatically constructed through the multicast routing table. The switch constructs the shortest path from the automation computer to the multicast source according to the updated (S, G) table to ensure that the multicast data packets can be transmitted efficiently.

[0122] For ease of understanding, obtaining the second inspection result is taken as an example for explanation, wherein the information collection device is the information collection module, the storage device is the memory, and the inspection device is the inspection module.

[0123] The information acquisition module obtains the source multicast tree table information and the second filtering information and stores them in the memory. The inspection module matches the second filtering information with the switch feature table information to obtain the second inspection result. The scapy module is used to create an igmpv3 general query message, including setting the message type to query, setting an appropriate query interval and query response interval, setting a multicast address as the target group for the query, and sending the constructed message through scapy. If a multicast source is detected on the third tested switch, it will forward the message to the core switch. After receiving the general query message, the third tested switch will decide whether to forward the message to the core switch according to its internal multicast routing table and multicast monitoring status. After receiving the message, the core switch will forward the message to the second tested switch according to its multicast routing table. The second tested switch sends the general query message according to the (*, G) table. To the automated computer, after receiving the message, the automated computer will check whether it is a member of the multicast group. If so, it will construct a join group message and initiate a join request to the multicast source. At this time, the switches along the way will automatically forward according to the multicast routing table. After receiving the join group message, the switches along the way will update their multicast routing tables according to the information in the message, and update the (*, G) table item to the (S, G) table item. It is automatically constructed through the multicast routing table. After constructing the join group message, the first network card filters through the command line and the re module to obtain the second filtering information, and checks whether there is an (S, G) representation on the first and third switches under test, where S in the (S, G) table is the multicast source address of the multicast, which is currently the address of the second network card, and G is the multicast group address. The current G is 232.4.5.6. If all matches are successful, the second check result is determined to be a test pass. Otherwise, the second check result is determined to be a test fail.

[0124] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for storing test results of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0125] This application also provides a test result storage device, please refer to Figure 5 , the test result storage device comprises:

[0126] The acquisition module 10 is used to acquire the communication message, multicast address and port number;

[0127] A determination module 20, configured to obtain filtering information based on the communication message, multicast address and port number;

[0128] The execution module 30 is used to obtain the test result based on the filtering information and save the test result.

[0129] The test result saving device provided by the present application adopts the test result saving method in the above-mentioned embodiment, which can solve the technical problem of how to automatically save the test results. Compared with the prior art, the beneficial effects of the test result saving device provided by the present application are the same as the beneficial effects of the test result saving method provided by the above-mentioned embodiment, and the other technical features in the test result saving device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0130] The present application provides a test result saving device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the test result saving method in the above-mentioned embodiment 1.

[0131] Reference below Figure 5 , which shows a schematic diagram of the structure of a test result storage device suitable for implementing the embodiment of the present application. The test result storage device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The test result storage device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0132] like Figure 6As shown, the test result saving device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the test result saving device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the test result storage device to communicate with other devices wirelessly or wired to exchange data. Although the test result storage device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0133] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0134] The test result saving device provided by the present application adopts the test result saving method in the above embodiment, which can solve the technical problem of how to automatically save the test results. Compared with the prior art, the beneficial effects of the test result saving device provided by the present application are the same as the beneficial effects of the test result saving method provided by the above embodiment, and the other technical features in the test result saving device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0135] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0136] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0137] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the test result saving method in the above-mentioned embodiment.

[0138] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0139] The computer-readable storage medium may be included in the test result storage device; or may exist independently without being assembled into the test result storage device.

[0140] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the test result saving device, the test result saving device: obtains communication messages, multicast addresses and port numbers; obtains filtering information based on the communication messages, multicast addresses and port numbers; obtains test results based on the filtering information, and saves the test results for automated testing.

[0141] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0142] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0143] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0144] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned test result saving method, and can solve the technical problem of how to automatically save the test results. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the test result saving method provided by the above-mentioned embodiment, and will not be repeated here.

[0145] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for storing test results, characterized in that: The method includes: Get communication messages, multicast addresses and port numbers; Acquire filtering information based on the communication message, multicast address and port number; The test results are obtained based on the filtering information, and the test results are saved for automated testing.

2. The method according to claim 1, characterized in that The step of obtaining the communication message, multicast address and port number comprises: Acquire a group adding message and a general query message, and obtain a communication message based on the group adding message and the general query message; The core switch address is obtained, and the multicast address and port number are obtained based on the core switch address.

3. The method according to claim 1, characterized in that The step of obtaining filtering information based on the communication message, multicast address and port number comprises: Acquire first filtering information based on the group adding message, the multicast address and the port number; Acquire second filtering information based on the general query message, the multicast address and the port number; Filtering information is obtained based on the first filtering information and the second filtering information.

4. The method according to claim 1, characterized in that The step of obtaining the test result based on the filtering information comprises: Checking the switch feature table based on the first filtering information to obtain a first checking result; Check the source multicast tree table based on the second filtering information to obtain a second checking result; A test result is obtained based on the first inspection result and the second inspection result.

5. The method according to claim 4, characterized in that The step of checking the switch feature table based on the first filtering information to obtain a first checking result comprises: Acquire switch feature table information, wherein the switch feature table information includes neighbor information, routing table information, interface information, core switch representation information, and any-source multicast tree table information; The first filtering information is matched with the switch feature table information to obtain a first checking result.

6. The method according to claim 4, characterized in that The step of checking the source multicast tree table based on the second filtering information to obtain a second checking result comprises: Acquire source multicast tree table information, wherein the source multicast tree table information includes a multicast source address and a multicast group address; The second filtering information is matched with the source multicast tree table information to obtain a second checking result.

7. The method according to claim 4, characterized in that The step of obtaining a test result based on the first inspection result and the second inspection result comprises: If the first inspection result is that the test passed and the second inspection result is that the test passed, the judgment result determines that the test passed; Otherwise, the judgment result determines that the test fails.

8. A test result storage device, characterized in that: The device comprises: An acquisition module is used to obtain communication messages, multicast addresses and port numbers; A judgment module, used for obtaining filtering information based on the communication message, multicast address and port number; The execution module is used to obtain the test results based on the filtering information and save the test results for automatic testing.

9. A test result storage device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the test result saving method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the test result saving method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and equipment for automatically configuring branch monitoring device and storage medium

    CN120528832A