An industrial switch automation testing method, system, device and storage medium
By including annotations in the switch automation test case file, scripts that skip executing erroneous features or remaining scripts can solve the problem of low switch testing efficiency and achieve a more efficient testing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳市三旺通信股份有限公司
- Filing Date
- 2023-05-31
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, with the increase in the functions of industrial switches and the expansion of script libraries, the efficiency of automated testing has decreased significantly, resulting in a longer defect feedback cycle and increased R&D time and cost.
By adding annotations to the scripts in the switch automation test case file, the system skips erroneous features or remaining scripts, and stops testing only when critical points fail multiple times, generating test results.
This reduces the number of execution scripts, improves the efficiency of automated testing of industrial switches, and shortens the testing cycle and R&D time.
Smart Images

Figure CN116668324B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of switch testing technology, and in particular to an automated testing method, system, device and storage medium for industrial switches. Background Technology
[0002] Industrial switches are the foundational equipment of the Industrial Internet. They can be divided into Layer 2 and Layer 3 switches, and involve many functional features and technical protocols such as MAC (Media Access Control) learning and forwarding, multicast learning and forwarding, route learning and forwarding, loop detection, link aggregation, VLAN (Virtual Local Area Network) isolation, DHCP (Dynamic Host Configuration Protocol) service, and VRRP (Virtual Router Redundancy Protocol) redundancy backup.
[0003] Industrial switches generally have mature software technology and offer command-line configuration methods, allowing users to configure their functions via serial port, Telnet (a remote control protocol for plaintext transmission), or SSH (Secure Shell, a remote control protocol for encrypted transmission). To automate the testing of industrial switches, current technologies typically use scripts to send configuration commands to the switch, control the tester to send corresponding test messages, and finally check the relevant entries in the switch's tables and the tester's packet transmission and reception.
[0004] like Figure 1 As shown, each line in the automated test case file stores an automated script. The automation platform executes the scripts for each functional feature in a top-down order, and the number of scripts can reach tens of thousands. Among them, the "Switch Configuration" column stores the configuration that needs to be sent to the switch when the current script is executed, and the "Test Script" column stores the packet sending and checking operations that the current script needs to perform.
[0005] In actual testing, it was found that the efficiency of automated testing decreases significantly as the number of functions of the switch increases and the script library becomes larger, resulting in a longer feedback cycle for switch defects and an increase in R&D time and cost. Summary of the Invention
[0006] In view of this, embodiments of this application provide an automated testing method, system, device, and storage medium for industrial switches, which can effectively solve the problem of long testing cycles for switches.
[0007] In a first aspect, embodiments of this application provide an automated testing method for industrial switches, including:
[0008] When testing the switch, the automated test case file of the switch is executed; wherein, the automated test case file includes several scripts, each script is derived based on the functional characteristics to be tested, and key points in some scripts are marked with annotation information;
[0009] If a script execution error occurs, the function corresponding to the current script with the marked information is skipped or the remaining scripts for the current function are no longer executed. Then, the remaining function features are tested, and the test results are generated and saved.
[0010] In some embodiments, the script includes a configuration command script and a test script; key points in the script are annotated with information including:
[0011] The configuration keywords in the first script of the configuration command script for each of the aforementioned functional features are marked with a first annotation;
[0012] And / or, for each of the aforementioned functional features, the B critical checkpoints in the first A scripts of the test script are marked with a second annotation.
[0013] In some embodiments, if a script execution error occurs, skipping the functional features corresponding to the current script with the labeled information includes:
[0014] When testing the switch, if the configuration command script is executed, the execution result of the configuration keyword marked with the first annotation is checked;
[0015] If the result is incorrect, the configuration keyword with the first annotation is marked and the execution of the function corresponding to the current configuration keyword is skipped.
[0016] In some embodiments, if a script execution error occurs, the remaining scripts for the currently described feature are no longer executed, including:
[0017] When testing the switch, if the test script of the automated test case file fails N times in the test script of the same functional feature with the critical checkpoint marked by the second annotation, then the remaining script of the current functional feature will not be executed in the current test.
[0018] In some embodiments, A≥B≥N≥2.
[0019] In some embodiments, the method further includes:
[0020] When testing the switch, if an error occurs in the Mth step of the test script, the remaining steps in the current test script are skipped.
[0021] In some embodiments, skipping the remaining steps in the current test script if an error occurs during the execution of the Mth step of the test script includes:
[0022] Check if the Mth step of the test script is correct;
[0023] If correct, verify whether the Mth step of the test script is forwarded according to the current process of the Mth step;
[0024] If not, then the remaining steps of the current test script will not be executed.
[0025] Secondly, embodiments of this application provide an automated testing system for industrial switches, comprising:
[0026] The execution module is used to execute the automated test case file of the switch when testing the switch; wherein, the automated test case file includes several scripts, each script is obtained based on the functional characteristics to be tested, and key points in some scripts are marked with annotation information;
[0027] The inspection module is used to skip the functional features corresponding to the current script with the labeled information or stop executing the remaining scripts of the current functional features if a script execution error occurs, so as to continue testing the remaining functional features and generate and save the test results.
[0028] Thirdly, embodiments of this application provide a testing apparatus, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the above-described automated testing method for industrial switches.
[0029] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, which, when executed on a processor, implements the aforementioned automated testing method for industrial switches.
[0030] The embodiments of this application have the following beneficial effects: In these embodiments, each script is generated based on the functional characteristics to be tested, and key points in some scripts are annotated. If a script execution error occurs, the functional characteristics corresponding to the current script with the annotated information are skipped, or the remaining scripts for the current functional characteristics are not executed, so as to continue testing the remaining functional characteristics and generate and save the test results. This method can reduce the number of scripts executed and improve the efficiency of automated testing of industrial switches. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 An example table of automation use case files in the prior art is shown;
[0033] Figure 2 A first flowchart of an automated testing method for industrial switches according to an embodiment of this application is shown;
[0034] Figure 3 An example table showing the first script in the configuration command script of this application embodiment has a first annotation;
[0035] Figure 4 This diagram illustrates a test script for a functional feature of an embodiment of this application, highlighting key checkpoints.
[0036] Figure 5 A second flowchart of an automated testing method for industrial switches according to an embodiment of this application is shown;
[0037] Figure 6 This illustration shows a keyword error message in the configuration command script according to an embodiment of this application.
[0038] Figure 7 This diagram illustrates a functional feature of an embodiment of this application where the remaining script is no longer executed;
[0039] Figure 8 A schematic diagram of the structure of an automated testing system for industrial switches according to an embodiment of this application is shown. Detailed Implementation
[0040] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0041] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0042] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0043] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0044] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0045] In existing technologies, scripts are typically used to send configuration commands to the switch and control the tester to send corresponding test messages. Finally, the relevant entries in the switch's tables and the packet transmission and reception status of the tester are checked. For example... Figure 1 As shown, each row stores an automation script. The automation platform executes these scripts sequentially from top to bottom, covering various functionalities. The number of scripts can reach tens of thousands. The "Switch Configuration" column stores the switch configuration commands that the current script needs to send to the switch, while the "Test Script" column stores the packet sending and checking operations that the current script needs to perform. In actual testing, it was found that the efficiency of automated testing decreases significantly as the switch's functionality increases and the script library grows larger, leading to longer defect feedback cycles and increased R&D time and costs.
[0046] Therefore, embodiments of this application provide an automated testing method, system, device, and storage medium for industrial switches.
[0047] The following examples illustrate the automated testing method for industrial switches.
[0048] Figure 2 A flowchart of an automated testing method for industrial switches according to an embodiment of this application is shown. Exemplarily, the automated testing method for industrial switches includes the following steps:
[0049] Step S100: When testing the switch, execute the switch's automated test case file; wherein, the automated test case file includes several scripts, each script is derived based on the functional characteristics to be tested, and some scripts have annotation information for key points.
[0050] In this step, the scripts for each feature include configuration command scripts and test scripts. When testing the switch, key points in the scripts are marked with information including:
[0051] The configuration keyword in the first script of the configuration command script for each feature is marked with a first annotation.
[0052] Specifically, such as Figure 3 As shown, each feature contains a configuration command script. For the first script in the configuration command script, such as "igmp snooping" which is the configuration keyword for the IGMP Snooping feature, "spanning-tree" which is the configuration keyword for the STP feature, and "dhcp service" which is the configuration keyword for the DHCP Server feature, these keywords are marked with a first annotation. For example, the first annotation can be a symbol, such as... Figure 3 Angle brackets “<>” are used as the first annotation. Figure 3 The rectangle indicating the first configuration keyword (i.e., the one set as the first annotation) can be understood as... Figure 3 The use of angle brackets "<>" as the first annotation in the configuration command script is merely illustrative. In actual use, other recognizable symbols such as "《》", "【】", and "{}" can be used, without limitation.
[0053] In addition to the first batch of annotations mentioned above, as an optional solution, a second annotation is set for the B critical checkpoints in the first A scripts of each functional feature's test script. Understandably, the first and second annotations can be set individually or simultaneously; this is not limited here.
[0054] Specifically, each functional feature's test script contains multiple critical checkpoints and multiple regular checkpoints. Generally, critical checkpoints are located early in the test script. If a critical checkpoint fails during switch testing, continuing to execute the remaining scripts following that functional feature is largely meaningless. Therefore, in this embodiment, the B critical checkpoints in the first A scripts of each functional feature's test script are marked with a second annotation. For example, Figure 4 This is a schematic diagram illustrating the marked key checkpoints in a test script for a certain functional feature of an embodiment of this application, such as... Figure 4 As shown, the second annotation can be an asterisk "*" mark ( Figure 4The oval box in the middle marks the script of the critical checkpoint, but it is not limited to the asterisk "*". It can also be "#", "@", "&" or other symbols as the second mark of the critical checkpoint.
[0055] Understandably, each test script will contain one or more checkpoints. The checkpoint function logMsg takes three parameters, the first of which is the actual test result (e.g., ...). Figure 4 The `sendCommand "show igmp snoopinggroups"` directive takes two arguments: the first argument being the desired result (e.g., `sendCommand "show igmp snoopinggroups"`). Figure 4 In "225.2.2.1"), the third parameter is the checkpoint description (e.g., Figure 4 (See "After sending the Report message, check the DUT's multicast table"). To distinguish between critical and ordinary checkpoints, we can identify critical checkpoints in the first few scripts of each feature and add a second annotation to the description of these checkpoints. Furthermore, it should be noted that... Figure 4 The image only shows the second marker for one critical checkpoint. In actual testing, the second marker is usually set for the B critical checkpoints in the first A scripts of each functional feature's test script, and A≥B≥2. The reason for setting multiple critical checkpoints is that if only one is set and an error occurs during the execution of this one critical checkpoint, misjudgment may occur. Therefore, for the accuracy of testing, the second marker is usually set for multiple critical checkpoints.
[0056] In step S200, if a script execution error occurs, skip the functional feature corresponding to the current script with annotation information or stop executing the remaining scripts of the current functional feature, and then continue testing the remaining functional features and generate and save the test results.
[0057] Specifically, when testing industrial switches, if the key points of each functional feature are being checked, and a script execution error occurs, the functional feature corresponding to the current script with marked information is skipped. This includes steps S210~S220:
[0058] In step S210, when testing the switch, if a configuration command script is executed, the execution result of the configuration keyword marked with the first annotation is checked.
[0059] Step S220: If the result is incorrect, skip the configuration keyword with the first annotation and mark it, and then select the functional feature corresponding to the current configuration keyword.
[0060] Specifically, when testing a switch, the automation platform checks the execution result of the configuration command script marked with the first annotation. If the switch reports an error when executing this command, it is considered that the switch does not support the corresponding functional feature. The configuration keyword marked with the first annotation is then marked, and subsequent scripts containing this configuration keyword will skip the execution of the corresponding functional feature.
[0061] Figure 6 This is a diagram illustrating errors related to configuring command script keywords. For example... Figure 6 As shown, a switch reported an error when executing the "igmpsnooping" command, indicating that the switch does not support this feature. Subsequent scripts containing this configuration keyword will skip executing any corresponding features.
[0062] Furthermore, the method also includes: when testing an industrial switch, if a script execution error occurs during the check of a key checkpoint of the test script for each functional feature, the remaining script for the current functional feature will not be executed.
[0063] Specifically, when testing a switch, if a critical checkpoint with a second annotation in the test script of the automated test case file fails N times, then the remaining scripts for the current functional feature will not be executed in the current test.
[0064] Where N is less than or equal to B and greater than or equal to 2; N being greater than or equal to 2 is mainly to avoid a misjudgment if only one critical checkpoint fails to execute, and if the feature is judged to have a problem. If two or more critical checkpoints of the feature fail to execute, the feature can be judged to have a serious defect, and the remaining scripts of the current feature will not be executed for the current test. Figure 7 The test results show that the IGMP Snooping feature has a serious defect: only two scripts were executed, and the other scripts for this feature were not executed, saving a lot of script execution time.
[0065] It is important to understand that when testing a switch, if the configuration keyword in the first script of the configuration command script for a feature is marked as the first annotation, and the automation platform detects an error in the execution of the configuration keyword in the first script of the configuration command script, then the feature with the same configuration keyword will be skipped, indicating that the switch does not support this feature.
[0066] Additionally, when testing a switch, if the automated test case file for the switch is executed, and the B critical checkpoints in the first A scripts of each functional feature's test scripts have a second annotation, then when testing the switch, if the critical checkpoints with the second annotation in the test scripts of the same functional feature fail N times, it indicates that this functional feature of the switch has a serious defect. In this case, continuing to execute the remaining scripts for that functional feature is not very meaningful, and the remaining scripts for the current functional feature will not be executed for the current test.
[0067] In actual testing, checking the execution results of configuration keywords in the first script of the configuration command script for a feature and checking the B key checkpoints in the first A scripts of each feature's test script can be done separately. For example, one method can be used alone, or both methods can be used simultaneously. When using both methods simultaneously, there is no fixed order in which they are used. You can first use the method of "checking the execution results of configuration keywords in the first script of the configuration command script for a feature", or you can first use the method of "checking the B key checkpoints in the first A scripts of each feature's test script".
[0068] Generally, it is recommended to use the method of "checking the execution result of the configuration keyword in the first script of the configuration command script for the feature" unconditionally; if there are many scripts, it is better to use both methods at the same time.
[0069] Both of these methods improve the execution strategy of the automation platform, reduce the number of scripts to be executed, and thus improve the testing efficiency of industrial switches.
[0070] In some embodiments, the method of this application further includes:
[0071] When testing a switch, if an error occurs in the Mth step of the test script, the remaining steps in the current test script are skipped.
[0072] Specifically, first check if the Mth step of the test script is correct; if correct, verify if the Mth step of the test script is forwarded according to the current Mth step's progress; if not, determine that the remaining steps of the current test script will not be executed.
[0073] Understandably, each test script will contain one or more checkpoints, interspersed with steps such as sending packets, capturing packets, unpacking packets, querying, and waiting. Most of these steps have a specific order; for example, first check if the switch's multicast table entries are correct, then verify if the multicast service flow is forwarded according to the multicast table entries. If the preceding multicast table entry check fails, there is no need to execute the subsequent time-consuming steps such as sending packets, capturing packets, and waiting, thus saving a significant amount of testing time.
[0074] It should be noted that when testing a switch, the instruction "If an error occurs in the Mth step of the test script, skip the remaining steps in the current test script" can be used together with the aforementioned "Check the execution result of the configuration keyword in the first script of the configuration command script for the functional feature" and "Check the B key checkpoints in the first A scripts of each functional feature's test script" or one of these methods. Alternatively, they can be used separately. When used together, there is no specific order between them and the aforementioned "Check the execution result of the configuration keyword in the first script of the configuration command script for the functional feature" and "Check the B key checkpoints in the first A scripts of each functional feature's test script". The order can be set according to actual needs.
[0075] This application embodiment annotates key points in some scripts obtained based on the functional characteristics to be tested. If a script execution error occurs, the functional characteristic corresponding to the current script with the annotated information is skipped, or the remaining scripts for the current functional characteristic are not executed. Then, the remaining functional characteristics are tested, and the test results are generated and saved. For example, the execution result of the configuration keyword in the first script of the configuration command script of a functional characteristic is checked, and / or the B key checkpoints in the first A scripts of each functional characteristic's test script are checked. If a script execution error occurs, the functional characteristic corresponding to the current script with the annotated information is skipped, or the remaining scripts for the current functional characteristic are not executed. Then, the remaining functional characteristics are tested. This method can reduce the number of scripts executed and improve the efficiency of automated testing of industrial switches.
[0076] Figure 8 A schematic diagram of an automated testing system for industrial switches according to an embodiment of this application is shown. Exemplarily, the automated testing system 100 for industrial switches includes:
[0077] The execution module 110 is used to execute the automated test case file of the switch when testing the switch. The automated test case file includes several scripts, each script is derived based on the functional characteristics to be tested, and some scripts have annotation information for key points.
[0078] The inspection module 120 is used to skip the functional features corresponding to the current script with annotation information or stop executing the remaining scripts of the current functional feature if a script execution error occurs, and then continue to test the remaining functional features and generate and save the test results.
[0079] It is understood that the device in this embodiment corresponds to the industrial switch automated testing method in the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0080] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the above-described industrial switch automated testing method or the above-described industrial switch automated testing system.
[0081] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0082] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0083] This application also provides a readable storage medium for storing the computer program used in the aforementioned terminal device.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0085] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0086] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An automated testing method for industrial switches, characterized in that, include: When testing the switch, the automated test case file of the switch is executed; wherein, the automated test case file includes several scripts, each script is derived based on the functional characteristics to be tested, and key points in some scripts are marked with annotation information; If a script execution error occurs, the function corresponding to the current script with the marked information is skipped or the remaining scripts for the current function are no longer executed. Then, the remaining function features are tested, and the test results are generated and saved. The script includes a configuration command script and a test script; the key points in the script are marked with annotation information, including: the configuration keywords in the first script of the configuration command script for each functional feature are marked with a first annotation; and / or, the B key checkpoints in the first A scripts of the test script for each functional feature are marked with a second annotation; If a script execution error occurs, the following steps are skipped: when testing the switch, if the configuration command script is executed, the execution result of the configuration keyword with the first annotation is checked; if the result is incorrect, the configuration keyword with the first annotation is marked and the execution of the function corresponding to the current configuration keyword is skipped. If a script execution error occurs, the remaining scripts for the current functional feature will not be executed, including: when testing the switch, if the test script of the automated test case file fails N times in the test script of the same functional feature with the second annotation, then the remaining scripts for the current functional feature will not be executed in the current test; where N≥2.
2. The automated testing method for industrial switches according to claim 1, characterized in that, in, A≥B≥N.
3. The automated testing method for industrial switches according to claim 1, characterized in that, The method further includes: When testing the switch, if an error occurs in the Mth step of the test script, the remaining steps in the current test script are skipped.
4. The automated testing method for industrial switches according to claim 3, characterized in that, The step of skipping the remaining steps in the current test script if an error occurs during the execution of the Mth step of the test script includes: Check if the Mth step of the test script is correct; If correct, verify whether the Mth step of the test script is forwarded according to the current process of the Mth step; If not, then the remaining steps of the current test script will not be executed.
5. An automated testing system for industrial switches, characterized in that, include: The execution module is used to execute the automated test case file of the switch when testing the switch; wherein, the automated test case file includes several scripts, each script is obtained based on the functional characteristics to be tested, and key points in some scripts are marked with annotation information; The inspection module is used to skip the functional features corresponding to the current script with the annotation information or stop executing the remaining scripts of the current functional features if a script execution error occurs, and then continue to test the remaining functional features and generate and save the test results. The script includes a configuration command script and a test script; the key points in the script are marked with annotation information, including: the configuration keywords in the first script of the configuration command script for each functional feature are marked with a first annotation; and / or, the B key checkpoints in the first A scripts of the test script for each functional feature are marked with a second annotation; If a script execution error occurs, the following steps are skipped: when testing the switch, if the configuration command script is executed, the execution result of the configuration keyword with the first annotation is checked; if the result is incorrect, the configuration keyword with the first annotation is marked and the execution of the function corresponding to the current configuration keyword is skipped. If a script execution error occurs, the remaining scripts for the current functional feature will not be executed, including: when testing the switch, if the test script of the automated test case file fails N times in the test script of the same functional feature with the second annotation, then the remaining scripts for the current functional feature will not be executed in the current test; where N≥2.
6. A testing apparatus, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the industrial switch automated testing method according to any one of claims 1-4.
7. A readable storage medium, characterized in that, It stores a computer program, which, when executed on a processor, implements the automated testing method for industrial switches according to any one of claims 1-4.