CN116684343A - Automatic test method, device, system, equipment and medium for switch - Google Patents

Automatic test method, device, system, equipment and medium for switch Download PDF

Info

Publication number
CN116684343A
CN116684343A CN202310973875.9A CN202310973875A CN116684343A CN 116684343 A CN116684343 A CN 116684343A CN 202310973875 A CN202310973875 A CN 202310973875A CN 116684343 A CN116684343 A CN 116684343A
Authority
CN
China
Prior art keywords
switch
tested
port
test
power supply
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
CN202310973875.9A
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.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute Group 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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202310973875.9A priority Critical patent/CN116684343A/en
Publication of CN116684343A publication Critical patent/CN116684343A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses an automatic test method, device, system, equipment and medium for a switch. The method comprises the following steps: responding to a switch port test event, determining an expected working state of a target port of the switch to be tested, and performing power supply control on the switch to be tested by utilizing at least two power supply probes; in the process of controlling the power supply of the switch to be tested, determining the actual working state of the target port of the switch to be tested by detecting a switching plate; the destination port includes: a power supply port and an alarm port; and determining a port test result of the switch to be tested according to the expected working state and the actual working state. According to the technical scheme, equipment such as the power supply probe and the detection switching board can be utilized to automatically test the switch, so that the testing efficiency of a switch product is improved, and the testing time is saved.

Description

Automatic test method, device, system, equipment and medium for switch
Technical Field
The present invention relates to the field of communications, and in particular, to a method, apparatus, system, device, and medium for automatically testing a switch.
Background
The switch is an important device for forming a communication network, and the switch product needs to test the whole machine at different angles after the whole machine is assembled, such as port test and the like. The existing manual test mode has the problems of complicated environment construction, high requirement on the capability of workers, long test time and the like.
Therefore, how to realize the automatic test of the switch and comprehensively test each function of the switch, and ensure that the basic function of the product delivered from the factory is not abnormal is a problem to be solved urgently at present.
Disclosure of Invention
The invention provides an automatic test method, device, system, equipment and medium for a switch, which can utilize equipment such as a power supply probe, a detection switching board and the like to automatically test the switch, improve the test efficiency of a switch product and save test time.
According to an aspect of the present invention, there is provided an automatic test method for a switch, including:
responding to a switch port test event, determining an expected working state of a target port of the switch to be tested, and performing power supply control on the switch to be tested by utilizing at least two power supply probes;
in the process of controlling the power supply of the switch to be tested, determining the actual working state of the target port of the switch to be tested by detecting a switching plate; the destination port includes: a power supply port and an alarm port;
And determining a port test result of the switch to be tested according to the expected working state and the actual working state.
According to another aspect of the present invention, there is provided an automatic test equipment for a switch, comprising:
the control module is used for responding to the switch port test event, determining the expected working state of the switch target port to be tested, and utilizing at least two power supply probes to control the power supply of the switch to be tested;
the state determining module is used for determining the actual working state of the target port of the switch to be detected by detecting the switching plate in the process of controlling the power supply of the switch to be detected; the destination port includes: a power supply port and an alarm port;
and the result determining module is used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
According to another aspect of the present invention, there is provided an automatic test system for a switch, including: the system comprises a test host, a switch to be tested, a power supply probe and a detection switching board; the switch to be tested includes: a power supply port and an alarm port;
the method comprises the steps that a test host responds to a switch port test event, an expected working state of a target port of a switch to be tested is determined, and at least two power supply probes are utilized to control power supply of the switch to be tested;
The power supply probe is used for controlling the power supply of the switch to be tested; the power supply port of the switch to be tested is connected to the detection switching board through a power supply probe;
the test host is also used for determining the actual working state of the target port of the switch to be tested by detecting the switching board in the process of controlling the power supply of the switch to be tested; the destination port includes: a power supply port and an alarm port; the detection switching plate is connected with the test host;
the test host is also used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
According to another aspect of the present invention, there is provided an automatic test system for a switch, including: the system comprises a test host, a switch to be tested, a power supply probe and a detection switching board; the switch to be tested includes: a power supply port and an alarm port;
the method comprises the steps that a test host responds to a switch port test event, an expected working state of a target port of a switch to be tested is determined, and at least two power supply probes are utilized to control power supply of the switch to be tested;
the power supply probe is used for controlling the power supply of the switch to be tested; the power supply port of the switch to be tested is connected to the detection switching board through a power supply probe;
The test host is also used for determining the actual working state of the target port of the switch to be tested by detecting the switching board in the process of controlling the power supply of the switch to be tested; the destination port includes: a power supply port and an alarm port; the detection switching plate is connected with the test host;
the test host is also used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the automatic test method of a switch according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the automatic test method for a switch according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the expected working state of the target port of the switch to be tested is determined in response to the switch port test event, at least two power supply probes are utilized to control power supply of the switch to be tested, the actual working state of the target port of the switch to be tested is determined through detecting the switching board in the process of controlling power supply of the switch to be tested, and the port test result of the switch to be tested is determined according to the expected working state and the actual working state. By utilizing the power supply probe and the detection switching plate to automatically test the power supply port and the alarm port of the switch to be tested, the testing efficiency of the switch product can be improved, and the testing time can be saved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1A is a flowchart of an automatic testing method for a switch according to a first embodiment of the present invention;
FIG. 1B is a schematic diagram of a detection switch board according to an embodiment of the present invention;
fig. 2A is a schematic diagram of an automatic test system for a switch according to a second embodiment of the present invention;
fig. 2B is a connection schematic diagram of a network management switch according to a second embodiment of the present invention;
fig. 2C is a block diagram of an automatic test system for a switch according to a second embodiment of the present invention;
fig. 3 is a block diagram of an automatic testing device for a switch according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "target," "candidate," and the like in the description and claims of the present invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the related art, two computers are generally manually configured to access an exchange to perform mutual communication, so that the test of an exchange communication interface is realized, and the writing and verification of serial numbers, MAC addresses, authorization License and the like are performed through a special configuration cable, namely, the exchange configuration function test is performed; the power supply port of the switch is tested by configuring a double-circuit power supply and matching with a universal meter, namely, the port test of the switch is performed, and the manual test mode of the switch has a plurality of defects, (1) the environment is built up in a complicated way, and in the test process, a tester is required to continuously change the test environment according to the current test item, so that the time is long; (2) the method has the advantages that the requirement on the capability of workers is high, operators are required to be skilled in mastering the operation command of the switch when the information such as the serial number, the MAC address and the like is written into the switch, and meanwhile, the workers are required to have the capability requirements such as test environment inspection, simple fault processing and the like; (3) when testing the network port function of the switch, the test time is long, and 2 computers are required to communicate with each other for at least 5 minutes through ping commands, for example, 2 computers are configured to test, 2 network ports can be tested on the switch at the same time in a single time, along with the increase of the number of the network ports of the switches of different types, the test time is also increased, at present, the production switch of a factory is 28 ports at most, for example, according to the scheme of testing 2 PCs, only 70 minutes (5 x 28/2) are required for the network port test. Aiming at the problems, the embodiment of the invention provides an automatic testing scheme of a switch, which can realize automatic testing of basic functions of a power supply interface, a communication interface, a configuration interface and the like of the switch, ensure that the basic functions of a factory product are not abnormal, and particularly a method and a system for realizing the automatic testing are described in detail in the following embodiments.
Example 1
Fig. 1A is a flowchart of an automatic testing method for a switch according to an embodiment of the present invention, and fig. 1B is a schematic diagram of a detection switch board according to an embodiment of the present invention, where the method is applicable to a case of performing automatic testing on a switch, and the method may be performed by an automatic testing device for a switch, where the device may be implemented in software and/or hardware, and may be integrated into an electronic device for implementing automatic testing on a switch, such as a testing host, where the testing host may be a personal computer (Personal Computer, PC). As shown in fig. 1A, the method includes:
s101, responding to a switch port test event, determining an expected working state of a target port of a switch to be tested, and utilizing at least two power supply probes to control power supply of the switch to be tested.
The switch port test event refers to an event for testing the function of the switch target port. The target port refers to a port which is arranged on a target to be tested on the switch to be tested. The destination ports may include a power port and an alarm port. The expected working state refers to a working state which is expected to be reached by a target port of the switch to be tested after the preset subsequent switch to be tested is subjected to power supply control. The desired operating state may be a normal state, a short circuit state, or an open circuit state. The power supply probes are power supply detection buckle probes connected with corresponding sub-ends of a power supply port of the switch to be detected, and the number of the power supply probes can be at least two.
Optionally, the test host may consider that a switch port test event is detected after receiving a test instruction for testing a switch port sent by a related person; and the method can also automatically generate a test instruction for testing the switch port based on a preset rule, such as when the switch to be tested is detected to be fixed by the fixed block and the air cylinder, namely, a switch port test event is detected.
Optionally, after detecting the switch port test event, the test host may analyze according to a test instruction associated with the switch port test event to determine a switch port for the target test and a preset working state of the switch port for the target test, that is, determine an expected working state of the target port of the switch to be tested.
Optionally, after the test host determines the target port and the expected working state of the switch to be tested, at least two power supply probes may be controlled to supply power to the switch to be tested at the same time based on a preset rule, that is, power supply control is performed on the switch to be tested, for example, two power supply probes (P1 probe and P2 probe) may be controlled to supply power to the switch to be tested for 10 minutes at the same time.
Optionally, the test host may communicate with the detection switching board through the communication interface, and after determining the target port and the expected working state of the switch to be tested, send a corresponding power supply instruction to the detection switching board, and control at least two power supply probes to supply power to the switch to be tested by using the detection switching board. The power supply probe can be connected with the detection switching plate inside the cabinet through a cable.
For example, referring to fig. 1B, the detection switching board may perform an on or off operation on a power interface between the detection switching board and the ac power supply based on a power supply instruction sent by the test host, and switch the output of the ac power supply to the P1 and P2 ports, so as to implement separate control or simultaneous control on the on-off states of the P1 and P2 ports, so that the ac power is transmitted to the P1 power supply port and the P2 power supply port of the switch to be tested through the P1 probe and the P2 probe, and implement power supply control of the switch to be tested.
S102, in the process of performing power supply control on the switch to be tested, determining the actual working state of the target port of the switch to be tested by detecting the switching plate.
The detection switching board is arranged in the cabinet in advance. The actual working state refers to the actual working state of the switch to be tested in the power supply control process. The actual operating state may be a normal state, a short circuit state, or an open circuit state.
Optionally, in the process of performing power supply control on the switch to be tested, the test host may communicate with the detection switching board to obtain the actual working states of the power supply port and the alarm port of the switch to be tested, that is, the actual working states of the target port of the switch to be tested are determined through the detection switching board.
Optionally, in the process of performing power supply control on the switch to be tested, determining the actual working state of the target port of the switch to be tested by detecting the switching board includes: acquiring a level signal of a target port of the switch to be detected through a detection switching board; and determining the actual working state of the target port of the switch to be tested according to the level signal.
Wherein the level signal may be a high level or a low level signal. The switching detection board short-circuits the L line of the P1 port and the 3.3V voltage in the switching detection board through a 2K resistor, and the N line short-circuits the L line and the ground, meanwhile, the IO (Input/Output) detection pin of the internal chip of the switching detection board short-circuits the L line, when the IO pin detects a high level, the IO pin represents no short circuit, the actual working state of the target port of the switch to be detected is a normal state, when the IO pin detects a low level, the L line short-circuits the N line short-circuits, and the actual working state of the target port of the switch to be detected is a short-circuit state.
For example, referring to fig. 1B, the detection switching board may also be connected to an alarm port of the switch to be tested through an alarm detection probe, so as to obtain a level signal of the alarm port, thereby determining an actual working state of the alarm port of the switch to be tested.
S103, determining a port test result of the switch to be tested according to the expected working state and the actual working state.
The test result may be a result indicating whether the port function of the switch to be tested is normal.
Optionally, if the expected working state and the actual working state of the target port of the switch to be tested are the same, it can be determined that the port test result of the switch to be tested is that the port function of the switch to be tested is normal, the power supply control function of the switch test system to the switch to be tested is normal, and the open and short circuit detection of the power supply port and the alarm port is passed.
According to the technical scheme, the expected working state of the target port of the switch to be tested is determined in response to the switch port test event, at least two power supply probes are utilized to control power supply of the switch to be tested, the actual working state of the target port of the switch to be tested is determined through detecting the switching board in the process of controlling power supply of the switch to be tested, and the port test result of the switch to be tested is determined according to the expected working state and the actual working state. By utilizing the power supply probe and the detection switching plate to automatically test the power supply port and the alarm port of the switch to be tested, the testing efficiency of the switch product can be improved, and the testing time can be saved.
Optionally, the test host may interact with at least two network management switches in the switch test system, and test the function of the communication interface of the switch to be tested, specifically, respond to the switch communication interface test event, determine at least two target threads, call at least two target threads, and send test commands to at least two network management switches at the same time, so as to instruct each network management switch to interact with the switch to be tested through the corresponding communication interface; and determining the test result of the communication interface of the switch to be tested according to the execution result of the test command by each network management switch.
The target thread is a thread for sending a test instruction to a certain network management switch by a target. One target thread corresponds to one gateway switch. The test command may be a ping command and ping (Packet Internet Groper) is a commonly used internet packet explorer.
Optionally, when detecting the switch communication interface test event, the test host may determine at least two preset network management switches according to the test instruction associated with the switch communication interface test event, and further determine corresponding communication threads for each network management switch, that is, determine at least two target threads.
Optionally, after determining at least two target threads, the determined at least two target threads may be called to send a ping command to a preset target network management switch, so as to instruct the target network management switch to forward the ping command to other network management switches, so that each network management switch corresponding to the at least two target threads interacts with the switch to be tested through corresponding communication interfaces at the same time, and a plurality of communication interfaces of the switch to be tested are tested at the same time.
Optionally, after the test host sends the test command to at least two network management switches, the execution result of each network management switch on the test command may be determined based on a preset rule, which specifically includes: acquiring feedback signals of each network management switch to the test command within a preset time period; for each network management switch, determining the total times of sending test commands to the network management switch in a preset time period; and determining the execution result of the network management switch on the test command according to the magnitude relation between the number of times of passing the feedback signal and the total number of times.
The preset time period refers to a preset time period from the emission of the test command, and for example, the preset time period may be 5 minutes. The feedback signal refers to a signal that may characterize whether the test instruction is ping through. The feedback signal may be ping passed, ping failed, or feedback timeout.
For example, the test host may run multiple threads (i.e., target threads) at the same time, for example, 28 threads, where each thread sends a test instruction to a designated network management switch, and performs a ping operation (for example, a 1-thread pinging a 1-number network management switch, a 2-thread pinging a 2-number network management switch), where a ping is passed and a delay time is not more than 1s, and the ping is failed or a timeout is determined to be failed, that is, a feedback signal of each network management switch to the test instruction in a preset time period is obtained.
Specifically, after the test command is continuously sent to each network management switch through each target thread in the preset time period, if the test command is continuously carried out for 5 minutes, the total times of sending the test command to the network management switch and the times of passing the feedback signal in the preset time period can be determined for each network management switch, so that the ratio of the times of failure to the total times of the feedback signal is determined, and if the ratio is less than 0.01%, the execution result of the test command by the corresponding network management switch is determined to be normal execution.
Optionally, after determining the execution result of the test command by each network management switch, the execution result of each network management switch may be counted, if the execution result of the test command by the network management switch is normal execution, it is determined that the communication interface connected with the network management switch by the switch to be tested is normal in function, if the execution result of the test command by the network management switch is abnormal execution, it is determined that the communication interface connected with the network management switch by the switch to be tested is abnormal in function, and finally, according to the execution results of all the network management switches, the test result of the communication interface of the switch to be tested is generated.
Optionally, the test host may also communicate with the switch to be tested through a preset configuration interface, to test the configuration function of the switch to be tested, specifically, respond to a switch configuration function test event, send a configuration instruction to the switch to be tested, and be used to instruct the switch to be tested to write configuration information into the internal memory; sending a display instruction to the switch to be tested, wherein the display instruction is used for indicating the switch to be tested to display the current configuration information and reading the current configuration information back; and determining a test result of the configuration function of the switch to be tested according to the current configuration information and the configuration instruction obtained after the reading back.
Wherein the configuration information includes at least one of: serial number, MAC address (Media Access Control Address, physical address) and License information. For example, the sequence number may be expressed in the form of "setsn xxx," which represents the sequence number. Different configuration instructions contain different configuration information, and the configuration instructions can be set vlan MAC or set License, which are commands for configuring the MAC address and License information, respectively.
Optionally, the test host may instruct the switch to be tested to display the current configuration information through a preset display instruction, such as a show ver instruction, so as to read the configuration information in the switch device to be tested, i.e. read back the current configuration information.
Optionally, the test host may compare the current configuration information obtained by the read-back with the configuration information written by the configuration instruction, if the current configuration information is consistent with the configuration information written by the configuration instruction, it is determined that the test host successfully sets the switch to be tested, if not, it is determined that the test host does not succeed in setting the switch to be tested, and a test result of the configuration function of the switch to be tested is generated according to the result of whether the setting is successful or not.
Optionally, if the test fails, specific test phenomena and fault points can be recorded, a test result is generated, and a reference basis is provided for subsequent maintenance of the product.
Optionally, after the switch to be tested performs the test operation described in the foregoing embodiment, relevant data in the test process, such as product codes, product versions, product numbers, test index data, test passing conditions, and the like, may be recorded and managed, and a test result report may be automatically generated, that is, a test result of the switch to be tested is determined.
Optionally, the test host may further control, through a preset controller, the switch to be tested in the switch test system to move in cylinders in different directions, and specifically send a control instruction to a preset programmable logic controller PLC, where the control instruction is used to instruct the PLC to control the movement of the cylinders through a pulse signal.
Wherein, different cylinders are configured in different directions of the switch to be tested. The cylinder may include at least one of: left cylinder, preceding cylinder and following cylinder. The left cylinder, the front cylinder and the rear cylinder are respectively arranged at the left side, the front side and the rear side of the switch to be tested. The programmable logic controller (Programmable Logic Controller, PLC) is communicated with the air cylinder through pulse signals.
Optionally, after detecting that the switch to be tested is placed in the test area, the test host sends a control instruction to a preset programmable logic controller PLC, and instructs the PLC to control the left cylinder to move through the pulse signal, so as to clamp the switch to be tested.
Optionally, after detecting that the left cylinder clamps the switch to be tested, the test host may send a control instruction to a preset programmable logic controller PLC, to instruct the PLC to control the following cylinder to contact the power supply probe and the alarm detection port probe with corresponding terminals of the power supply port and the alarm port of the switch to be tested through the pulse signal.
Optionally, the test host may send a control instruction to a preset programmable logic controller PLC, to instruct the PLC to control movement of at least two preceding cylinders by using a pulse signal, so that the communication interface and the configuration interface of the switch to be tested are connected. The communication interface terminal is connected to each network management switch through network cables, so that the subsequent test host can conveniently communicate with the switch to be tested through the network management switch.
Example two
Fig. 2A is a schematic diagram of an automatic test system for a switch according to a second embodiment of the present invention, fig. 2B is a connection schematic diagram of a network management switch according to a second embodiment of the present invention, and fig. 2C is a block diagram of an automatic test system for a switch according to a second embodiment of the present invention. The embodiment further provides a preferred example of realizing the automatic test of different angles of the switch by utilizing the detection switching board, the network management switch, the air cylinder and other components in the automatic test system of the switch on the basis of the embodiment.
Optionally, the automatic test system for a switch provided in this embodiment may include: the system comprises a test host, a switch to be tested, a power supply probe and a detection switching board; the switch to be tested includes: a power supply port and an alarm port;
the method comprises the steps that a test host responds to a switch port test event, an expected working state of a target port of a switch to be tested is determined, and at least two power supply probes are utilized to control power supply of the switch to be tested;
the power supply probe is used for controlling the power supply of the switch to be tested; the power supply port of the switch to be tested is connected to the detection switching board through a power supply probe;
the test host is also used for determining the actual working state of the target port of the switch to be tested by detecting the switching board in the process of controlling the power supply of the switch to be tested; the destination port includes: a power supply port and an alarm port; the detection switching plate is connected with the test host;
The test host is also used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
Illustratively, as shown in fig. 2A, the switch automatic test system may include: the device comprises a display, a P1-port power supply probe, a P2-port power supply probe, a left cylinder, a rear cylinder, an alarm detection port probe, a fixed block, a switch to be tested (namely a switch to be tested), a communication port 1 group-a communication port 4 group, an industrial camera and a front 1 cylinder-a front 4 cylinder.
Wherein the P1-port power supply probe and the P2-port power supply probe are the power supply probes in the embodiment. Communication port 1 group-communication port 4 group are the communication interfaces of the switch to be tested in the above embodiment.
Optionally, the fixing block is used for fixing and limiting the switch to be tested. When the switch to be tested is placed in the test area, the left cylinder is used for clamping the switch to be tested.
Optionally, after the left cylinder clamps the switch to be tested, the following cylinder is used for contacting the power supply port P1 probe, the power supply port P2 probe and the alarm detection port probe with corresponding terminals of the power supply port and the alarm port of the switch to be tested.
Optionally, the detection switching board is mainly used for: (1) switching the output of an alternating current power supply to the P1 and P2 ports of the power supply ports, and independently controlling the on-off states of the P1 and P2 ports; (2) detecting the open-short circuit state of the power supply port and the alarm port; (3) communicate with a PC (test host).
Optionally, the front 1-front 4 cylinders are used for connecting the communication interfaces 1 to 4 of the switch to be tested with the corresponding configuration interfaces respectively, and meanwhile, referring to fig. 2B, the ends of the communication interfaces 1 to 4 are connected to the network management switches 1-n respectively through network cables.
Optionally, the industrial camera is used for identifying the panel indicator lamp of the switch to be tested, so that the normal function of the switch indicator lamp after leaving the factory is ensured.
Preferably, referring to fig. 2C, the automatic test system for a switch may include: the system comprises a switch to be tested, a rear cylinder, a front cylinder, n network management switches, a detection switching board, an alternating current power supply, a test host and a PLC. Wherein, the switch that awaits measuring includes: a power supply port, an alarm port and a communication interface.
Specifically, the power supply port of the switch to be tested is connected to the detection switching board through the power supply probe of the following cylinder. The detection switching board is connected with an alternating current power supply. The alternating current power supply and the detection switching board are connected to the test host. The connection relation can realize the power supply control of the test host to the switch to be tested and the open-short circuit detection of the power supply port and the alarm port.
Specifically, each communication interface of the switch to be tested is connected to the network management switch 1-network management switch n through network cables, n is the number of communication ports of the switch to be tested, and the test host is connected to the network management switch 1, so that the test host can communicate with the network management switch 1-network management switch n through a ping command, the function of the communication ports of the switch to be tested is tested, and the test of the serial number, the MAC address and the License setting function of the switch to be tested can also be realized by the test host.
Specifically, the front cylinder, the rear cylinder, the left cylinder (not shown in fig. 2C) are connected to a PLC, which is connected to the test host; the connection relation can realize the control of the test host to the movement of the cylinder.
It should be noted that, the automatic test system for the switch provided by the invention can include the following overall processes: placing the switch to be tested, fixing the switch to be tested by the action of the air cylinder, connecting the interfaces, and then executing the processes of electric test, information writing, communication test and the like of the switch to be tested.
It should be noted that, for the switches to be tested of different types, the test content may be selected, for example, for the TH-2028G type switch and the TH-2014G type switch, an electrical test, an information writing and a communication test are required, but the TH-1012T type switch does not need to be subjected to information writing, and only two other tests are required.
According to the scheme provided by the embodiment of the invention, different structures can be adapted for different types of switches, so that the automatic test of one switch test system on various types of switch products can be realized, the switch port test, the switch configuration function test and the switch communication interface test can be performed, the test time can be saved, the test efficiency can be improved, and the capability requirements on related operators can be effectively reduced.
Example III
Fig. 3 is a block diagram of an automatic testing device for a switch according to a third embodiment of the present invention, where the automatic testing device for a switch according to the third embodiment of the present invention may execute the automatic testing method for a switch according to any one of the embodiments of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
As shown in fig. 3, the apparatus includes:
the control module 301 is configured to determine an expected working state of a target port of the switch to be tested in response to a switch port test event, and perform power supply control on the switch to be tested by using at least two power supply probes;
the state determining module 302 is configured to determine, by detecting a switch board, an actual working state of a target port of the switch to be tested in a process of performing power supply control on the switch to be tested; the destination port includes: a power supply port and an alarm port;
and a result determining module 303, configured to determine a port test result of the switch to be tested according to the expected working state and the actual working state.
According to the technical scheme, the expected working state of the target port of the switch to be tested is determined in response to the switch port test event, at least two power supply probes are utilized to control power supply of the switch to be tested, the actual working state of the target port of the switch to be tested is determined through detecting the switching board in the process of controlling power supply of the switch to be tested, and the port test result of the switch to be tested is determined according to the expected working state and the actual working state. By utilizing the power supply probe and the detection switching plate to automatically test the power supply port and the alarm port of the switch to be tested, the testing efficiency of the switch product can be improved, and the testing time can be saved.
Further, the state determining module 302 is specifically configured to:
acquiring a level signal of a target port of the switch to be detected through a detection switching board;
and determining the actual working state of the target port of the switch to be tested according to the level signal.
Further, the device is also used for:
responding to a switch communication interface test event, determining at least two target threads, calling the at least two target threads, and simultaneously sending test commands to at least two network management switches, wherein the test commands are used for indicating each network management switch to interact with a switch to be tested through a corresponding communication interface;
and determining the test result of the communication interface of the switch to be tested according to the execution result of each network management switch on the test command.
Further, the device is also used for:
acquiring feedback signals of each network management switch to the test command within a preset time period;
for each network management switch, determining the total times of sending test commands to the network management switch in the preset time period;
and determining the execution result of the network management switch on the test command according to the magnitude relation between the number of times of passing the feedback signal and the total number of times.
Further, the device is also used for:
Responding to a switch configuration function test event, and sending a configuration instruction to a switch to be tested, wherein the configuration instruction is used for instructing the switch to be tested to write configuration information into an internal memory;
sending a display instruction to the switch to be tested, wherein the display instruction is used for indicating the switch to be tested to display current configuration information and reading back the current configuration information;
and determining a test result of the configuration function of the switch to be tested according to the current configuration information and the configuration instruction obtained after the readback.
Further, the device is also used for:
a control instruction is sent to a preset Programmable Logic Controller (PLC) for indicating the PLC to control the movement of the cylinder through a pulse signal; wherein, different cylinders are configured in different directions of the switch to be tested.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the switch automatic test method.
In some embodiments, the switch automatic test method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the switch automatic test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the switch automatic test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. An automatic test method for a switch, comprising:
responding to a switch port test event, determining an expected working state of a target port of the switch to be tested, and performing power supply control on the switch to be tested by utilizing at least two power supply probes;
in the process of controlling the power supply of the switch to be tested, determining the actual working state of the target port of the switch to be tested by detecting a switching plate; the destination port includes: a power supply port and an alarm port;
And determining a port test result of the switch to be tested according to the expected working state and the actual working state.
2. The method of claim 1, wherein determining the actual operating state of the switch under test destination port by detecting a switch board comprises:
acquiring a level signal of a target port of the switch to be detected through a detection switching board;
and determining the actual working state of the target port of the switch to be tested according to the level signal.
3. The method as recited in claim 1, further comprising:
responding to a switch communication interface test event, determining at least two target threads, calling the at least two target threads, and simultaneously sending test commands to at least two network management switches, wherein the test commands are used for indicating each network management switch to interact with a switch to be tested through a corresponding communication interface;
and determining the test result of the communication interface of the switch to be tested according to the execution result of each network management switch on the test command.
4. A method according to claim 3, further comprising:
acquiring feedback signals of each network management switch to the test command within a preset time period;
for each network management switch, determining the total times of sending test commands to the network management switch in the preset time period;
And determining the execution result of the network management switch on the test command according to the magnitude relation between the number of times of passing the feedback signal and the total number of times.
5. The method as recited in claim 1, further comprising:
responding to a switch configuration function test event, and sending a configuration instruction to a switch to be tested, wherein the configuration instruction is used for instructing the switch to be tested to write configuration information into an internal memory;
sending a display instruction to the switch to be tested, wherein the display instruction is used for indicating the switch to be tested to display current configuration information and reading back the current configuration information;
and determining a test result of the configuration function of the switch to be tested according to the current configuration information and the configuration instruction obtained after the readback.
6. The method as recited in claim 1, further comprising:
a control instruction is sent to a preset Programmable Logic Controller (PLC) for indicating the PLC to control the movement of the cylinder through a pulse signal; wherein, different cylinders are configured in different directions of the switch to be tested.
7. An automatic test equipment for a switch, comprising:
the control module is used for responding to the switch port test event, determining the expected working state of the switch target port to be tested, and utilizing at least two power supply probes to control the power supply of the switch to be tested;
The state determining module is used for determining the actual working state of the target port of the switch to be detected by detecting the switching plate in the process of controlling the power supply of the switch to be detected; the destination port includes: a power supply port and an alarm port;
and the result determining module is used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
8. An automatic test system for a switch, comprising: the system comprises a test host, a switch to be tested, a power supply probe and a detection switching board; the switch to be tested includes: a power supply port and an alarm port;
the method comprises the steps that a test host responds to a switch port test event, an expected working state of a target port of a switch to be tested is determined, and at least two power supply probes are utilized to control power supply of the switch to be tested;
the power supply probe is used for controlling the power supply of the switch to be tested; the power supply port of the switch to be tested is connected to the detection switching board through a power supply probe;
the test host is also used for determining the actual working state of the target port of the switch to be tested by detecting the switching board in the process of controlling the power supply of the switch to be tested; the destination port includes: a power supply port and an alarm port; the detection switching plate is connected with the test host;
The test host is also used for determining the port test result of the switch to be tested according to the expected working state and the actual working state.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the switch automatic test method of any one of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the switch automatic test method of any one of claims 1-6 when executed.
CN202310973875.9A 2023-08-04 2023-08-04 Automatic test method, device, system, equipment and medium for switch Pending CN116684343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310973875.9A CN116684343A (en) 2023-08-04 2023-08-04 Automatic test method, device, system, equipment and medium for switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310973875.9A CN116684343A (en) 2023-08-04 2023-08-04 Automatic test method, device, system, equipment and medium for switch

Publications (1)

Publication Number Publication Date
CN116684343A true CN116684343A (en) 2023-09-01

Family

ID=87779540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310973875.9A Pending CN116684343A (en) 2023-08-04 2023-08-04 Automatic test method, device, system, equipment and medium for switch

Country Status (1)

Country Link
CN (1) CN116684343A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117347755A (en) * 2023-09-27 2024-01-05 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine
CN117347755B (en) * 2023-09-27 2024-04-26 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725719A (en) * 2005-05-25 2006-01-25 杭州华为三康技术有限公司 Switch test device and switch test equipment
CN211791556U (en) * 2020-03-03 2020-10-27 深圳市共进电子股份有限公司 POE switch test circuit and POE switch accompany equipment of examining
CN113608514A (en) * 2021-06-21 2021-11-05 吉林大学 A test fixture for machine controller
CN115208807A (en) * 2022-09-14 2022-10-18 中兴系统技术有限公司 POE switch test system and method
CN116032812A (en) * 2022-12-23 2023-04-28 苏州浪潮智能科技有限公司 Multi-switch power supply test method and device, electronic equipment and storage medium
WO2023081337A1 (en) * 2021-11-04 2023-05-11 Communications Test Design, Inc. Systems and methods for automatically testing a network switch
CN116436833A (en) * 2023-04-12 2023-07-14 苏州浪潮智能科技有限公司 Fault diagnosis method, device and equipment in switch port test

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725719A (en) * 2005-05-25 2006-01-25 杭州华为三康技术有限公司 Switch test device and switch test equipment
CN211791556U (en) * 2020-03-03 2020-10-27 深圳市共进电子股份有限公司 POE switch test circuit and POE switch accompany equipment of examining
CN113608514A (en) * 2021-06-21 2021-11-05 吉林大学 A test fixture for machine controller
WO2023081337A1 (en) * 2021-11-04 2023-05-11 Communications Test Design, Inc. Systems and methods for automatically testing a network switch
CN115208807A (en) * 2022-09-14 2022-10-18 中兴系统技术有限公司 POE switch test system and method
CN116032812A (en) * 2022-12-23 2023-04-28 苏州浪潮智能科技有限公司 Multi-switch power supply test method and device, electronic equipment and storage medium
CN116436833A (en) * 2023-04-12 2023-07-14 苏州浪潮智能科技有限公司 Fault diagnosis method, device and equipment in switch port test

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117347755A (en) * 2023-09-27 2024-01-05 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine
CN117347755B (en) * 2023-09-27 2024-04-26 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine

Similar Documents

Publication Publication Date Title
CN107632219B (en) Automatic startup and shutdown test system and test method thereof
CN110716126A (en) Chip aging test system, method and device
CN112067970B (en) Plate intelligent test system with verification function
CN106526456B (en) Integrated circuit on-line testing device and testing method
CN112255562B (en) System and method for testing performance of direct-current power supply board card
CN112083310A (en) Intelligent plate testing system
CN106872849B (en) Equipment internal IO sampling method, device and system
CN108802627A (en) Test method, device, system and readable storage medium storing program for executing independently-powered BBU
CN116684343A (en) Automatic test method, device, system, equipment and medium for switch
CN202126476U (en) Audio connector detection device
CN106586028B (en) System for testing aviation component
CN116405408A (en) Automatic equipment inspection method, device, equipment and storage medium
CN116027226A (en) Component testing method and device, electronic equipment and storage medium
CN113589092B (en) Fatigue machine, equipment power-on and power-off test system and power-on and power-off test method
CN115184822A (en) HI-POT testing device with multi-channel switching and contact self-checking method thereof
CN115774220A (en) Test system and test device of multi-core cable
CN113009246A (en) PSE equipment detection device and PSE equipment detection method
CN112422371A (en) Big data-based computer network test system
CN104486779A (en) Slow clock test method for mobile communication terminal and test system thereof
CN215415747U (en) Automatic open/short circuit detection device for interface circuit board
CN115543679B (en) Liquid leakage detection line detection method, system, device, server and electronic equipment
CN114487898A (en) Power supply aging test method and device, electronic equipment and system thereof
CN108594105B (en) Detection method for control circuit of main board indicator light
CN115686969A (en) Hard disk backboard testing method, device, equipment and medium
CN117478539A (en) Binding stability testing method and device, upper computer and storage medium

Legal Events

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