CN114430385A - Network equipment detection method and device and electronic equipment - Google Patents

Network equipment detection method and device and electronic equipment Download PDF

Info

Publication number
CN114430385A
CN114430385A CN202210050294.3A CN202210050294A CN114430385A CN 114430385 A CN114430385 A CN 114430385A CN 202210050294 A CN202210050294 A CN 202210050294A CN 114430385 A CN114430385 A CN 114430385A
Authority
CN
China
Prior art keywords
network
network equipment
tested
networking scene
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210050294.3A
Other languages
Chinese (zh)
Inventor
陈小龙
高字弘
吴锦坤
叶利福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202210050294.3A priority Critical patent/CN114430385A/en
Publication of CN114430385A publication Critical patent/CN114430385A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The embodiment of the application provides a detection method and device of network equipment and electronic equipment, relates to the technical field of data communication testing, and aims to solve the problems of high testing cost and low testing efficiency in the prior art. In the method, description information of a real networking scene is obtained, wherein the description information comprises equipment information of at least two network equipment in the real networking scene; determining a network device under test from the at least two network devices; constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment; constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices; and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.

Description

Network equipment detection method and device and electronic equipment
Technical Field
The present disclosure relates to the field of data communication testing technologies, and in particular, to a method and an apparatus for detecting a network device, and an electronic device.
Background
Because thousands of network devices usually operate in the data center at the same time, a networking scene is difficult to set up when the network devices are tested. Secondly, the existing device virtualization technologies such as Remote Direct Memory Access (RDMA) and virtualization cluster traffic are complex and difficult to implement. And the detection using a commercial tester is very costly.
Taking network equipment as an example, when the white box switch ecological test is performed, because the needed physical equipment is numerous, it is difficult to actually set up a real networking scene for testing. Fig. 1 is a schematic diagram of a laboratory network for testing a switch in the prior art. In the laboratory network 100, a Cloud computing open network operating System (SONiC) test bed 101, a fan-out switch 102, and a switch under test 103 are included. The SONiC test bed 101 is first deployed in the server, and then the tested switch 103 is tested by broadcasting data through the fan-out switch 102. The fan-out switch and the tested switch are both physical devices.
Because thousands of network devices can normally run simultaneously in a real networking scene, in order to detect whether the tested network device can be applied to the real networking scene, the real networking scene needs to be rebuilt usually, and then the network device is tested in the scene, so that the problems that in the prior art, a large amount of physical devices are needed for testing, the cost is high, and the testing efficiency is low due to the complex deployment of the physical devices exist.
Disclosure of Invention
The embodiment of the application provides a detection method and device of network equipment and electronic equipment, and aims to solve the problems that in the prior art, cost is high due to the fact that a large number of physical equipment are used, and testing efficiency is low due to the fact that physical equipment is complex to deploy.
In a first aspect, an embodiment of the present application provides a method for detecting a network device, where the method is applied to a server, and the method includes: acquiring description information of a real networking scene, wherein the description information comprises device information of at least two network devices in the real networking scene; determining a network device under test from the at least two network devices; constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment; constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices; and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
Based on the scheme, the network equipment is virtualized, namely, the mirror image of the network equipment is constructed, the mirror image is used for constructing a mode of simulating a networking scene, and the detection of the network equipment to be detected is completed, so that the problems that in the prior art, the networking scene is constructed by a large amount of physical equipment, the cost is high, and the problem that the testing efficiency is low due to the complex deployment of the physical equipment is solved.
In a possible implementation manner, the constructing the mirror image of the other network device except the network device under test in the at least two network devices specifically includes: acquiring a network service program set of each other network device except the network device to be tested in the at least two network devices; and constructing the mirror images of the other network devices based on the network service program sets of the other network devices.
Based on the scheme, the mirror images of other network equipment except the network equipment to be detected are constructed through the network service program sets of other network equipment except the network equipment to be detected, so that the number of physical equipment applied in detection can be greatly reduced, the cost is reduced, and the detection efficiency is improved.
In a possible implementation manner, the detecting the network device under test according to a pre-stored test case set in the simulated networking scenario to obtain an application result of the network device under test in the simulated networking scenario specifically includes: testing the network equipment to be tested according to each test case in the test case set in the simulation networking scene; determining whether the proportion of the first number of the test cases with the passed test result to the second number of the test cases included in the test case set is smaller than a preset threshold value or not; if the proportion is determined to be larger than or equal to the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is applicable to the simulated networking scene; and if the proportion is smaller than the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
Because the tested network equipment can not be used in a real networking scene through the test of all test cases, based on the scheme, whether the network equipment can run under the real networking scene to complete the corresponding network service or not can be detected according to the actual situation by setting the preset threshold value, and the detection accuracy of the tested network equipment can be improved.
In a possible implementation manner, obtaining the test case with the test result of the test case set as a failed test case; and generating a detection report of the tested network equipment for the failed test case based on the test result.
Based on the scheme, the problems of the tested network equipment can be found by generating the test report, and the tested network equipment is timely reconfigured by analyzing the reason of failing to pass the test case. And according to the test report, the detection of the tested network equipment can be realized, and the constructed simulation networking scene can be tested, so that the scene can be corrected in time, and the tested network equipment can be better detected.
In a possible implementation manner, if the mirror image of each of the other network devices includes an SCD (Switch Chip Driver Application Programming Interface), the method further includes: acquiring the characteristics of the chip of the corresponding network equipment according to the SCD API included in the mirror image of each other network equipment; and simulating the corresponding chip of the network equipment according to the characteristics of the chip of each network equipment.
Based on the above scheme, the SCD API can shield the difference of Software Development Kit (SDK) between different chip manufacturers, so that Software and hardware decoupling of the network device can be realized through the SCD API. The chip characteristics of the network equipment are obtained through the SCD API, so that the chip is simulated, and the problem of difficulty in chip simulation can be solved.
In a possible implementation manner, a test case of each network level is determined according to the description information, and each network level comprises an access layer, a convergence layer and a core layer; and detecting the tested network equipment in the simulated networking scene according to the test cases of all network levels to obtain the application result of the tested network equipment in the simulated networking scene.
Based on the scheme, the test case of each network level is determined according to the description information of the real networking scene, so that the test on the tested network equipment can be grounded. That is to say, the detection of the corresponding network service of the tested network equipment can be realized by setting each test case, so that the tested network equipment can be better tested.
In a second aspect, an embodiment of the present application provides a detection apparatus for a network device, including: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring description information of a real networking scene, and the description information comprises device information of at least two network devices in the real networking scene; a processing unit, configured to determine a network device under test from the at least two network devices; constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment; constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices; and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
In a possible implementation manner, when the processing unit is configured to construct an image of another network device of the at least two network devices except the network device under test, the processing unit is specifically configured to: acquiring a network service program set of each other network device except the network device to be tested in the at least two network devices; and constructing the mirror images of the other network devices based on the network service program sets of the other network devices.
In a possible implementation manner, the processing unit is configured to detect the network device under test according to a pre-stored test case set in the simulated networking scenario, and when an application result of the network device under test in the simulated networking scenario is obtained, specifically configured to: testing the network equipment to be tested according to each test case in the test case set in the simulation networking scene; determining whether the proportion of the first number of the test cases with the passed test result to the second number of the test cases included in the test case set is smaller than a preset threshold value or not; if the ratio is determined to be greater than or equal to the preset threshold, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment can be applied to the simulated networking scene; and if the proportion is smaller than the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
In a possible implementation manner, the processing unit is further configured to obtain a test case in which the test result in the test case set is a failed test case; and generating a detection report of the tested network equipment for the failed test case based on the test result.
In a possible implementation manner, if the image of each other network device includes an SCD API, the processing unit is further configured to: acquiring the characteristics of the chip of the corresponding network equipment according to the SCD API included in the mirror image of each other network equipment; and simulating the corresponding chip of the network equipment according to the characteristics of the chip of each network equipment.
In one possible implementation, the processing unit is further configured to: determining test cases of each network level according to the description information; each network hierarchy comprises an access layer, a convergence layer and a core layer; and detecting the tested network equipment in the simulated networking scene according to the test cases of all network levels to obtain the application result of the tested network equipment in the simulated networking scene.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing computer instructions;
a processor coupled to the memory for executing the computer instructions in the memory and when executing the computer instructions implementing the method as described in the first or second aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including:
the computer readable storage medium stores computer instructions which, when executed on a computer, cause the computer to perform the method of any of the first or second aspects.
For each of the second to fourth aspects and possible technical effects of each aspect, please refer to the above description of the first aspect or the possible technical effects of each of the possible solutions in the first aspect, and no repeated description is given here.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application.
FIG. 1 is a schematic diagram of a laboratory network for switch testing in the prior art;
fig. 2 is an exemplary flowchart of a method for detecting a network device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a mirror image of a network device according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a test system according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a test kit according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a detection apparatus of a network device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding of technical solutions provided by the embodiments of the present application, terms of art related to the embodiments of the present application are described below.
(1) The test case is used for describing a test task of a specific software product and embodying a test scheme, a method, a technology and a strategy. The contents of the test object, the test environment, the input data, the test steps, the expected results, the test scripts and the like are included, and finally, a document is formed. Simply considered, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular purpose to verify whether a particular software requirement is met.
(2) After the number of test cases is large, the test cases are generally organized by using the test case suite in order to facilitate management and realize batch operation. The test cases in the set are all independent and have no sequential dependency relationship; if the precedence dependency does exist, the dependent processing needs to be completed in the test case.
(3) Docker, an open source application container engine, allows developers to package their applications and dependencies into a portable image, and then distribute it to any popular Linux or Windows operating system machine, as well as to implement virtualization. The containers are fully sandboxed without any interface between each other.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the technical solutions of the present application. All other embodiments obtained by a person skilled in the art without any inventive step based on the embodiments described in the present application are within the scope of the protection of the present application.
At present, because the number of Network devices simultaneously operated by a data center is too large, if a networking scene is built by all real physical devices when a Network device is tested, the problems of complex networking of Network Operation Systems (NOS), difficult scene coverage, high cost of the physical devices, and large workload of workers and low testing efficiency caused by complex deployment of the physical devices exist.
In view of the above, the present application provides a method for detecting a network device. In the method, the network equipment is virtualized, the mirror image of the network equipment is constructed, and the simulated networking scene is constructed by using the mirror image, so that the tested network equipment is tested. Therefore, the problems that in the prior art, cost is high due to the fact that a large amount of physical equipment is used, and testing efficiency is low due to the fact that the physical equipment is complex to deploy are solved.
Fig. 2 is an exemplary flowchart of a method for detecting a network device according to an embodiment of the present application, and the method may include the following steps:
s201, a server acquires description information of a real networking scene, wherein the description information comprises device information of at least two network devices in the real networking scene.
The number of the servers may be one or more, and may be set according to specific situations. For example, the number of servers may be increased when the data size is large, which is not limited in the present application.
The description information of the real networking scene includes device information of at least two network devices in the real networking scene. The network device may be a switch, a router, or other devices, and is not limited in this application. For example, the description information may include information such as the number of network devices in the real networking scenario, the type of each network device, the manufacturer, and the model of the network device. The network devices may be located in different network hierarchies, for example, the network devices may be located in an access layer, or may be located in a convergence layer or a core layer, which is not limited in this application.
S202, the server determines the tested network equipment from the at least two network equipment.
For example, the server may randomly select one or more network devices from the at least two network devices as the network device under test, or may select one or more network devices from the at least two network devices as the network device under test according to the network traffic executed by each network device. For example, the server may select a network device that performs a specified network service among the at least two network devices as the network device under test.
S203, the server constructs the mirror images of other network devices except the tested network device in the at least two network devices so as to execute the network service of the corresponding network device.
The server can construct the mirror image of other network equipment except the network equipment to be tested through the compiler according to the network service program set of other network equipment except the network equipment to be tested, and store the mirror image in the mirror image server. The image server is used for storing images of the network devices. The mirror image of the network device may be used to simulate the corresponding network device and perform the network service of the corresponding network device.
Since different network services are executed by the network device in different networking scenarios, a mirror image of the network device needs to be constructed according to a network service assembly. The network service program set may include a plurality of network service programs, and the plurality of network service programs may be connected by a network protocol. Wherein different network service programs may be used to perform different network services of the network device. For example, taking a network device as a switch as an example, the network service program set may include a network service program a, and the network service program a may be used to execute a network service for controlling and managing the operation of a certain network protocol. The network service set may also include a network service program B that may be used to process and forward a certain type of data on a certain port of the switch.
It will be appreciated that the server may also construct a mirror image of the network device under test. In other words, when detecting the network device under test, a physical device may be used, and a mirror image of the network device under test may also be used. In this way, testing costs may be reduced. It should be noted that the construction method of the mirror image of the network device under test may be implemented by referring to the construction methods of the mirror images of the other network devices, and details are not described here.
Fig. 3 is a schematic structural diagram of a mirror image of a network device according to an embodiment of the present application. The network device image 300 as shown may include a set of network services 301, an SCD API302, and a chip hardware emulation module 303. Since the SCD API302 can mask the SDK differences between different chip vendors, the network service set 301 can be made to run on chips produced by different vendors through the SCD API 302. The characteristics of the chip of the corresponding network device are obtained through the SCD API302, so that the chip of the corresponding network device is simulated through the chip hardware simulation module 303. The characteristics of the chip may include the manufacturer of the chip and the model of the chip. It should be understood that the chips of different network devices may be different, and therefore, the images of different network devices may obtain the characteristics of the chips of the network devices corresponding to the respective images through the SCD API302 included in the respective images, and simulate the chips of the network devices corresponding to the respective images through the chip hardware simulation module 303 included in the respective images.
Based on the scheme, the SCD API can shield the difference of SDKs between different chip manufacturers, so that software and hardware decoupling of network equipment can be realized through the SCD API. The chip characteristics of the network equipment are obtained through the SCD API, so that the chip is simulated, and the problem of difficulty in chip simulation can be solved.
In a possible implementation manner, after the mirror image is built, mirror image information such as the identification of the mirror image and the time of the mirror image building may be added to the mirror image, and the mirror image information are stored in the mirror image server.
And S204, the server constructs a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices.
The server may construct a simulated networking scene of the real networking scene according to the description information acquired in S201 and the images of the other network devices constructed in S203. Specifically, the network service of the corresponding network device may be executed by using the mirror images of the same number, type, manufacturer, and model according to the information such as the number, type, manufacturer, and model of other network devices except the network device to be tested in the description information of the real networking scene. For example, taking the network device as a switch as an example, it is assumed that 500 switches of type C and manufacturer D are required at the access layer in the description information of the real networking scenario except for the switch to be tested. Then, when a simulated networking scene of the real networking scene is constructed, 500 mirrors with the type of C and the manufacturer of D can be obtained from the mirror information of each switch mirror in the mirror server, so as to construct the simulated networking scene of the real networking scene.
S205, the server detects the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
And the server detects the tested exchange in the simulated networking scene constructed in S204 according to a pre-stored test case set. The test case set may include a plurality of test cases, and the test cases are used to detect whether the tested network device can execute a corresponding network service. Specifically, the network device under test is tested according to each test case in the test case set in the simulation networking scene, wherein for one test case, if the network device under test can execute the network service of the test case, it is determined that the network device under test passes through the test case, otherwise, it is determined that the network device under test does not pass through the test case. When the ratio of the first number of the test cases of the tested network device passing the test to the second number of all the test cases in the test case set is greater than or equal to a preset threshold value, determining that the application result of the tested network device in the simulated networking scene is applicable to the simulated networking scene. And when the proportion of the first quantity to the second quantity is smaller than a preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene. The preset threshold is preset according to the description information and the actual situation of the real networking scene, and the preset threshold is not limited in the application.
For example, assuming that the test case set includes 100 test cases, the preset threshold is set to be 90% according to the real networking scenario and the actual situation. When each test case in the test case set is used for testing the tested network equipment, and the number of the test cases of the tested network equipment passing the test is greater than or equal to 90, determining that the application result of the tested network equipment in the simulated networking scene is applicable to the simulated networking scene. And when the number of the test cases of the tested network equipment passing the test is less than 90, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
Based on the scheme, whether the network equipment can operate under the simulated networking scene to complete the corresponding network service or not can be detected according to the actual situation by setting the preset threshold value, and the detection accuracy of the detected network equipment can be improved.
Optionally, the test case of each network level may be determined according to the description information of the real networking scenario. Specifically, taking a network device as an example of a switch, a real networking scene may be disassembled according to network levels and analyzed, so as to determine description information of the real networking scene, and then a test case of each network level is determined according to the description information of the real networking scene, so as to form a test case set. For example, the test case of the access stratum may include a test case E, which may be used to test whether the switch under test can forward the data on the port F to the external network.
Based on the scheme, the test case of each network level is determined according to the description information of the real networking scene, so that the detection of the network equipment to be detected can be grounded. That is to say, the detection of the corresponding network service of the network device to be detected can be realized by setting each test case, so that the network device to be detected can be better detected.
In a possible implementation manner, after the server detects the network device under test according to a pre-stored test case set in the simulation networking scene, the server may further obtain a test case in which the network device under test fails to pass the test in the test case set, and then generate a test report of the network device under test based on the test case in which the network device under test fails to pass the test. Optionally, the test report may further include all test cases that pass the test. The related staff can analyze the reason why the tested network device fails the test case according to all the test cases which fail in the test report of the tested network device, so as to reconfigure the tested network device. In addition, related workers can also locate the place with the problem according to the test case that the tested network equipment fails and analyze the reason of the failed test to judge whether the simulation networking scene constructed by the server in S204 has the problem or not, so that the constructed simulation networking scene is tested.
Based on the scheme, the problems of the tested network equipment can be found by generating the test report, and the tested network equipment is timely reconfigured by analyzing the reason of failing to pass the test case. The method for detecting the network equipment to be detected not only can realize the detection of the network equipment to be detected, but also can realize the test of the constructed simulated networking scene, thereby correcting the scene in time and better detecting the network equipment to be detected.
Fig. 4 is a schematic structural diagram of a test system according to an embodiment of the present application. The test system 400 includes: mirror server 401, test suite server 402, server cluster 403, and network device under test 404. The mirror server 401 is configured to store the mirror image of the network device constructed in S202. The test suite server 402 is used for storing a test suite, which is constructed based on the Docker technology. The server cluster 403 may be composed of a plurality of servers, and may be managed by an OpenStack cloud computing management platform, so as to implement the method embodiment shown in fig. 2. The network device under test 404 may be a physical network device under test or a Virtual network device under test constructed by using a container Virtual Switch (DVS) technology. The method for constructing the virtual network device under test may refer to the related description of constructing the mirror image of the network device in S203, and is not described herein again.
In a possible implementation manner, the test suite may include the simulation networking scenario constructed in S204 and a test case set. Fig. 5 is a schematic structural diagram of a test kit provided in an embodiment of the present application. As shown, a scenario analysis module 501, a scenario construction module 502, and a test verification module 503 may be included in the test suite 500. The scene analysis module 501 may be configured to disassemble and analyze the real networking scene according to network hierarchies to obtain the number and types of network devices included in each network hierarchy except the network device to be detected in the real networking scene, and description information of manufacturers. The scene construction module 502 is configured to configure the mirror image and the test case set according to the description information of the real networking scene obtained by the scene analysis module 501 to obtain a simulated networking scene of the real networking scene. The test verification module 503 is configured to import the simulated networking scenario constructed by the scenario construction module 502 into the server cluster 403 to implement detection on the network device under test.
With reference to fig. 4, a network device is taken as an example for explanation. The server cluster 403 may first construct a mirror of the switches of the different chips from the network service suite and store the mirror and the mirror information in the mirror server 401. The server cluster 403 analyzes the real networking scene and constructs a virtual networking scene, forms a test suite, and stores the test suite in the test suite server 402. Then, when the tested switch is detected, a corresponding test suite in the test suite server 402 is loaded into the server cluster 403, a real networking scene is analyzed through a scene analysis module in the test suite, a mirror image of the corresponding switch is loaded from the mirror image server 401 through a scene construction module, deployment of the networking scene and deployment of a test case set are performed, and construction of a simulated networking scene is completed. And then detecting the switch to be tested according to the test case set in the test suite to generate a detection report. And obtaining the application result of the tested switch in the simulated networking scene, thereby obtaining the application result of the tested switch in the real networking scene.
Based on the same concept of the above method, refer to fig. 6 as a schematic structural diagram of a detection apparatus of a network device according to an embodiment of the present application. The apparatus 600 is capable of performing the various steps of the above-described method, and will not be described in detail herein to avoid repetition. The apparatus 600 comprises an acquisition unit 601 and a processing unit 602. In one scenario:
an obtaining unit 601, configured to obtain description information of a real networking scene, where the description information includes device information of at least two network devices in the real networking scene;
a processing unit 602, configured to determine a network device under test from the at least two network devices; constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment; constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices; and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
In a possible implementation manner, when the processing unit 602 is configured to construct an image of another network device, except the network device under test, of the at least two network devices, specifically, to: acquiring a network service program set of each other network device except the network device to be tested in the at least two network devices; and constructing the mirror images of the other network devices based on the network service program sets of the other network devices.
In a possible implementation manner, the processing unit 602 is configured to detect the network device under test according to a pre-stored test case set in the simulated networking scenario, and when an application result of the network device under test in the simulated networking scenario is obtained, specifically configured to: testing the network equipment to be tested according to each test case in the test case set in the simulation networking scene; determining whether the proportion of the first number of the test cases with the passed test result to the second number of the test cases included in the test case set is smaller than a preset threshold value or not; if the ratio is determined to be greater than or equal to the preset threshold, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment can be applied to the simulated networking scene; and if the proportion is smaller than the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
In a possible implementation manner, the processing unit 602 is further configured to obtain that the test result in the test case set is a failed test case; and generating a detection report of the tested network equipment for the failed test case based on the test result.
In a possible implementation manner, if the image of each other network device includes an SCD API, the processing unit 602 is further configured to: acquiring the characteristics of the chip of the corresponding network equipment according to the SCD API included in the mirror image of each other network equipment; and simulating the corresponding chip of the network equipment according to the characteristics of the chip of each network equipment.
In a possible implementation manner, the processing unit 602 is further configured to: determining test cases of each network level according to the description information; each network hierarchy comprises an access layer, a convergence layer and a core layer; and detecting the tested network equipment in the simulated networking scene according to the test cases of all network levels to obtain the application result of the tested network equipment in the simulated networking scene.
Based on the same concept of the method, refer to fig. 7 for a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device comprises a processor 701 and a memory 702. A memory 702 for storing computer instructions, and a processor 701 coupled to the memory for executing the computer instructions in the memory and implementing the steps of any of the above methods when executing the computer instructions.
Embodiments of the present application also provide a computer-readable storage medium having stored thereon computer instructions, which, when executed on a computer, cause the computer to perform the steps of any of the above-mentioned methods.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
While specific embodiments of the present application have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the present application is defined by the appended claims. Various changes or modifications to these embodiments can be made by those skilled in the art without departing from the principle and spirit of this application, and these changes and modifications all fall into the scope of this application. While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (14)

1. A network equipment detection method is applied to a server, and is characterized in that the method comprises the following steps:
acquiring description information of a real networking scene, wherein the description information comprises device information of at least two network devices in the real networking scene;
determining a network device under test from the at least two network devices;
constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment;
constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices;
and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
2. The method according to claim 1, wherein the constructing the mirror image of the other network device of the at least two network devices except the network device under test specifically includes:
acquiring a network service program set of each other network device except the network device to be tested in the at least two network devices;
and constructing the mirror images of the other network devices based on the network service program sets of the other network devices.
3. The method according to claim 1, wherein the detecting the network device under test in the simulated networking scene according to a pre-stored test case set to obtain an application result of the network device under test in the simulated networking scene specifically includes:
testing the network equipment to be tested according to each test case in the test case set in the simulation networking scene;
determining whether the proportion of the first number of the test cases with the passed test result to the second number of the test cases included in the test case set is smaller than a preset threshold value or not;
if the proportion is determined to be larger than or equal to the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is applicable to the simulated networking scene;
and if the proportion is smaller than the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
4. The method of claim 1, further comprising:
acquiring the test case with the failed test result in the test case set;
and generating a detection report of the tested network equipment for the failed test case based on the test result.
5. The method of claim 1, wherein if the image of each other network device includes a network protocol driven application program interface (SCD API), the method further comprises:
acquiring the characteristics of the chip of the corresponding network equipment according to the SCD API included in the mirror image of each other network equipment;
and simulating the corresponding chip of the network equipment according to the characteristics of the chip of each network equipment.
6. The method of any of claims 1-5, further comprising:
determining a test case of each network level according to the description information, wherein each network level comprises an access layer, a convergence layer and a core layer;
and detecting the tested network equipment in the simulated networking scene according to the test cases of all network levels to obtain the application result of the tested network equipment in the simulated networking scene.
7. A detection apparatus for a network device, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring description information of a real networking scene, and the description information comprises device information of at least two network devices in the real networking scene;
a processing unit, configured to determine a network device under test from the at least two network devices; constructing mirror images of other network equipment except the tested network equipment in the at least two network equipment so as to execute the network service of the corresponding network equipment; constructing a simulated networking scene of the real networking scene according to the description information and the mirror images of other network devices; and detecting the tested network equipment in the simulated networking scene according to a pre-stored test case set to obtain an application result of the tested network equipment in the simulated networking scene.
8. The apparatus according to claim 7, wherein the processing unit, when constructing the mirror images of the other network devices of the at least two network devices except the network device under test, is specifically configured to:
acquiring a network service program set of each other network device except the network device to be tested in the at least two network devices;
and constructing the mirror images of the other network devices based on the network service program sets of the other network devices.
9. The apparatus according to claim 7, wherein the processing unit is configured to detect the network device under test according to a pre-stored test case set in the simulated networking scenario, and when an application result of the network device under test in the simulated networking scenario is obtained, specifically configured to:
testing the network equipment to be tested according to each test case in the test case set in the simulation networking scene;
determining whether the proportion of the first number of the test cases with the passed test result to the second number of the test cases included in the test case set is smaller than a preset threshold value or not;
if the ratio is determined to be greater than or equal to the preset threshold, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment can be applied to the simulated networking scene;
if the proportion is smaller than the preset threshold value, determining that the application result of the tested network equipment in the simulated networking scene is that the tested network equipment cannot be applied to the simulated networking scene.
10. The apparatus of claim 7, wherein the processing unit is further configured to:
acquiring the test case which fails to pass the test in the test case set;
and generating a detection report of the tested network equipment for the failed test case based on the test result.
11. The apparatus of claim 7, wherein if the image of each of the other network devices comprises a network protocol driver application program interface (SCD API), the processing unit is further configured to:
acquiring the characteristics of the chip of the corresponding network equipment according to the SCD API included in the mirror image of each other network equipment;
and simulating the corresponding chip of the network equipment according to the characteristics of the chip of each network equipment.
12. The apparatus according to any of claims 7-11, wherein the processing unit is further configured to:
determining test cases of each network level according to the description information; each network hierarchy comprises an access layer, a convergence layer and a core layer;
and detecting the tested network equipment in the simulated networking scene according to the test cases of all network levels to obtain the application result of the tested network equipment in the simulated networking scene.
13. An electronic device, comprising:
a memory for storing computer instructions;
a processor coupled to the memory for executing the computer instructions in the memory and when executing the computer instructions implementing the method of any of claims 1 to 6.
14. A computer-readable storage medium, comprising:
the computer readable storage medium stores computer instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1 to 6.
CN202210050294.3A 2022-01-17 2022-01-17 Network equipment detection method and device and electronic equipment Pending CN114430385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210050294.3A CN114430385A (en) 2022-01-17 2022-01-17 Network equipment detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210050294.3A CN114430385A (en) 2022-01-17 2022-01-17 Network equipment detection method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114430385A true CN114430385A (en) 2022-05-03

Family

ID=81312444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210050294.3A Pending CN114430385A (en) 2022-01-17 2022-01-17 Network equipment detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114430385A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412447A (en) * 2022-08-19 2022-11-29 浪潮思科网络科技有限公司 SDN-based service testing method, device and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN107483284A (en) * 2017-07-20 2017-12-15 北京航空航天大学 The method of testing and device of the network equipment
CN108777648A (en) * 2018-05-18 2018-11-09 新华三信息安全技术有限公司 A kind of network apparatus test method and device
CN110213121A (en) * 2019-04-28 2019-09-06 山石网科通信技术股份有限公司 Test platform, test method and the test device of virtual communication product
CN110909460A (en) * 2019-11-12 2020-03-24 中国第一汽车股份有限公司 Internet of vehicles V2X simulation test method, device, equipment and storage medium
CN111832236A (en) * 2020-06-29 2020-10-27 山东云海国创云计算装备产业创新中心有限公司 Chip regression testing method and system, electronic equipment and storage medium
CN112988336A (en) * 2021-05-18 2021-06-18 新华三技术有限公司 Network verification method and device of data center
CN113326204A (en) * 2021-06-23 2021-08-31 鹏城实验室 Transformer substation system testing method and device, terminal equipment and storage medium
CN113360386A (en) * 2021-06-17 2021-09-07 锐捷网络股份有限公司 Switching chip drive test method, device, electronic equipment and storage medium
CN113507398A (en) * 2021-07-08 2021-10-15 安天科技集团股份有限公司 Network topology state detection method and device, computing equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN107483284A (en) * 2017-07-20 2017-12-15 北京航空航天大学 The method of testing and device of the network equipment
CN108777648A (en) * 2018-05-18 2018-11-09 新华三信息安全技术有限公司 A kind of network apparatus test method and device
CN110213121A (en) * 2019-04-28 2019-09-06 山石网科通信技术股份有限公司 Test platform, test method and the test device of virtual communication product
CN110909460A (en) * 2019-11-12 2020-03-24 中国第一汽车股份有限公司 Internet of vehicles V2X simulation test method, device, equipment and storage medium
CN111832236A (en) * 2020-06-29 2020-10-27 山东云海国创云计算装备产业创新中心有限公司 Chip regression testing method and system, electronic equipment and storage medium
CN112988336A (en) * 2021-05-18 2021-06-18 新华三技术有限公司 Network verification method and device of data center
CN113360386A (en) * 2021-06-17 2021-09-07 锐捷网络股份有限公司 Switching chip drive test method, device, electronic equipment and storage medium
CN113326204A (en) * 2021-06-23 2021-08-31 鹏城实验室 Transformer substation system testing method and device, terminal equipment and storage medium
CN113507398A (en) * 2021-07-08 2021-10-15 安天科技集团股份有限公司 Network topology state detection method and device, computing equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412447A (en) * 2022-08-19 2022-11-29 浪潮思科网络科技有限公司 SDN-based service testing method, device and medium

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
US11755919B2 (en) Analytics for an automated application testing platform
US10169203B2 (en) Test simulation for software defined networking environments
CN108737213B (en) High-parallelism and high-throughput penetration test system and method based on FPGA
US11113183B2 (en) Automated device test triaging system and techniques
US20220237111A1 (en) Distributed immutable data object testing
US20140289567A1 (en) System, method, and computer program product for error code injection
US20110016454A1 (en) Method and system for testing an order management system
CN110532182A (en) A kind of automated testing method and device of virtual platform
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
US20220214928A1 (en) Workload Configuration Extractor
CN114430385A (en) Network equipment detection method and device and electronic equipment
CN111400162A (en) Test method and test system
US11750471B2 (en) Method and apparatus for determining resource configuration of cloud service system
US11550697B2 (en) Cross jobs failure dependency in CI/CD systems
Ericsson et al. Challenges from research to deployment of industrial distributed control systems
CN112860587B (en) UI automatic test method and device
EP4278288A1 (en) Workload configuration extractor
US11194699B2 (en) Compatibility testing with different environment configurations
US20220004484A1 (en) Systems and methods for training systems to detect software bugs
CN112506772A (en) Web automatic testing method and device, electronic equipment and storage medium
CN114064448A (en) Test environment deployment and smoking test method and device and electronic equipment
CN112667491A (en) Function test method and device of virtual machine
Padmanabhan Test path identification for internet of things using transaction based specification
CN110471767A (en) A kind of dispatching method of equipment

Legal Events

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