Industrial control equipment interface test system, test method and test platform
By using the unified configuration management and comprehensive analysis report module of the industrial control equipment interface testing system, the problem of cumbersome testing processes in existing technologies has been solved, and the depth and accuracy of automated testing and fault diagnosis of various interfaces have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU HAITE AUTOMATION EQUIP CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-05-01
AI Technical Summary
Existing industrial control equipment interface testing methods rely on a variety of separate testing tools, resulting in cumbersome and inefficient testing processes that lack uniformity and automation.
An industrial control equipment interface testing system is provided, including a unified configuration management module, a central test scheduling engine, a multi-source test adapter layer, and a comprehensive analysis report module. Through graphical interface configuration and dynamic invocation of test adapters and comprehensive analysis report module, automated testing of various heterogeneous interfaces can be achieved.
It significantly improves testing efficiency and the depth and accuracy of fault diagnosis, ensures the uniqueness and accuracy of test targets, and provides reliable data support.
Smart Images

Figure CN121956958A_ABST
Abstract
Description
An industrial control equipment interface testing system, testing method and testing platform Technical Field
[0001] This application relates to the field of industrial automation testing technology, and in particular to an industrial control equipment interface testing system, testing method and testing platform. Background Technology
[0002] Currently, industrial control equipment serves as the core of industrial automation systems, and its stability and reliability are crucial to the normal operation of the entire system. Various external interfaces of industrial control equipment, such as serial ports, network ports, USB ports, and GPIO interfaces, are key channels for interaction with the outside world. Therefore, conducting comprehensive testing of the functionality of all interfaces before the industrial control equipment leaves the factory is a necessary step to ensure product quality.
[0003] When performing interface testing on industrial control equipment, different dedicated testing tools or software are typically required for different types of interfaces. For example, testers may use a serial port debugging assistant to verify the serial port's data transmission and reception functions, use network throughput testing tools such as Iperf to evaluate the network port's performance, and may need to write ad-hoc scripts to control and monitor the level states of GPIO pins. The entire process requires testers to manually switch between multiple independent software interfaces, configure test parameters separately, and independently record the test results.
[0004] The existing technical solutions mentioned above have the following drawbacks: the existing industrial control equipment interface testing methods rely on a variety of separate testing tools and require a lot of manual intervention, resulting in a cumbersome and inefficient overall testing process, and therefore there is room for improvement. Summary of the Invention
[0005] To improve the comprehensiveness and accuracy of interface testing for industrial control equipment, this application provides an interface testing system, testing method, and testing platform for industrial control equipment.
[0006] To achieve the above objectives, the first aspect of this application provides an industrial control equipment interface testing system, the industrial control equipment interface testing system comprising:
[0007] The unified configuration management module provides a graphical interface for users to define the interfaces and corresponding test parameters of the industrial control equipment under test and obtain configuration information.
[0008] The central test scheduling engine is used to parse the configuration information in the unified configuration management module, create and manage test task queues according to interface types, and dynamically call the test adapters corresponding to the interface types.
[0009] A multi-source test adapter layer, comprising test adapters for testing different interface types of the industrial control device under test, wherein each test adapter receives test instructions from the central test scheduling engine, performs tests according to the test instructions, and generates test results;
[0010] The comprehensive analysis report module is used to receive and summarize the test results sent from all test adapters in the multi-source test adapter layer, and perform data correlation and analysis based on the test results to generate a comprehensive test report.
[0011] By adopting the above technical solutions, a graphical interface is provided through the unified configuration management module, and the central test scheduling engine parses configuration information and dynamically calls the corresponding test adapters. This integrates the testing processes for various heterogeneous interfaces into an automated unified platform, significantly improving testing efficiency. In addition, by executing specific tests through a multi-source test adapter layer and performing data correlation analysis through a comprehensive analysis report module, standardized management and intelligent analysis of test results can be achieved. This improves the depth and accuracy of fault diagnosis and solves the problem of isolated test results that are difficult to analyze systematically.
[0012] A second aspect of this application provides a testing method for an industrial control equipment interface testing system, applied to the industrial control equipment interface testing system of the first aspect, the testing method comprising:
[0013] Obtain the configuration information of the industrial control device under test, and identify the interface type and test parameters of the industrial control device under test from the configuration information;
[0014] The interface type is identified from the configuration information. Based on the category of the interface type, the corresponding interface testing strategy is invoked. According to the interface testing strategy and the test parameters, the interface test is performed on the industrial control device under test, and the test results are obtained.
[0015] A comprehensive test report is generated based on the test results.
[0016] By adopting the above technical solutions and acquiring the configuration information of the industrial control equipment under test, a unified and clear input source can be provided for the entire automated testing process, thereby ensuring the uniqueness and accuracy of test objectives and standards. By calling the corresponding interface test strategies based on the interface type, targeted and professional testing of different interfaces can be achieved, thereby ensuring the effectiveness and comprehensiveness of the test. By generating a comprehensive test report based on the test results, the output of the test process can be solidified and presented in a structured manner, thereby providing reliable data support for product quality traceability and subsequent technical improvements.
[0017] Optionally, the step of obtaining the configuration information of the industrial control device under test and identifying the interface type and test parameters of the industrial control device under test from the configuration information specifically includes:
[0018] Obtain the device configuration file imported by the user, and based on the device configuration file, determine the interface list and corresponding interface types of the industrial control device under test;
[0019] In response to the test plan selected by the user, the test parameters are obtained, and the test plan includes at least a preset test plan and a custom test plan.
[0020] By adopting the above technical solution and obtaining the device configuration file imported by the user, all interfaces of the industrial control computer under test can be identified, thereby avoiding the inefficiency and errors of manual inventory and manual input. By responding to the test plan selected by the user to obtain test parameters, the test process can be given a high degree of flexibility. It can achieve rapid and standardized testing through preset plans, and can also meet the needs of in-depth and specific R&D verification through customized plans, thus balancing test efficiency and test flexibility.
[0021] Optionally, the step of identifying the interface type from the configuration information, invoking the corresponding interface testing strategy based on the interface type category, performing interface testing on the industrial control device under test according to the interface testing strategy and the test parameters, and obtaining the test results specifically includes:
[0022] When the type of the interface is a serial port interface, the corresponding interface test strategy is called as the serial port interface test strategy, and the test result obtained is the serial port test result.
[0023] When the type of the interface is a network interface, the corresponding interface test strategy is called as the network interface test strategy, and the test result obtained is the network interface test result.
[0024] When the interface type is USB interface, the corresponding interface test strategy is called as the USB interface test strategy, and the test result obtained is the USB interface test result.
[0025] When the interface type is GPIO interface, the corresponding interface test strategy is called as GPIO interface test strategy, and the test result obtained is GPIO interface test result.
[0026] By adopting the above technical solution, and by calling the corresponding interface testing strategy when the interface type is a specific category, the precise routing of the test execution logic can be achieved. This ensures that the optimal test method is matched for hardware interfaces with different characteristics, such as serial ports, network interfaces, USB interfaces, and GPIO interfaces, thereby maximizing the professionalism and effectiveness of each interface test.
[0027] Optionally, the step of calling the corresponding interface testing strategy as the serial port interface testing strategy and obtaining the test result as the serial port test result when the interface type is a serial port interface specifically includes:
[0028] Based on the serial port interface testing strategy, data is sent to the serial port interface to receive the return data from the serial port interface based on the sent data;
[0029] The returned data is compared byte by byte with the sent data to obtain the number of mismatched bytes, and the bit error rate is calculated based on the number of mismatched bytes and the total number of sent bytes.
[0030] The bit error rate is compared with the corresponding threshold in the test parameters to obtain the serial port test result.
[0031] By adopting the above technical solution, the serial port data communication process can be simulated in a simple and direct way by sending data to the serial port and receiving the returned data for byte comparison, thereby accurately verifying whether the transmission and reception path is physically intact. By calculating the ratio of the number of mismatched bytes to the total number of bytes, the bit error rate can be obtained, making the assessment of the reliability of serial communication more objective. By comparing the bit error rate with a preset threshold, the test results can be automatically judged, thereby eliminating the subjectivity and inconsistency of manual judgment.
[0032] Optionally, the step of calling the corresponding interface testing strategy (network interface testing strategy) when the interface type is a network interface, and obtaining the test result as the network interface test result, specifically includes:
[0033] Based on the network interface testing strategy, network connectivity and network bandwidth are tested on the network interface to obtain network latency, network packet loss rate and network bandwidth rate.
[0034] The network latency, network packet loss rate, and network bandwidth rate are compared with the corresponding thresholds in the test parameters to obtain the network test results.
[0035] By adopting the above technical solution and conducting network connectivity and bandwidth tests on the network interface, the functional status of the network interface can be comprehensively evaluated from two key dimensions: basic reachability and data transmission performance, thus ensuring the completeness of the evaluation. By comparing network latency, network packet loss rate, and network bandwidth rate with corresponding thresholds, multiple core performance indicators of the network interface can be comprehensively evaluated from multiple dimensions, making the test results more comprehensive and reliable.
[0036] Optionally, the step of calling the corresponding interface test strategy (USB interface test strategy) when the interface type is USB interface, and obtaining the test result as USB interface test result, specifically includes:
[0037] Based on the USB interface testing strategy, file read / write and data verification tests are performed on external storage devices connected to the USB interface to obtain data integrity parameters and average read / write speeds.
[0038] The data integrity parameter and the average read / write rate are compared with the corresponding thresholds in the test parameters to obtain the USB test results.
[0039] By adopting the above technical solution and conducting file read / write and data verification tests on the connected external storage device, the core application scenario of users transferring files using the USB interface can be realistically simulated, thus ensuring the practicality and relevance of the test. By comparing the data integrity parameters and average read / write speed with the corresponding thresholds, the reliability and performance of USB interface data transmission can be assessed simultaneously, thereby conducting a comprehensive quality evaluation of the USB host control function.
[0040] Optionally, the step of calling the corresponding interface test strategy (GPIO interface test strategy) and obtaining the test result (GPIO interface test result) when the interface type is a GPIO interface specifically includes:
[0041] Based on the GPIO interface testing strategy, signal acquisition tests are performed on input-type GPIO interfaces to obtain signal response times.
[0042] Based on the GPIO interface testing strategy, the output type GPIO interface is subjected to level setting and readback tests to obtain the actual level value, and the deviation value between the actual level value and the preset level is calculated.
[0043] The signal response time and the deviation value are compared with the corresponding thresholds in the test parameters to obtain the GPIO test results.
[0044] By adopting the above technical solutions, signal acquisition tests on input-type GPIO interfaces can verify their ability to capture external events and their response speed, thus ensuring their reliability as signal acquisition channels. Level setting and readback tests on output-type GPIO interfaces can verify their accuracy in external control, thus ensuring their effectiveness as control signal output channels. By comparing signal response time and level deviation values with corresponding thresholds, the bidirectional function of GPIOs can be comprehensively assessed in an automated and precise manner, ensuring the integrity and accuracy of its functions.
[0045] Optionally, the step of generating a comprehensive test report based on the test results specifically includes:
[0046] According to the preset data association rules, the serial port test results, network test results, USB interface test results and GPIO interface test results are correlated and analyzed to obtain fault diagnosis suggestions.
[0047] Based on the fault diagnosis suggestions and the test results, the comprehensive test report is generated.
[0048] By adopting the above technical solution and performing correlation analysis on all test results according to preset data association rules, potential system-level problems that cannot be exposed by a single interface test and only appear when multiple interfaces are working concurrently can be discovered, thereby greatly improving the depth of fault diagnosis. By matching and obtaining fault diagnosis suggestions and adding them to the report, valuable, root cause-oriented clues can be provided to testers, thereby significantly shortening the location time of complex faults and improving the efficiency of problem solving.
[0049] A third aspect of this application provides an industrial control equipment interface testing platform including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the testing method described above.
[0050] In summary, this application includes at least one of the following beneficial technical effects:
[0051] 1. The unified configuration management module provides a graphical interface, and the central test scheduling engine parses configuration information and dynamically calls the corresponding test adapters, which can integrate the test process for various heterogeneous interfaces into an automated unified platform, significantly improving test efficiency. In addition, by executing specific tests through the multi-source test adapter layer and performing data correlation analysis by the comprehensive analysis report module, standardized management and intelligent analysis of test results can be achieved, thereby improving the depth and accuracy of fault diagnosis and solving the defects of isolated test results and difficulty in systematic analysis.
[0052] 2. By acquiring the configuration information of the industrial control equipment under test, a unified and clear input source can be provided for the entire automated testing process, thereby ensuring the uniqueness and accuracy of test objectives and standards; by calling the corresponding interface test strategy based on the interface type, targeted and professional testing of different interfaces can be achieved, thereby ensuring the effectiveness and comprehensiveness of the test; by generating a comprehensive test report based on the test results, the output of the test process can be solidified and presented in a structured manner, thereby providing reliable data support for product quality traceability and subsequent technical improvements. Attached Figure Description
[0053] Figure 1 is a schematic block diagram of an industrial control equipment interface testing system according to an embodiment of this application;
[0054] Figure 2 is a flowchart of the implementation of the industrial control equipment interface testing method in one embodiment of this application. Detailed Implementation
[0055] The following embodiments will help those skilled in the art to further understand the function of this application, but do not limit this application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application. These all fall within the protection scope of this application.
[0056] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0057] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0058] The present application will be further described in detail below with reference to the accompanying drawings.
[0059] In one embodiment, as shown in Figure 1, this application discloses an industrial control equipment interface testing system. This system includes a unified configuration management module, a central test scheduling engine, a multi-source test adapter layer, and a comprehensive analysis and reporting module. Detailed descriptions of each functional module are as follows:
[0060] The unified configuration management module provides a graphical interface for users to define the interfaces and corresponding test parameters of the industrial control equipment under test and obtain configuration information.
[0061] The central test scheduling engine is used to parse the configuration information in the unified configuration management module, create and manage test task queues according to the interface type, and dynamically call the test adapter corresponding to the interface type.
[0062] The multi-source test adapter layer includes test adapters for testing different interface types of the industrial control equipment under test. Each test adapter receives test instructions from the central test scheduling engine, performs tests according to the test instructions, and generates test results.
[0063] The comprehensive analysis report module is used to receive and summarize the test results sent from all test adapters in the multi-source test adapter layer, and perform data correlation and analysis based on the test results to generate a comprehensive test report.
[0064] In this embodiment, the unified configuration management module serves as the primary entry point for user interaction with the testing system. Specifically, this module provides a graphical user interface (GUI) through which users can perform two core operations: First, users can click the "Import Configuration" button to select a pre-edited device configuration file for the industrial control device under test (ICS), such as a JSON or XML file. The module immediately parses this file, automatically obtaining a complete list of ICS interfaces, including the types and names of interfaces such as COM1, COM2, ETH0, and USB1. Second, users can select a test plan on the interface, such as a preset "Comprehensive Stress Test" plan, or a "Custom Plan" and manually modify the test parameters for specific interfaces, such as setting the iperf test duration for the ETH0 network port to 60 seconds, or setting the baud rate for the COM1 serial port to 115200. The module combines the user-determined interface list and test parameters into a complete configuration information and provides it to the central test scheduling engine.
[0065] The central test scheduling engine is responsible for controlling and scheduling the test process. Upon receiving configuration information from the unified configuration management module, the engine first parses this information, identifying all interfaces to be tested and their corresponding test parameters. Then, it creates a test task queue based on the interface list; for example, the queue might contain independent test tasks such as "Test COM1," "Test ETH0," and "Test USB1." During the test execution phase, the central test scheduling engine retrieves tasks from the queue sequentially or in parallel when resources allow, and dynamically calls a precisely matching test adapter from the multi-source test adapter layer based on the task's interface type. For example, when processing the "Test ETH0" task, it calls the "Network Test Adapter" and issues test instructions to it.
[0066] The multi-source test adapter layer is the core functional layer that actually performs specific testing tasks. This layer consists of a set of pluggable and independently updatable test adapters, each specifically designed for a particular hardware interface. For example, this layer may include serial port test adapters, network test adapters, USB test adapters, and GPIO test adapters. Each test adapter has two core capabilities: First, it can receive abstract test instructions such as "execute bandwidth test" from the central test scheduling engine and translate them into specific command lines that the underlying operating system can recognize, such as iperf -c ...; Second, it can capture the raw output generated by the underlying tools in real time, such as a long string of text logs, and accurately parse and extract key performance indicators such as bandwidth rate and packet loss rate. Then, it encapsulates these indicators into standardized structured data, i.e., test results, and sends them to the comprehensive analysis report module.
[0067] The comprehensive analysis report module serves as the final aggregation and presentation center for test results. This module receives and summarizes test results sent in real-time from all test adapters in the multi-source test adapter layer during the testing process. After all test tasks are completed, this module performs data correlation and analysis. For example, based on preset data correlation rules, it can identify a high degree of overlap between the peak value of the network interface packet loss rate and the GPIO interface signal jitter in timestamps, thereby generating a fault diagnosis suggestion pointing to a potential problem with the system power supply or grounding. Finally, this module integrates all test results, charts, and fault diagnosis suggestions to generate a comprehensive test report in a detailed, illustrated PDF format for users to view, archive, or trace.
[0068] In one embodiment, as shown in FIG2, this application discloses a testing method applied to the above-mentioned industrial control equipment interface testing system, which specifically includes the following steps:
[0069] S10: Obtain the configuration information of the industrial control device under test, and identify the interface type and test parameters of the industrial control device under test from the configuration information.
[0070] Specifically, the user imports a pre-written device configuration file for the "IPC-510" industrial PC through the system's graphical user interface. Responding to the user's trigger command (e.g., clicking the "Start Test" button on the graphical interface), the system reads and parses the user-specified device configuration file. From this file, it identifies information about the interface types; for example, from the file content {"interface": "COM1", "type": "serial"}, it identifies "COM1" as a serial port and adds it to the list of interfaces to be tested. Simultaneously, this step also acquires a series of test parameters related to the current test task. These parameters may originate from direct user input on the interface; for example, if the user enters "60 seconds" in the "Network Test Duration" input box, the program retrieves this value. Finally, all identified interface types and acquired test parameters are integrated and loaded into a unified data structure in memory, forming a complete configuration information that can be queried and referenced in subsequent steps.
[0071] S20: Identify the interface type from the configuration information, call the corresponding interface test strategy based on the interface type category, and perform interface testing on the industrial control equipment under test according to the interface test strategy and test parameters to obtain the test results.
[0072] Specifically, after obtaining complete configuration information, the central test scheduling engine begins to lead the test execution process. The engine iterates through the interface list in the configuration information and, based on the type of each interface, calls a corresponding interface test strategy, i.e., the adapter module, from the multi-source test adapter layer. For example, when the type of interface "COM1" is identified as "serial", the engine will activate and call the "serial port interface test strategy"; when the type of "ETH0" is identified as "ethernet", the "network interface test strategy" will be called.
[0073] Furthermore, the invocation process is dynamic. When the engine issues a test command to the adapter, it also passes the test parameters related to this interface. After receiving the command and parameters, the adapter begins to execute specific test operations, including converting abstract commands into low-level commands, monitoring the test process, parsing the raw output of the test tools, and finally returning the extracted key performance indicators such as bit error rate and bandwidth rate as test results.
[0074] S30: Generate a comprehensive test report based on the test results.
[0075] Specifically, after all interface test tasks are completed, the test results of all interfaces are finally aggregated and organized, and the comprehensive analysis report module begins its work. It has already collected timestamped test results reported from all test strategies, including serial port, network, USB, and GPIO. This module will perform a data correlation analysis process. For example, it will check whether there are concurrent occurrences of "increased network packet loss rate" and "CPU utilization exceeding 90%" within the same time period according to preset data correlation rules. If so, it may match a fault diagnosis suggestion of "insufficient system resources leading to network performance degradation".
[0076] Furthermore, after the analysis is complete, the module integrates all the raw test data, such as bit error rate and bandwidth rate, comparison conclusions, performance data trend charts, and matched fault diagnosis suggestions. Finally, the system automatically generates a comprehensive test report. This report has a clear structure, including not only an overall summary of the test and the pass rate, but also detailed data snapshots and potential root cause analyses for each failure, greatly improving the efficiency of fault diagnosis.
[0077] Based on the above embodiments, as an optional embodiment, step S10, namely, obtaining the configuration information of the industrial control device under test and identifying the interface type and test parameters of the industrial control device under test from the configuration information, specifically includes:
[0078] S11: Obtain the device configuration file imported by the user, and determine the interface list and corresponding interface type of the industrial control device under test based on the device configuration file.
[0079] Specifically, testers interact with the system through the graphical interface provided by the unified configuration management module. By clicking the "Import Configuration" button on the interface and selecting a locally stored device configuration file, such as "IPC-510.json", the information acquisition process is initiated. The system's internal configuration file parser immediately reads the file content and parses its data structure according to JSON syntax rules, thereby accurately extracting the interface list defined therein. The interface list is an array or list, where each element refers to an interface to be tested and contains the name of the interface, such as "COM1", and the type, such as "Serial". This process realizes the automated identification of the test target object.
[0080] S12: In response to the test plan selected by the user, obtain the test parameters. The test plan includes at least the preset test plan and the custom test plan.
[0081] Specifically, a drop-down menu is provided on the graphical user interface, which includes preset test scheme options such as "Quick Test" and "Comprehensive Test". When the user selects one of them, the program loads a set of default parameter values bound to that scheme; or, when the user selects a custom scheme, the interface will unlock editing permissions for all test parameters, allowing the user to make fine-tuning adjustments for specific interfaces. For example, the baud rate parameter of the serial port can be set to 115200, or the packet loss rate tolerance threshold parameter of the network interface can be set to 0. The set of parameters finally confirmed by the user constitutes the direct basis for test execution and result judgment.
[0082] Based on the above embodiments, as an optional embodiment, step S20, which involves identifying the interface type from the configuration information, invoking the corresponding interface testing strategy based on the interface type category, performing interface testing on the industrial control device under test according to the interface testing strategy and test parameters, and obtaining the test results, specifically includes:
[0083] S21: When the interface type is a serial port interface, the corresponding interface test strategy is called as the serial port interface test strategy, and the test result obtained is the serial port test result.
[0084] Specifically, following the test parameters determined in the previous step, when the central test scheduling engine processes a serial interface task of type "Serial" in the test task queue it manages, it instantiates a "serial port test adapter" object from the multi-source test adapter layer and issues an instruction to it to execute the serial port interface test strategy. The core of this strategy is to execute loopback testing, which aims to verify whether the most basic self-transmit and receive function of the serial port is normal. After the adapter completes the execution, it will report the serial port test results containing conclusions such as "pass" or "fail".
[0085] S22: When the interface type is network interface, the corresponding interface test strategy is called as the network interface test strategy, and the test result obtained is the network interface test result.
[0086] Specifically, when the type of the interface under test is identified as a network interface, the central test scheduling engine will dynamically call the "network test adapter" to execute the corresponding network interface test strategy. This strategy is a comprehensive performance evaluation scheme. It not only cares about whether the interface is connected, but also focuses on its data transmission quality and efficiency under simulated actual workload. The adapter will eventually output a network test result containing performance evaluation conclusions from multiple dimensions.
[0087] S23: When the interface type is USB interface, the corresponding interface test strategy is called as the USB interface test strategy, and the test result obtained is the USB interface test result.
[0088] Specifically, for the USB interface, the central test scheduling engine calls the "USB test adapter" to execute the corresponding USB interface test strategy. This strategy aims to simulate a typical scenario where a user connects an external device, such as a USB flash drive, to exchange data via the USB interface. It verifies the data throughput and reliability of the USB port as a host through actual file read and write operations, and forms the final USB test results.
[0089] S24: When the interface type is GPIO interface, the corresponding interface test strategy is called as the GPIO interface test strategy, and the test result obtained is the GPIO interface test result.
[0090] Specifically, for programmable general-purpose digital interfaces such as GPIO, the central test scheduling engine will call the "GPIO test adapter" to execute a specially designed GPIO interface test strategy. This strategy must cover both its input and output operating modes, verifying its ability to accurately control external levels and its ability to accurately capture external signals, and combining these two aspects to express the GPIO test results.
[0091] Based on the above embodiments, as an optional embodiment, step S21, i.e., when the interface type is a serial port interface, calling the corresponding interface test strategy as the serial port interface test strategy and obtaining the test result as the serial port test result, specifically includes:
[0092] S211: Based on the serial port interface testing strategy, send data to the serial port interface to receive the return data from the serial port interface based on the sent data.
[0093] Specifically, the serial port test adapter first controls the transmit data (TXD) pin of the physical serial port through the device driver interface provided by the operating system to send a sequence of test data with good coverage that is predefined in the strategy, such as a cyclic data stream containing all 256 different byte values from 0x00 to 0xFF. At the same time, since a hardware looper is physically connected between the TXD pin and the receive data (RXD) pin of the serial port, all electrical signals sent by TXD will be immediately received by the RXD pin of the same serial port, and the adapter will then read these returned data from the receive buffer.
[0094] S212: Compare the returned data with the sent data byte by byte to obtain the number of mismatched bytes, and calculate the bit error rate based on the number of mismatched bytes and the total number of sent bytes.
[0095] Specifically, the internal verification program of the adapter performs a loop comparison operation, which compares the original data sequence sent in the previous step with the returned data sequence read from the receive buffer one-to-one, starting from the first byte. The program has a mismatch counter, which is initially zero. Whenever a pair of bytes with the same position but different values are found, the counter is incremented by one. After all two sequences have been compared, the final value of the mismatch counter is divided by the total number of bytes in the original sent data sequence. The quotient is the bit error rate of this test.
[0096] S213: Compare the bit error rate with the corresponding threshold in the test parameters to obtain the serial port test result.
[0097] Specifically, the adapter extracts the bit error rate threshold specifically set for the serial port from the test parameters obtained in the previous step, such as 0.0001. Then, it compares the actual bit error rate calculated in the previous step with this threshold. If the actual bit error rate is less than or equal to the threshold, the test is considered passed; otherwise, the test is considered failed. This pass or fail Boolean conclusion, together with the measured bit error rate value, constitutes the final serial port test result.
[0098] Based on the above embodiments, as an optional embodiment, step S22, i.e., when the interface type is a network interface, the corresponding interface testing strategy is called as the network interface testing strategy, and the obtained test result is the network interface test result, specifically includes:
[0099] S221: Based on the network interface testing strategy, perform network connectivity and network bandwidth tests on the network interface to obtain network latency, network packet loss rate and network bandwidth rate.
[0100] Specifically, the network test adapter first performs a network connectivity test. The adapter calls the ping command-line tool through the operating system interface, continuously sending multiple ICMP echo request packets to a preset target IP address. This target IP address points to a server connected to the same local area network and acting as a test device. Then, the adapter captures and parses the statistical summary information returned after the ping command-line tool completes its execution, extracting the average round-trip time as a network latency indicator and the percentage of lost packets as a network packet loss rate indicator. Next, the adapter performs a network bandwidth test. It launches a network performance testing tool, such as an iperf3 client, via the command line, instructing it to perform a data transmission test with the iperf3 server running on the test device for a specified duration. This specified duration is defined by the test parameters in step S12. After the test is completed, the adapter parses the JSON report generated by the tool, accurately extracting the final average transmission rate as the network bandwidth rate indicator.
[0101] S222: Compare the network latency, network packet loss rate, and network bandwidth rate with the corresponding thresholds in the test parameters to obtain the network test results.
[0102] Specifically, from the test parameters obtained in step S12, the adapter identifies three performance thresholds defined for the network interface: the acceptable maximum network latency, the maximum network packet loss rate, and the required minimum network bandwidth rate. Subsequently, the program performs three independent comparison operations: comparing the measured network latency obtained in step S221 with the maximum latency threshold, comparing the measured network packet loss rate with the maximum packet loss rate threshold, and comparing the measured network bandwidth rate with the minimum bandwidth rate threshold. Only when the results of all three comparisons meet the conditions, such as lower latency, lower packet loss rate, and higher bandwidth, will the adapter generate a passing comprehensive conclusion. Otherwise, if any one condition is not met, a failing conclusion is generated. This comprehensive conclusion, together with the three measured performance index values, constitutes the final network test result.
[0103] Based on the above embodiments, as an optional embodiment, step S23, i.e., when the interface type is USB interface, calling the corresponding interface test strategy as the USB interface test strategy and obtaining the test result as the USB interface test result, specifically includes:
[0104] S231: Based on the USB interface testing strategy, file read / write and data verification tests are performed on external storage devices connected to the USB interface to obtain data integrity parameters and average read / write speed.
[0105] Specifically, the USB test adapter first confirms that an external USB storage device, such as a USB flash drive, has been successfully recognized by the operating system and mounted to the USB port under test by polling the system's device manager or listening for device plug-in / plug-out events. After confirmation, the adapter calls a preset disk I / O benchmark tool, such as fio or dd, and performs operations according to the test model defined in the strategy. A typical test model is as follows: First, a pseudo-random data block of a certain size, such as 1GB, is generated in memory. Then, the data block is completely written to a new file on the USB flash drive, and the time is precisely measured to calculate the average write rate. Next, the file just written is immediately read back completely from the USB flash drive into memory, and the time is also precisely measured to calculate the average read rate. Finally, the program calculates the MD5 or SHA-256 hash value of the data block read back into memory and compares it with the hash value of the original pseudo-random data block. If the hash values are completely consistent, the data integrity parameter is verified as passed; otherwise, the verification fails.
[0106] S232: Compare the data integrity parameter and average read / write rate with the corresponding thresholds in the test parameters to obtain the USB test results.
[0107] Specifically, the adapter compares the three test outputs obtained in step S231, namely the data integrity parameter, the average write rate, and the average read rate, with the corresponding thresholds set for the USB interface in step S12. The comparison logic is as follows: the data integrity parameter must pass the verification, the measured average write rate must be greater than or equal to the minimum write rate threshold, and the measured average read rate must be greater than or equal to the minimum read rate threshold. The adapter performs a logical AND operation on these three independent Boolean comparison results, and the final total Boolean result, whether true or false, is converted into a pass or fail conclusion. This conclusion, together with the two measured rate values, constitutes the final USB test result.
[0108] Based on the above embodiments, as an optional embodiment, step S24, namely, when the interface type is GPIO interface, calling the corresponding interface test strategy as the GPIO interface test strategy and obtaining the test result as the GPIO interface test result, specifically includes:
[0109] S241: Based on the GPIO interface testing strategy, perform signal acquisition tests on the input type GPIO interface to obtain the signal response time.
[0110] Specifically, when testing a GPIO pin configured as an input, the GPIO test adapter first registers an edge-triggered interrupt service routine (such as rising edge trigger) for the target pin through the driver interface and puts the pin in a waiting state. At this time, an external test fixture physically connected to the pin and controlled by the test system generates a low-to-high level transition signal on one of its digital output pins. After the GPIO hardware controller on the industrial control computer under test captures this transition, it immediately triggers the pre-registered interrupt, the interrupt service routine is executed, and the program immediately reads a high-precision timestamp at the beginning of execution. The adapter calculates the difference between this timestamp and the timestamp recorded when the test fixture emits the signal to obtain the complete link delay from the external generation of the signal to its successful capture by the internal software logic, i.e., the signal response time.
[0111] S242: Based on the GPIO interface testing strategy, perform level setting and readback tests on the output type GPIO interface to obtain the actual level value and calculate the deviation between the actual level value and the preset level.
[0112] Specifically, when testing a GPIO pin configured in output mode, the GPIO test adapter first writes a specified logic value, such as "1", to the target pin through the driver interface to command it to output a high level. The theoretical voltage corresponding to this logic value is the preset level. For example, in a 3.3V system, the preset level is 3.3V. At the same time, a high-precision analog-to-digital converter channel on an external test fixture physically connected to the pin is triggered to sample and measure the actual analog voltage on the pin, obtaining an actual level value such as 3.28V. After the test fixture feeds back the measured value to the test system, the adapter program subtracts the actual level value from the preset level and takes the absolute value to calculate the deviation between the two.
[0113] S243: Compare the signal response time and deviation value with the corresponding threshold in the test parameters to obtain the GPIO test results.
[0114] Specifically, the adapter compares the signal response time measured in step S241 with the maximum allowable response time threshold set for the GPIO input function in step S12; at the same time, it compares the level deviation value calculated in step S242 with the maximum allowable deviation threshold set for the GPIO output function; only when the signal response time is less than or equal to its threshold and the level deviation value is also less than or equal to its threshold, does the adapter determine that the function of the entire GPIO interface is qualified, thereby generating a passed GPIO test result; otherwise, if any one of them is not met, a failure result is generated.
[0115] Based on the above embodiments, as an optional embodiment, step S30, namely the step of generating a comprehensive test report based on the test results, specifically includes:
[0116] S31: According to the preset data association rules, perform association analysis based on the serial port test results, network test results, USB interface test results and GPIO interface test results to obtain fault diagnosis suggestions.
[0117] Specifically, after receiving and caching the test results of all interfaces, the comprehensive analysis report module starts its built-in correlation analysis engine. This engine loads rules from a preset data correlation rule base one by one. Each rule defines one or more cross-interface, time-related fault modes. For example, a rule may be defined as: if the average write rate of the USB interface is less than 50% of its normal value during the time period (T1 to T2) of the network interface bandwidth stress test, then it matches the fault mode of system bus bandwidth contention. The analysis engine performs pattern matching between all the timestamped performance data collected in this test and each rule in the rule base. Once it finds that the data meets the triggering condition of a certain rule, it records the matching result, thus obtaining one or more fault diagnosis suggestions.
[0118] S32: Generate a comprehensive test report based on fault diagnosis suggestions and test results.
[0119] Specifically, the report generator module is launched last. It first creates a report document structure, which includes an overall summary, detailed test data for each interface, and defect analysis sections. Then, it fills the corresponding detailed data sections with the test results for each interface, including pass / fail conclusions and measured performance values, and may generate performance change curves based on time series data. Next, it fills the defect analysis section with all the fault diagnosis suggestions matched in step S31, providing deeper root cause clues for test failures. Finally, the module completes the rendering and layout of all content and outputs a complete comprehensive test report, such as a PDF format. At this point, a complete automated testing process ends.
[0120] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0121] In one embodiment, an industrial control equipment interface testing platform is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0122] Obtain the configuration information of the industrial control device under test, and identify the interface type and test parameters of the industrial control device under test from the configuration information;
[0123] The interface type is identified from the configuration information. Based on the category of the interface type, the corresponding interface test strategy is invoked. According to the interface test strategy and test parameters, the interface test is performed on the industrial control equipment under test, and the test results are obtained.
[0124] A comprehensive test report is generated based on the test results.
[0125] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0127] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An industrial control equipment interface testing system, characterized in that, The industrial control equipment interface testing system includes: a unified configuration management module, which provides a graphical interface for users to define the interfaces and corresponding test parameters of the industrial control equipment under test and obtain configuration information; a central test scheduling engine, which parses the configuration information in the unified configuration management module, creates and manages test task queues according to interface types, and dynamically calls test adapters corresponding to interface types; a multi-source test adapter layer, which includes test adapters for testing different interface types of the industrial control equipment under test, wherein each test adapter receives test instructions issued by the central test scheduling engine, performs tests according to the test instructions, and generates test results; and a comprehensive analysis report module, which receives and summarizes the test results sent from all test adapters in the multi-source test adapter layer, performs data association and analysis based on the test results, and generates a comprehensive test report.
2. A testing method based on the industrial control equipment interface testing system of claim 1, characterized in that, The testing method includes: acquiring configuration information of the industrial control device under test; identifying the interface type and test parameters of the industrial control device under test from the configuration information; identifying the interface type from the configuration information; invoking the corresponding interface test strategy based on the category of the interface type; performing interface testing on the industrial control device under test according to the interface test strategy and the test parameters to obtain test results; and generating a comprehensive test report based on the test results.
3. The test method according to claim 2, characterized in that, The steps of obtaining the configuration information of the industrial control device under test and identifying the interface type and test parameters of the industrial control device under test from the configuration information specifically include: obtaining the device configuration file imported by the user; determining the interface list and corresponding interface type of the industrial control device under test based on the device configuration file; and obtaining the test parameters in response to the test scheme selected by the user, wherein the test scheme includes at least a preset test scheme and a custom scheme.
4. The test method according to claim 2, characterized in that, The step of identifying the interface type from the configuration information, invoking the corresponding interface testing strategy based on the interface type category, and performing interface testing on the industrial control device under test according to the interface testing strategy and the test parameters to obtain the test result specifically includes: when the interface type category is a serial port interface, the corresponding interface testing strategy is invoked as a serial port interface testing strategy, and the obtained test result is a serial port test result; when the interface type category is a network interface, the corresponding interface testing strategy is invoked as a network interface testing strategy, and the obtained test result is a network interface test result; when the interface type category is a USB interface, the corresponding interface testing strategy is invoked as a USB interface testing strategy, and the obtained test result is a USB interface test result; when the interface type category is a GPIO interface, the corresponding interface testing strategy is invoked as a GPIO interface testing strategy, and the obtained test result is a GPIO interface test result.
5. The test method according to claim 4, characterized in that, The step of calling the corresponding interface test strategy (serial port interface test strategy) when the interface type is a serial port interface, and obtaining the test result as a serial port test result, specifically includes: sending data to the serial port interface based on the serial port interface test strategy, and receiving return data from the serial port interface based on the sent data; comparing the returned data with the sent data byte by byte to obtain the number of mismatched bytes, and calculating the bit error rate based on the number of mismatched bytes and the total number of sent bytes; comparing the bit error rate with the corresponding threshold in the test parameters to obtain the serial port test result.
6. The test method according to claim 4, characterized in that, The step of calling the corresponding interface test strategy as the network interface test strategy when the interface type is a network interface, and obtaining the test result as the network interface test result, specifically includes: performing network connectivity and network bandwidth tests on the network interface based on the network interface test strategy to obtain network latency, network packet loss rate, and network bandwidth rate; comparing the network latency, network packet loss rate, and network bandwidth rate with the corresponding thresholds in the test parameters to obtain the network test result.
7. The test method according to claim 4, characterized in that, The step of calling the corresponding interface test strategy (USB interface test strategy) when the interface type is USB interface, and obtaining the test result as USB interface test result, specifically includes: performing file read / write and data verification tests on the external storage device connected to the USB interface based on the USB interface test strategy to obtain data integrity parameters and average read / write speeds; comparing the data integrity parameters and the average read / write speeds with the corresponding thresholds in the test parameters to obtain the USB test result.
8. The test method according to claim 4, characterized in that, The step of calling the corresponding interface test strategy (GPIO interface test strategy) when the interface type is a GPIO interface, and obtaining the test result as the GPIO interface test result, specifically includes: performing signal acquisition test on the input type GPIO interface based on the GPIO interface test strategy to obtain the signal response time; performing level setting and readback test on the output type GPIO interface based on the GPIO interface test strategy to obtain the actual level value, and calculating the deviation value between the actual level value and the preset level; comparing the signal response time and the deviation value with the corresponding threshold in the test parameters to obtain the GPIO test result.
9. The test method according to claim 4, characterized in that, The step of generating a comprehensive test report based on the test results specifically includes: performing correlation analysis on the serial port test results, the network test results, the USB interface test results, and the GPIO interface test results according to preset data association rules, and matching them to obtain fault diagnosis suggestions; generating the comprehensive test report based on the fault diagnosis suggestions and the test results.
10. An industrial control equipment interface testing platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the test method as described in any one of claims 2 to 9.