CN114978938A - Switch testing method, system and equipment - Google Patents

Switch testing method, system and equipment Download PDF

Info

Publication number
CN114978938A
CN114978938A CN202210588008.9A CN202210588008A CN114978938A CN 114978938 A CN114978938 A CN 114978938A CN 202210588008 A CN202210588008 A CN 202210588008A CN 114978938 A CN114978938 A CN 114978938A
Authority
CN
China
Prior art keywords
test
tested
switch
package
patch
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
CN202210588008.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.)
Xian Yep Telecommunication Technology Co Ltd
Original Assignee
Xian Yep Telecommunication Technology 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 Xian Yep Telecommunication Technology Co Ltd filed Critical Xian Yep Telecommunication Technology Co Ltd
Priority to CN202210588008.9A priority Critical patent/CN114978938A/en
Publication of CN114978938A publication Critical patent/CN114978938A/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/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • 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 application relates to the technical field of switches, in particular to a method, a system and equipment for testing a switch, wherein the method comprises the steps that a test server receives a test trigger instruction sent by a terminal, and a patch package corresponding to the switch to be tested is obtained from all patch packages prestored in the test server according to the test trigger instruction; compiling the software package to be tested and the patch package according to a compiling environment preset in the patch package to obtain a version package corresponding to the switch to be tested; and then sending the version packet and a test packet corresponding to the software packet to be tested to the switch to be tested for testing the version packet running in the switch to be tested. By the mode, the test server can automatically acquire the patch package corresponding to the switch to be tested according to the test trigger instruction, so that the software package to be tested and the patch package to be tested are compiled automatically, each step does not need to be triggered manually one by one, labor cost and time cost are effectively saved, and test efficiency of the switch to be tested is improved.

Description

Switch testing method, system and equipment
Technical Field
The present application relates to the field of switch technologies, and in particular, to a method, a system, and a device for testing a switch.
Background
In the era of rapid development of big data and cloud computing, the scale of a data center is continuously enlarged, and the demand on network switches is more and more. Therefore, there is a need to improve the efficiency of development and testing of network switches.
In the process of developing and testing an exchanger, the prior art is to connect an exchanger to be tested with a test host, test each function of the exchanger to be tested on the test host, before testing each function, send a test code to the exchanger to be tested, if an execution error of the test code is found, stop testing the function, eliminate a fault (debug) at the position where the error occurs, and restart the test of the function. According to the method, all the functional items are tested. However, this method requires manual operation, so that only one switch can be tested at a time, and when an error is found, manual troubleshooting is required, and then retesting is performed, which greatly reduces the efficiency of switch testing.
Based on this, there is a need for a method for testing a switch, which is used to improve the efficiency of testing the switch.
Disclosure of Invention
The application provides a switch testing method which is used for improving the efficiency of switch testing.
In a first aspect, the present application provides a switch testing method, including: receiving a test trigger instruction sent by a terminal, wherein the test trigger instruction is used for indicating the running condition of a software package to be tested in a switch to be tested; according to the test trigger instruction, acquiring a patch package corresponding to the switch to be tested from all patch packages prestored in the test server, wherein the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested; compiling the software package to be tested and the patch package according to a preset compiling environment in the patch package to obtain a version package corresponding to the switch to be tested; and sending the version packet and a test packet corresponding to the software packet to be tested to the switch to be tested, wherein the test packet is used for testing the version packet running in the switch to be tested.
By the mode, the test server can automatically acquire the patch package corresponding to the switch to be tested according to the test trigger instruction, so that the software package to be tested and the patch package to be tested are compiled automatically without manual compiling, and then the version package and the test package are sent to the switch to be tested, so that the version package is automatically operated to be tested. In the testing process, the testing packet can be automatically executed, manual triggering of each step one by one is not needed, testing of the switches to be tested can be automatically completed, labor cost and time cost are effectively saved, and meanwhile, the testing server can be used for butting a plurality of switches to be tested. By the technical means of the aspects, the testing efficiency of the switch to be tested is improved.
In a possible implementation manner, the method may be executed by taking the test server as an execution subject.
In a possible implementation manner, after the test server sends the version packet and the test packet corresponding to the software package to be tested to the switch to be tested, the method further includes: the test server acquires a preset test sequence corresponding to the software package to be tested; and the test server controls the switch to be tested to test the version packet by using the test packet according to the preset test sequence.
In the above mode, by setting the preset sequence, the switch to be tested can be controlled to automatically complete the test according to the test sequence without manual operation, and different test sequences can be preset according to different switches to be tested, so that the compatibility with the switch to be tested is improved.
In a possible implementation manner, the compiling, by the test server, the software package to be tested and the patch package according to a compiling environment preset in the patch package to obtain a version package corresponding to the switch to be tested includes: the test server generates a system configuration file and a test configuration file according to the test trigger instruction; and the test server calls the patch package to compile the software package to be tested and the test configuration file based on the system configuration file to obtain a version package corresponding to the switch to be tested.
In the above manner, the information in the test trigger instruction can be pre-stored by using the system configuration file, so that the test server can determine the type of the switch to be tested based on the test system configuration file, and further can call the patch package, thereby realizing automatic compilation of the software package to be tested and the test configuration file, reducing the repetitive consumption on manpower, and improving the test efficiency.
In a possible implementation manner, after controlling the switch to be tested to test the version packet by using the test packet, the method further includes: the test server sends the received test report sent by the switch to be tested to the terminal; the test report is generated by the switch to be tested based on an abnormal log in a test log in the test process; the test server receives a replacement instruction sent by the terminal; the replacing instruction is used for replacing the software package to be tested and/or the test package in the test server.
In the mode, the test process of the switch to be tested can be recorded through the log and the test report, the test process is not required to be stopped when the test is wrong, the test module with the mistake is specially cleared according to the test report after all tests are finished, and the test efficiency of the switch to be tested is effectively improved.
In a possible implementation manner, before the test server obtains the test trigger instruction sent by the terminal, the method further includes: the test server is pre-stored with at least one software package to be tested, a test package corresponding to the at least one software package to be tested and a corresponding preset test sequence; and aiming at any switch to be tested, the test server is prestored with a patch package corresponding to the switch to be tested.
In the above manner, the test server can directly obtain the test data in the system by pre-storing the software package to be tested, the test package and the preset test sequence without manually sending the test data to the test server, so that the convenience of testing the switch to be tested is improved.
In a second aspect, the present application provides another method for testing a switch, where the method includes receiving a version packet and a test packet corresponding to a software package to be tested, where the version packet is sent by a test server; the version package is obtained by compiling the software package to be tested and the patch package by the test server according to a preset compiling environment in the patch package; the patch package is a patch package which is determined to correspond to the switch to be tested from all patch packages prestored in the test server according to a test trigger instruction; the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested; the test triggering instruction is sent by a terminal and used for indicating the running condition of the to-be-tested software package in the to-be-tested switch to be tested; the switch to be tested tests the version package by using the test package based on a preset test sequence corresponding to the software package to be tested; the preset test sequence is sent to the switch to be tested by the test server.
In a possible implementation manner, the above method may be performed by using the switch to be tested as an execution subject.
In one possible implementation, the testing the version package using the test package includes: the switch to be tested tests the version packet by using the test packet and generates a test log; the switch to be tested generates a test report based on the abnormal log in the test log; and the switch to be tested sends the test report to the terminal through the test server.
In a third aspect, the present application provides a switch testing system, which includes a testing server and a switch under test for executing the method in the first aspect.
In a fourth aspect, the present application provides a test server, which includes a transceiver module, a configuration module, a compiling module, a deployment module, a server control module, and a storage module. The switch to be tested comprises a switch control module, a test module, a log module and a test report module.
The storage module is used for prestoring at least one software package to be tested, a test package corresponding to the at least one software package to be tested and a corresponding preset test sequence. And aiming at any switch to be tested, the patch package corresponding to the switch to be tested is prestored in the storage module.
The receiving and sending module is used for receiving a test triggering instruction sent by the terminal, and the test triggering instruction is used for indicating the running condition of the software package to be tested in the switch to be tested;
the configuration module is used for generating a system configuration file and a test configuration file according to the test triggering instruction; based on the system configuration file, calling the patch package to compile the software package to be tested and the test configuration file to obtain a version package corresponding to the switch to be tested, wherein the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested;
the compiling module is used for compiling the software package to be tested and the patch package according to a compiling environment preset in the patch package to obtain a version package corresponding to the switch to be tested and sending the version package to the deployment module;
the deployment module sends the version package and a test package corresponding to the software package to be tested to the switch to be tested; and then, the control module controls a switch control module in the switch to be tested, so that the test module uses the test packet to test the version packet.
The receiving and sending module is also used for sending the received test report sent by the switch to be tested to the terminal; the test report is generated by the switch to be tested based on an abnormal log in a test log in the test process; the receiving module is further configured to receive a replacement instruction sent by the terminal; the replacing instruction is used for replacing the software package to be tested and/or the test package in the test server.
In a fifth aspect, the present application provides a switch to be tested, where the switch to be tested includes a receiving module, a testing module, a log module, a test report module, and a switch control module. And in the test process of the switch to be tested, the interaction among the test module, the log module and the test report module is realized through the switch control module. And the test module tests the version packets according to the test and set sequence, records the execution result of each test instruction and the source code in the version packet corresponding to the test instruction with failed execution, and stores the source code in the log module. And after the test of the version packet is completed, the test report module generates a test report according to the content in the log module and sends the test report to the terminal through the server.
In a sixth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed, performs the method of any of the above first aspects.
In a seventh aspect, the present application provides a computing device comprising: a memory for storing program instructions; and the processor is used for calling the program instructions stored in the memory and executing the method in any one of the designs of the first aspect according to the obtained program.
In an eighth aspect, the present application provides a computer program product for implementing the method as designed in any one of the first aspects above when the computer program product is run on a processor.
The advantageous effects of the second aspect to the eighth aspect may specifically refer to the advantageous effects that can be achieved by any one of the designs of the first aspect, and are not described in detail herein.
Drawings
Fig. 1 schematically illustrates a scenario provided by an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a switch testing method provided by an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating another switch testing method provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating an architecture of a switch test system provided in an embodiment of the present application;
fig. 5 is a schematic diagram illustrating an architecture of a test server provided by an embodiment of the present application;
fig. 6 schematically illustrates a fabric diagram of a switch under test according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Fig. 1 schematically illustrates a scenario provided in an embodiment of the present application. As shown in fig. 1, the scenario in the embodiment of the present application includes a terminal 110, a switch 121 to be tested, a switch 1221 to be tested, a switch 1222 to be tested, and a test server 130. In the first mode, the terminal 110 is directly connected to the switch 121 to be tested, and the connection mode may be a wired connection or a wireless connection. In the second method, the terminal 110 is first connected to the test server 130, and the test server 130 is further connected to the switch under test 1221 and the switch under test 1222. In this connection method, since there are many ports on the server, many switches to be tested can be connected when performing wired connection or wireless connection with the switch to be tested 1221 and the switch to be tested 1222. Meanwhile, terminal 110 may communicate with switch under test 1221 and switch under test 1222 through test server 130.
Based on the scenario in fig. 1, after the hardware of the switch 121 to be tested is assembled, the switch 121 to be tested needs to test software functions of the switch 121 to be tested that are strongly related to the hardware, so as to ensure that the software can normally run in the existing hardware environment, and this process is called a bridging up test stage. For example, the circuit structure in the switch 121 under test needs to be tested to ensure that the power-on or power-off function of the circuit is normal. In the prior art, the switch 121 under test is mainly tested in the first mode.
The specific test procedures are described below:
the method comprises the following steps: the switch 121 to be tested is connected to the terminal 110. The connection mode may be a wired connection between the port of the switch 121 to be tested and the port of the terminal 110, or a wireless connection through a wireless network, bluetooth, or the like.
Step two: the tester compiles the initial software package according to the model of the switch 121 to be tested through the terminal 110, so that the software package is matched with the model of the switch 121 to be tested.
Step three: the compiled software package is installed on the switch 121 under test.
Step four: and testing each functional module in the software package one by a tester.
For example, first, a test code is sent to the functional module in the software package to test the function of the first functional module. And if errors occur in the process of running the test codes by the first functional module, stopping testing the first functional module, modifying the position where the errors occur, and testing the first functional module again after the modification is completed until all the functional modules are tested.
Step five: and determining that all functional modules of the switch 121 to be tested are normal, and ending the bridging up test stage.
In the first to fifth steps, the tester mainly controls each test process through the terminal, and the method comprises compiling an initial software package, installing the compiled software package on the switch to be tested, and manually completing the test of each functional module by the tester, so that the test efficiency is low, and a plurality of switches to be tested cannot be tested simultaneously.
The switch testing method is provided based on the application, the switches can be tested in batches, and the testing efficiency is improved.
Continuing with the scenario illustrated in fig. 1 as an example, terminal 110, test server 130, switch under test 1221, and switch under test 1222 may be connected in the manner described above. For the switch to be tested 1221 and the switch to be tested 1222, the switches may be divided into different series due to different types of chips, and for the switches in the same series, the switches may be divided into multiple types. Switch under test 1221 and switch under test 1222 in fig. 1 can be either different series of switches or the same series of switches; the switches can be the same type of switch in the same series, and can also be different types of switches in the same series.
The method comprises the steps that at least one software package to be tested, a test package corresponding to the at least one software package to be tested and a corresponding preset test sequence are prestored in a test server; for any switch to be tested, a patch package corresponding to the switch to be tested is prestored in the test server.
Specifically, the test server may be a software package with various functions, such as software package a, software package B, and software package C, pre-installed in the terminal or in other manners. These packages may be installed on different switches and need to be tested in order to ensure reliable operation of the packages on the switches. That is, each software package may be the above-mentioned software package to be tested. In order to test the software package, corresponding test packages are required, that is, the test package a corresponding to the software package a, the test package B corresponding to the software package B, and the test package C corresponding to the software package C. More specifically, the software package may include a plurality of functional modules, in order to implement testing of the plurality of functional modules, different testing modules are correspondingly disposed in the testing package, and an operation sequence of the testing modules is controlled by a preset testing sequence.
Correspondingly, the same series of switches to be tested can use the same software package to be tested and the same test package; or configuring different software packages and test packages to be tested for the switches to be tested in the same series according to different types of the switches.
The role of the patch package is described below:
in a possible implementation manner, the patch package may include a modification code, and the test server may modify the initial code in the software package to be tested using the modification code, so that the software package to be tested may be installed on the switch to be tested.
In another possible implementation manner, the patch package may include a replacement code, and the test server uses the replacement code in the patch package to replace the original code in the software package to be tested, so that the software package to be tested can be adapted to the switch to be tested. Fig. 2 is a schematic flow chart illustrating a switch testing method according to an embodiment of the present application. As shown in fig. 2, the method includes:
step 201, the test server receives a test trigger instruction sent by the terminal, where the test trigger instruction is used to instruct the test on the running condition of the software package to be tested in the switch to be tested.
In step 201, the same initial software package to be tested and the same test package may be used by the switches to be tested of the same series; or configuring different software packages and test packages to be tested for the switches to be tested in the same series according to different types of the switches.
Taking the switch to be tested 1221 as an example, the test trigger instruction may include a series identifier and/or a model identifier of the switch to be tested 1221, and the test server 130 may determine the switch to be tested 1221 according to the identifiers. In addition, the test trigger instruction may further include an IP address of the switch to be tested 1221, which is used to connect with the switch to be tested 1221, so as to implement communication.
Step 202, the test server obtains a patch package corresponding to the switch to be tested from each patch package prestored in the test server according to the test trigger instruction, wherein the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested.
For example, the test server 130 may determine that the switch 1221 to be tested is the switch a to be tested according to the model identifier of the switch 1221 to be tested, and then obtain the patch packet a corresponding to the switch 1221 to be tested from the pre-stored patch packets. It should be understood that, since the test server 130 may be connected to a plurality of models of switches under test 1221, in the process, the test server 130 also obtains patch packages corresponding to other models of switches under test 1221.
And 203, the test server compiles the software package to be tested and the patch package according to a preset compiling environment in the patch package to obtain a version package corresponding to the switch to be tested.
The patch package obtained in step 202 further includes a compiling environment corresponding to the switch to be tested 1221. For example, a compilation environment a may be included in patch package a. The software package under test corresponding to the switch under test 1221 can be compiled only in the compiling environment corresponding to the switch under test 1221.
For example, the series identifier and/or the model identifier of the switch 1221 to be tested may be stored in a system configuration file, and the test server 130 may extract the series identifier or the model identifier of the switch in the test trigger instruction and store the extracted series identifier or model identifier in the system configuration file and the test configuration file, and then call the patch package to compile the software package to be tested and the test configuration file based on the system configuration file, so as to obtain a version package corresponding to the switch 1221 to be tested.
Still taking the example in the step 202 as an example, the test server 130 uses the replacement code a in the patch package a to replace the original code in the software package to be tested, so as to obtain the software package a to be tested, and compiles the software package a to be tested in the compiling environment a, so as to obtain the version package a corresponding to the switch 1221 to be tested.
And 204, the test server sends the version packet and a test packet corresponding to the software packet to be tested to the switch to be tested, wherein the test packet is used for testing the version packet running in the switch to be tested.
For the testing process after step 204, one way to implement this is that the testing server obtains a preset testing sequence corresponding to the software package to be tested, and controls the switch to be tested 1221 to test the version package using the testing package according to the preset testing sequence. Another way to implement this is that the test server 130 obtains a preset test sequence corresponding to the to-be-tested software package, sends the preset test sequence to the to-be-tested switch 1221, and the control unit of the to-be-tested switch 1221 controls the test process of the test unit of the to-be-tested switch.
Still taking the switch a to be tested as an example, the switch a to be tested corresponds to a test package a, the test package a may include a plurality of test files, one test file may test one functional module in the software package a, may also test a plurality of functional modules, and may also test one functional module by a plurality of test files.
Assuming that the software package a to be tested corresponding to the switch a to be tested includes a first functional module, a second functional module, a third functional module and a fourth functional module, the preset test sequence may be as follows:
presetting a test sequence I: serially testing the functional module I, the functional module II, the functional module III and the functional module IV in sequence;
presetting a second test sequence: testing four functional modules in parallel;
presetting a test sequence three: and testing the second functional module, testing the first functional module and the third functional module in parallel, and finally testing the fourth functional module.
It should be understood that the above-mentioned predetermined test sequence is only an example, and any predetermined test sequence that can complete the test of the version package falls within the protection scope of the present invention, and is not described herein any further.
It should be noted that, when there is an initialization function module in the function modules, the initialization function module may be preferentially tested. Because the initialization function module is used for initializing all the function modules, the normal state of the initialization function module is ensured, and the smooth execution of the rest test processes is facilitated.
Assuming that the predetermined test server 130 controls the switch under test 1221 to test the version packet according to the test sequence, i.e., using the test packet, the following describes a specific test procedure:
fig. 3 is a schematic flowchart illustrating another switch testing method provided in the embodiment of the present application; as shown in fig. 3, the process includes:
in step 301, the switch to be tested 1221 tests the version packet using the test packet, and generates a test log.
Still taking the example in the step 202 as an example, the switch a to be tested uses the test packet a to test the version packet a according to the first preset test sequence, first, the first function module is tested, a log is generated in the test process, and the log is used to record the result of each logic execution and the position in the version packet a corresponding to the logic that fails to execute, for example, the test file is used to test the first function module, the log records the success of the first logic execution in the first test file, and the log records the position in the version packet a corresponding to the second logic that fails to execute. And after the logic execution fails in the test file one, terminating the execution of the test file one. And continuously testing the second functional module, and referring to the execution mode of the first test file until all the functional modules are tested.
It should be noted that, in the above example, since the test file is only used for testing the functional module one, the execution of the test file one is terminated after the logic which fails to execute exists in the test file one, but this does not mean that the test of the functional module is terminated once the logic has an execution error, and the next logic can still be executed after the previous logic has an execution error.
Step 302, the switch to be tested 1221 generates a test report based on the abnormal log in the test log.
In step 301, the exception log is generated when the functional module is tested, so that an exception is displayed in the test report.
In step 303, the switch to be tested 1221 sends the test report to the terminal through the test server 130.
Step 304, the test server 130 receives a replacement instruction sent by the terminal;
step 305, the test server 130 replaces the software package to be tested and/or the test package according to the replacement instruction.
For example, the replacement instruction may be generated when the terminal 110 debugs an abnormal function module, and the replacement instruction may include a modification instruction for an abnormal portion in the software package to be tested, and may also include a modification instruction for the modification instruction to the test package.
Step 306, the test server 130 sends a test instruction to the switch to be tested 1221;
in step 307, the switch under test 1221 re-executes the above steps 301 and 304 according to the test instruction.
By the mode, the system configuration file and the test file can be automatically output, automatic compiling is realized according to the type of the switch 1221 to be tested, and labor cost is greatly saved. In addition, batch testing of the to-be-tested switch 1221 can be realized, the testing efficiency is improved, and the time cost of switch testing is saved.
Based on the same technical concept, the embodiment of the application also provides a switch testing system. Fig. 4 exemplarily shows a schematic diagram of a switch test system architecture provided by an embodiment of the present application, where the switch test system 100 may be used for executing the foregoing switch test method, as shown in fig. 4, the system includes a terminal 110, a test server 130, and a switch under test 1221.
Fig. 5 is a schematic diagram illustrating an architecture of a test server according to an embodiment of the present application, and as shown in fig. 5, the test server 130 includes a transceiver module 131, a configuration module 132, a compiling module 133, a deployment module 134, a server control module 135, and a storage module 136.
The storage module 136 is configured to pre-store at least one software package to be tested, a test package corresponding to the at least one software package to be tested, and a corresponding preset test sequence. For any switch to be tested, the patch package corresponding to the switch to be tested is prestored in the storage module 136.
The transceiver module 131 is configured to receive a test trigger instruction sent by the terminal 110, where the test trigger instruction is used to instruct the running state of the to-be-tested software package in the to-be-tested switch 1221 to be tested;
the configuration module 132 is configured to generate a system configuration file and a test configuration file according to the test trigger instruction; based on the system configuration file, the patch package is called to compile the software package to be tested and the test configuration file to obtain a version package corresponding to the switch to be tested, and the patch package is used for realizing the adaptation of the software package to be tested and the switch 1221 to be tested;
the compiling module 133 is configured to compile the to-be-tested software package and the patch package according to a compiling environment preset in the patch package, obtain a version package corresponding to the to-be-tested switch 1221, and send the version package to the deployment module 134;
the deployment module 134 sends the version package and the test package corresponding to the software package to be tested to the switch 1221 to be tested; then, the server control module 135 is remotely connected to the switch control module 1226 of the switch to be tested 1221, and the server control module 135 controls the switch control module 1226 in the switch to be tested 1221, so that the test module 1223 uses the test packet to test the version packet.
The transceiver module 131 is further configured to send the received test report sent by the switch to be tested to the terminal; the test report is generated by the switch to be tested based on an abnormal log in a test log in the test process; the receiving module is further used for receiving a replacing instruction sent by the terminal; the replacing instruction is used for replacing the software package to be tested and/or the test package in the test server.
Fig. 6 exemplarily illustrates a schematic architecture diagram of a switch under test according to an embodiment of the present application, and as shown in fig. 6, a switch under test 1221 includes a receiving module 1227, a testing module 1223, a logging module 1224, a test reporting module 1225, and a switch control module 1226. During the testing process, the switch to be tested 1221 implements the interaction among the testing module 1223, the log module 1224, and the test report module 1225 through the switch control module 1226. The test module 1223 tests the version packets according to the test setting order, and records the execution result of each test instruction and the source code in the version packet corresponding to the test instruction that fails to be executed, and stores the source code in the log module 1224. After the test on the version packet is completed, the test report module 1225 generates a test report according to the contents in the log module 1224 and transmits the test report to the terminal 110 through the server 130.
Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium, which when running on a processor implements the method illustrated in fig. 2 or fig. 3.
Based on the same technical concept, an embodiment of the present invention further provides a computing device, including: a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method illustrated in the figure 2 or the figure 3 according to the obtained program.
Based on the same technical concept, the embodiment of the present invention also provides a computer program product, which when running on a processor implements the method as illustrated in fig. 2 or fig. 3.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
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 spirit and 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 (10)

1. A method for testing a switch, characterized in that,
receiving a test trigger instruction sent by a terminal, wherein the test trigger instruction is used for indicating the running condition of a software package to be tested in a switch to be tested;
according to the test trigger instruction, acquiring a patch package corresponding to the switch to be tested from all patch packages prestored in the test server, wherein the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested;
compiling the software package to be tested and the patch package according to a preset compiling environment in the patch package to obtain a version package corresponding to the switch to be tested;
and sending the version packet and a test packet corresponding to the software packet to be tested to the switch to be tested, wherein the test packet is used for testing the version packet running in the switch to be tested.
2. The method of claim 1,
after sending the version package and the test package corresponding to the software package to be tested to the switch to be tested, the method further comprises the following steps:
acquiring a preset test sequence corresponding to the to-be-tested software package;
and controlling the switch to be tested to test the version packet by using the test packet according to the preset test sequence.
3. The method as claimed in claim 1, wherein compiling the software package to be tested and the patch package according to a preset compiling environment in the patch package to obtain a version package corresponding to the switch to be tested, includes:
generating a system configuration file and a test configuration file according to the test trigger instruction;
and calling the patch package to compile the software package to be tested and the test configuration file based on the system configuration file to obtain a version package corresponding to the switch to be tested.
4. The method of claim 2, wherein after controlling the switch under test to test the version packet using the test packet, further comprising:
sending the received test report sent by the switch to be tested to the terminal; the test report is generated by the switch to be tested based on an abnormal log in a test log in the test process;
receiving a replacing instruction sent by the terminal; the replacing instruction is used for replacing the software package to be tested and/or the test package in the test server.
5. The method according to any one of claims 1 to 4, wherein before acquiring the test trigger instruction sent by the terminal, the method further comprises:
at least one software package to be tested, a test package corresponding to the at least one software package to be tested and a corresponding preset test sequence are prestored;
and aiming at any switch to be tested, the test server is prestored with a patch package corresponding to the switch to be tested.
6. A method for testing a switch, characterized in that,
receiving a version package sent by a test server and a test package corresponding to a software package to be tested; the version package is obtained by compiling the software package to be tested and the patch package by the test server according to a preset compiling environment in the patch package; the patch package is a patch package which is determined to correspond to the switch to be tested from all patch packages prestored in the test server according to a test trigger instruction; the patch package is used for realizing the adaptation of the software package to be tested and the switch to be tested; the test triggering instruction is sent by a terminal and used for indicating the running condition of the to-be-tested software package in the to-be-tested switch to be tested;
the switch to be tested tests the version package by using the test package based on a preset test sequence corresponding to the software package to be tested; and the preset test sequence is sent to the switch to be tested by the test server.
7. The method of claim 6, wherein testing the version package using the test package comprises:
the machine uses the test packet to test the version packet and generate a test log;
generating a test report based on abnormal logs in the test logs;
and sending the test report to the terminal through the test server.
8. A switch test system, characterized in that the system comprises a test server for performing the method of any of claims 1 to 5 and a switch under test for performing the method of claim 6 or 7.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed, performs the method according to any one of claims 1-7.
10. A computing device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to execute the method of any one of claims 1 to 7 in accordance with the obtained program.
CN202210588008.9A 2022-05-26 2022-05-26 Switch testing method, system and equipment Pending CN114978938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210588008.9A CN114978938A (en) 2022-05-26 2022-05-26 Switch testing method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210588008.9A CN114978938A (en) 2022-05-26 2022-05-26 Switch testing method, system and equipment

Publications (1)

Publication Number Publication Date
CN114978938A true CN114978938A (en) 2022-08-30

Family

ID=82955870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210588008.9A Pending CN114978938A (en) 2022-05-26 2022-05-26 Switch testing method, system and equipment

Country Status (1)

Country Link
CN (1) CN114978938A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714003A (en) * 2013-12-31 2014-04-09 深圳市共进电子股份有限公司 Terminal gateway equipment software automatic pretesting method
CN104133767A (en) * 2014-07-23 2014-11-05 天脉聚源(北京)科技有限公司 Software development process supervising method and software development process supervising device
CN104901830A (en) * 2015-05-12 2015-09-09 武汉烽火网络有限责任公司 FPGA online upgrade method in exchanger device, device thereof and system thereof
WO2017000429A1 (en) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 Software automation test method and device
US20170075676A1 (en) * 2015-09-14 2017-03-16 Quanta Computer Inc. Rack server device firmware update using network switch
CN106953746A (en) * 2017-02-28 2017-07-14 努比亚技术有限公司 Clustered node upgrade-system and method
CN107506647A (en) * 2017-07-28 2017-12-22 努比亚技术有限公司 Leak self-repairing method and mobile terminal
EP3734445A1 (en) * 2019-04-30 2020-11-04 Inventio AG Secure and reliable remote update of a control device in an elevator
CN112118132A (en) * 2020-09-11 2020-12-22 苏州浪潮智能科技有限公司 Method, device and equipment for upgrading switch firmware and readable medium
CN112131099A (en) * 2020-08-12 2020-12-25 新华三大数据技术有限公司 Version upgrading test method and device
CN113553088A (en) * 2021-06-28 2021-10-26 深圳云之家网络有限公司 Patch package distribution method and device, computer equipment and storage medium
CN114020632A (en) * 2021-11-10 2022-02-08 建信金融科技有限责任公司 Equipment type selection test method and device, electronic equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714003A (en) * 2013-12-31 2014-04-09 深圳市共进电子股份有限公司 Terminal gateway equipment software automatic pretesting method
CN104133767A (en) * 2014-07-23 2014-11-05 天脉聚源(北京)科技有限公司 Software development process supervising method and software development process supervising device
CN104901830A (en) * 2015-05-12 2015-09-09 武汉烽火网络有限责任公司 FPGA online upgrade method in exchanger device, device thereof and system thereof
WO2017000429A1 (en) * 2015-06-30 2017-01-05 中兴通讯股份有限公司 Software automation test method and device
CN106326100A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Software automatic testing method and device
US20170075676A1 (en) * 2015-09-14 2017-03-16 Quanta Computer Inc. Rack server device firmware update using network switch
CN106953746A (en) * 2017-02-28 2017-07-14 努比亚技术有限公司 Clustered node upgrade-system and method
CN107506647A (en) * 2017-07-28 2017-12-22 努比亚技术有限公司 Leak self-repairing method and mobile terminal
EP3734445A1 (en) * 2019-04-30 2020-11-04 Inventio AG Secure and reliable remote update of a control device in an elevator
CN112131099A (en) * 2020-08-12 2020-12-25 新华三大数据技术有限公司 Version upgrading test method and device
CN112118132A (en) * 2020-09-11 2020-12-22 苏州浪潮智能科技有限公司 Method, device and equipment for upgrading switch firmware and readable medium
CN113553088A (en) * 2021-06-28 2021-10-26 深圳云之家网络有限公司 Patch package distribution method and device, computer equipment and storage medium
CN114020632A (en) * 2021-11-10 2022-02-08 建信金融科技有限责任公司 Equipment type selection test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105912356B (en) A kind of optical module firmware program on-line upgrading method for supporting version rollback
CN111651366B (en) SDK test method, device, equipment and storage medium
CN112084113B (en) Configurable automatic test method and system based on embedded simulation verification software
CN103412817B (en) Automatic test script Off Line Debugging Method and system
CN110688313B (en) Fault injection method for software testing under VxWorks operating system
KR102141287B1 (en) Fault injection test method and system for vehicle software based on autosar
CN107329889B (en) Method for automatically testing C compiler
CN102831058B (en) Testing method and testing device
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN111611157B (en) GMS continuous integration construction automatic test method and system
CN110941520B (en) Hardware function test system and method based on two-out-of-two safety control unit
CN110928556A (en) Automatic program burning method and device for railway vehicle, and testing method and system
CN110198222B (en) Plug-and-play test method and test master station for power distribution automation terminal
US11789851B2 (en) Offline debugging method
CN113051115A (en) Integrated testing method and system for FT and EQC of chip
CN113127329B (en) Script debugging method and device and computer storage medium
CN111078476B (en) Network card drive firmware stability test method, system, terminal and storage medium
KR102279776B1 (en) AUTOSAR BSW testing automation system and testing method thereof
CN114978938A (en) Switch testing method, system and equipment
CN110297753A (en) A kind of method and system for verifying software version
CN111628910A (en) TTCN software testing system of cellular communication terminal protocol stack
US20220138083A1 (en) Method for operating a control unit when testing software of the control unit, and method for operating a test computer when testing software of a control unit
CN115470141A (en) Fault simulation method, device and related equipment
CN100359485C (en) Testing device and method for flush-bonding system
KR20060098679A (en) A system for checking a system in communication system and system method thereof

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