An artificial intelligence-based industrial controller automatic test system and method
The AI-based automated testing system for industrial controllers solves the problems of low testing efficiency and protocol compatibility in existing technologies, achieving efficient end-to-end verification and test case generation, and improving test coverage and maintenance efficiency.
Patent Information
- Application Number
- CN202511860691.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-12-11
AI Technical Summary
Existing industrial controller testing relies on manual operation, which is inefficient and cannot adapt to complex and ever-changing testing scenarios. Furthermore, existing automated testing tools cannot directly adapt to the proprietary communication protocols of industrial controllers and lack the ability to detect real physical signal links.
An AI-based automated testing system for industrial controllers is adopted, including a communication proxy module, a protocol parsing module, an execution engine, a detection module, an AI test case generation and optimization module, and a task scheduling and test case version management module. The system intercepts communication messages through an intermediate proxy, parses them into register operation sequences and delay instructions, generates test cases, and performs multi-channel testing.
It improves test coverage and efficiency, generates test scripts that are closer to actual user behavior, achieves full-link verification, reduces omissions, and lowers the cost of test case writing and maintenance.
Smart Images

Figure CN121300335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation testing technology, and in particular to an artificial intelligence-based automated testing system and method for industrial controllers. Background Technology
[0002] Currently, industrial controller testing largely relies on manual operation, requiring testers to manually operate the screen and judge results, leading to low efficiency and the inability to perform regression testing. While some automated testing tools exist, test cases still require manual writing and maintenance, failing to adapt to complex and ever-changing testing scenarios. This results in difficulties in test case writing, high maintenance costs, and poor performance in rapidly iterating projects. Existing technologies often employ model-driven script generation or virtual device methods, which cannot directly adapt to the proprietary communication protocols of industrial controllers, nor can they quickly build test cases without models, and lack detection of real physical signal links. Therefore, designing an AI-based automated testing system and method for industrial controllers is essential. Summary of the Invention
[0003] The purpose of this invention is to provide an automated testing system and method for industrial controllers based on artificial intelligence, which improves test coverage and efficiency through intermediate agent, data parsing, signal detection and test case generation technologies.
[0004] To achieve the above objectives, the present invention provides the following solution:
[0005] An AI-based automated testing system for industrial controllers includes: a communication proxy module, a protocol parsing module, an execution engine, a detection module, an AI test case generation and optimization module, and a task scheduling and test case version management module. The communication proxy module intercepts bidirectional communication messages via a transparent man-in-the-middle proxy, adds timestamps and direction identifiers to the messages, and then forwards them to the protocol parsing module. The protocol parsing module parses the messages into register operation sequences and delay instructions using a register definition dictionary and an alarm dictionary, and transmits these sequences and instructions to the execution engine. The execution engine generates controller execution instructions based on the register operation sequences. The detection module performs multi-channel detection on the register operation sequences. The AI test case generation and optimization module generates test cases using natural language requirements documents, design documents, a register mapping database, and a historical test case library. The task scheduling and test case version management module allocates tasks to the controller execution instructions based on the test cases.
[0006] Optionally, the specific steps for intercepting bidirectional communication messages through the communication proxy module include:
[0007] A forged ARP responses are sent to both the controller host and the touch screen simultaneously, and the IP addresses of the touch screen and the controller host are mapped to the MAC addresses of the testing tool to obtain a bidirectional UDP communication link.
[0008] Create two independent UDP sockets and bind them to IP addresses;
[0009] Based on a bidirectional UDP communication link, bidirectional message interception and forwarding are performed through a bound UDP socket.
[0010] Optionally, the specific steps for parsing messages into register operation sequences and delay instructions using register definition dictionaries and alarm dictionaries include:
[0011] Store the raw data of the message in a temporary buffer;
[0012] The UDP payload of the message in the temporary buffer is unpacked using a preset private protocol format to obtain the parsing result;
[0013] The parsing results are mapped to test step commands; the test step commands include: register operation sequences and delay instructions.
[0014] Optionally, the execution engine is used to generate controller execution instructions based on the register operation sequence, including:
[0015] Generate controller execution instructions based on the register operation sequence;
[0016] Save the original value of the target register as a snapshot before writing;
[0017] Allocate a separate cache area for test cases;
[0018] The test steps are executed according to the controller's execution instructions, and when a retry or rollback test operation is triggered, a rollback operation is performed based on the pre-write snapshot to restore the original state of the target register.
[0019] Optionally, the specific steps for multi-channel detection of the register operation sequence include:
[0020] The actual register value in the register operation sequence is compared with the preset expected value, and the detection result is obtained based on the comparison result; the detection result includes: success, failure, and warning;
[0021] The external input signal is used as the expected value to detect the digital I / O output and analog AI output signal of the industrial controller, and the detection result is obtained.
[0022] Optionally, the specific steps for generating test cases include:
[0023] Perform semantic understanding and parsing on natural language requirements and design documents to generate functional descriptions and test cases;
[0024] The functional description test cases are matched with the preset test template library; the test template library includes parameter boundary test templates, abnormal process test templates, multi-module integration test templates, and alarm output test templates.
[0025] The matched test points are supplemented into complete test steps, the complete test steps are converted into triples, and the triples are converted into register operation instructions.
[0026] Optionally, the specific steps for assigning tasks to the controller execution instructions based on the test cases include:
[0027] Determine the actuator, controller execution instructions, and test cases based on the controller model and firmware version;
[0028] Based on the determined controller execution instructions and test cases, the executor is processed for concurrent execution, version classification, and tag management.
[0029] An automated testing method for industrial controllers based on artificial intelligence, implemented based on the aforementioned automated testing system for industrial controllers based on artificial intelligence, includes the following steps:
[0030] Deploy an agent between the HMI and the controller, and capture communication packets through the agent and add timestamps;
[0031] Parse the communication message into a register operation sequence and a delay instruction;
[0032] Map the user's manual operations in the HMI to message sequences, and supplement the test cases with message sequences;
[0033] Generate structured test scripts based on requirements documents, register tables, and test cases;
[0034] The test tasks are determined based on the industrial controller model and firmware version, and then sent to the execution engine.
[0035] The test is performed based on the register operation sequence and structured test script to obtain register writes and external signals;
[0036] Multi-channel detection is performed on register writes and external signals to obtain the detection results;
[0037] When abnormal test results are detected, a rollback operation or manual confirmation is performed to restore the test environment.
[0038] The test results are classified and diagnosed, and the diagnosed failure examples are fed back to the test case library. The test case generation strategy is updated based on the test case library.
[0039] Optionally, multi-channel detection is performed on register writes and external signals to obtain detection results, including:
[0040] The actual value of the register is compared with the preset expected value using a fixed value, a range of values, or a logical relationship.
[0041] The digital I / O outputs, analog AI output signals, and external input signals of the industrial controller are compared and detected with preset expected values.
[0042] Optionally, the test results are classified and diagnosed, the diagnosed failure examples are fed back to the test case library, and the test case generation strategy is updated according to the test case library. It also includes: adding new requirements documents, design documents and test cases to the knowledge base, and updating the test case generation strategy according to the knowledge base.
[0043] This invention discloses the following technical effects: The artificial intelligence-based automated testing system and method for industrial controllers provided by this invention includes: a communication proxy module, a protocol parsing module, an execution engine, a detection module, an AI test case generation and optimization module, and a task scheduling and test case version management module. The communication proxy module intercepts bidirectional communication messages through a transparent man-in-the-middle proxy, adds timestamps and direction identifiers to the messages, and then forwards them to the protocol parsing module. The protocol parsing module parses the messages into register operation sequences and delay instructions using a register definition dictionary and an alarm dictionary, and transmits the register operation sequences and delay instructions to the execution engine. The execution engine generates controller execution instructions based on the register operation sequences. The detection module performs multi-channel detection on the register operation sequences. The AI test case generation and optimization module generates test cases using natural language requirement documents, design documents, a register mapping database, and a historical test case library. The task scheduling and test case version management module allocates tasks to the controller execution instructions based on the test cases. This system improves test coverage and efficiency through man-in-the-middle proxy, data parsing, signal detection, and test case generation technologies. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the industrial controller automated testing system of the present invention;
[0046] Figure 2 This is a flowchart of the automated testing method for industrial controllers according to the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] like Figure 1 As shown, this invention provides an AI-based automated testing system for industrial controllers, comprising: a communication proxy module, a protocol parsing module, an execution engine, a detection module, an AI test case generation and optimization module, and a task scheduling and test case version management module. The communication proxy module intercepts bidirectional communication messages via a transparent man-in-the-middle proxy, adds timestamps and direction identifiers to the messages, and then forwards them to the protocol parsing module. The protocol parsing module parses the messages into register operation sequences and delay instructions using a register definition dictionary and an alarm dictionary, and transmits these sequences and instructions to the execution engine. The execution engine generates controller execution instructions based on the register operation sequences. The detection module performs multi-channel detection on the register operation sequences. The AI test case generation and optimization module generates test cases using natural language requirements documents, design documents, a register mapping database, and a historical test case library. The task scheduling and test case version management module allocates tasks to the controller execution instructions based on the test cases.
[0050] Preferably, the specific steps for intercepting bidirectional communication messages through the communication proxy module include:
[0051] Simultaneously send forged ARP (Address Resolution Protocol) responses to both the controller host and the touchscreen, and map the touchscreen's IP (Internet Protocol) address and the controller host's IP address to the test tool's MAC (Media Access Control) address, thus obtaining a bidirectional UDP (User Datagram Protocol) communication link;
[0052] Create two independent UDP sockets and bind them to IP addresses;
[0053] Based on a bidirectional UDP communication link, bidirectional message interception and forwarding are performed through a bound UDP socket.
[0054] In some embodiments, the communication proxy module is deployed between the HMI (Human-Machine Interface) screen and the industrial controller host. Users perform functional tests on the HMI screen interface, and bidirectional communication messages are intercepted via a man-in-the-middle transparent proxy to achieve test-driven operation closely resembling real-world scenarios. The intercepted messages are timestamped and have direction identifiers, and are stored in a buffer. The specific implementation process of the communication proxy module includes:
[0055] 1.1 Network Topology Masquerading and Traffic Hijacking: Configure the network settings of the test host computer to masquerade as the touchscreen's IP address, informing the controller host that "this machine (test tool) is the touchscreen." Simultaneously, configure the network settings to masquerade as the controller host's IP address, informing the touchscreen that "this machine (test tool) is the controller host," thus achieving a man-in-the-middle transparent proxy mechanism. Specifically, within the same local area network, the test tool sends a forged ARP response to the controller host, mapping the touchscreen's IP address to the test tool's MAC address; simultaneously, it sends a forged ARP response to the touchscreen, mapping the controller host's IP address to the test tool's MAC address. Ultimately, the bidirectional UDP communication link between the controller host and the touchscreen is forcibly redirected to the test host computer, making the test host computer the sole transparent proxy for communication, requiring all packets to be forwarded through this transparent proxy.
[0056] 1.2 Interception, Forwarding, and Recording of Bidirectional UDP Packets: Two independent UDP sockets are established on the test host computer: a listening host socket and a listening screen socket. The listening host socket is bound to the IP address and port of the controller host to receive packets from the real controller host and forward them to the real touchscreen. The listening screen socket is bound to the IP address and port of the touchscreen to receive packets from the real touchscreen and forward them to the real controller host.
[0057] Preferably, the specific steps for parsing messages into register operation sequences and delay instructions using a register definition dictionary and an alarm dictionary include:
[0058] Store the raw data of the message in a temporary buffer;
[0059] The UDP payload of the message in the temporary buffer is unpacked using a preset private protocol format to obtain the parsing result;
[0060] The parsing results are mapped to test step commands; the test step commands include: register operation sequences and delay instructions.
[0061] In some embodiments, the protocol parsing module performs syntax parsing and semantic mapping on the messages captured by the communication proxy module. The specific implementation process includes:
[0062] 2.1 Based on the register definition dictionary and alarm dictionary, the message is parsed into a register read and write operation sequence; specifically, when the listening host Socket receives the raw UDP message from the controller host, the system sequentially performs recording, parsing and generating operation instructions. The recording process involves storing the raw binary data of the message, source / destination IP / port, direction, and timestamp into a temporary buffer. The parsing process involves calling a protocol parsing method to unpack the UDP payload of the message, extracting key fields according to a predefined private protocol format. These key fields include, but are not limited to, message type (read / write / heartbeat / batch read / write), bit width, length, destination register address, and the written or responded data value. The delay time is calculated based on the operation interval. The operation instruction generation process involves mapping the parsed structured information (e.g., {type: 'write register', address: R5700, value: 150, bit width: 2, timestamp: T1, delay time: T2}) to a test step command (e.g., SET_REG(0x5700, 1.50, 150)) and appending it to the test script sequence. When the listening screen socket receives a raw UDP message from the touchscreen, the same recording, parsing, and operation instruction generation process is executed.
[0063] 2.2 Convert message timestamps to delay / wait operations.
[0064] 2.3 Output the parsed results in structured data formats (JSON (JavaScript Object Notation, a lightweight data interchange format) / YAML (YAML Ain't Markup Language, a data serialization language) / CSV (Comma-Separated Values)).
[0065] Preferably, the execution engine is used to generate controller execution instructions based on the register operation sequence, including:
[0066] Generate controller execution instructions based on the register operation sequence;
[0067] Save the original value of the target register as a snapshot before writing;
[0068] Allocate a separate cache area for test cases;
[0069] The test steps are executed according to the controller's execution instructions, and when a retry or rollback test operation is triggered, a rollback operation is performed based on the pre-write snapshot to restore the original state of the target register.
[0070] In some embodiments, the specific implementation process of the execution engine includes:
[0071] 3.1 Receive the parsed operation sequence and send commands to the controller; Since the test environment may contain multiple test environments, the execution engine is deployed on the device side, receives scheduling instructions from the cloud and sends commands to the controller, or can directly execute test steps and send commands to the controller in a single-machine environment.
[0072] 3.2 Before execution, save the original value of the target register as a pre-write snapshot; a new cache is generated during the execution of each test case, and a record is generated for each step, including the initial value and the new value. Whether to cache the original value can be configured on the test case.
[0073] 3.3 When repeated retry or rollback test steps are triggered, a rollback operation is performed based on the pre-write snapshot to restore the original register state. Typically, during the debugging phase, when observing the results, a single step is repeatedly executed to roll back to the previous environment state. After a single test case is completed, the entire environment is automatically restored to ensure the consistency of the environment.
[0074] Preferably, the specific steps for multi-channel detection of the register operation sequence include:
[0075] The actual register value in the register operation sequence is compared with the preset expected value, and the detection result is obtained based on the comparison result; the detection result includes: success, failure, and warning;
[0076] The external input signal is used as the expected value to detect the digital I / O output and analog AI output signal of the industrial controller, and the detection result is obtained.
[0077] In practical implementation, the detection module's detection results are an integral part of the testing logic. Detection results can be presented in various ways, including alarm outputs, internal output signals, external input signals, and register values. The correctness of the result is determined by comparing it with pre-set expected values, which need to be manually entered by the user. The detection process includes comparisons based on logical relationships such as fixed value comparisons, range value comparisons, and presence / absence comparisons. Detection results include three states: success, failure, and warning.
[0078] Specifically, register value detection is used to detect register setting linkage and function linkage. In some specific implementations, this is manifested as: setting the mold opening position from 100.0 to two decimal places, and changing the original mold opening position value from 1000 to 10000. Alarm detection is also a type; it involves storing the register output value that stores alarm information when a certain action is executed. Methods for detecting whether a signal is output correctly when executing a certain action include detecting the value of the register corresponding to the output signal of the controller host under test, or detecting the value of the input detection signal received by the auxiliary test machine. Output signals include: digital I / O (Input / Output) outputs and analog AI (Analog Input) output signals. In some other embodiments, external input signals are received as expected values for detection.
[0079] Preferably, the specific steps for generating test cases include:
[0080] Perform semantic understanding and parsing on natural language requirements and design documents to generate functional descriptions and test cases;
[0081] The functional description test cases are matched with the preset test template library; the test template library includes parameter boundary test templates, abnormal process test templates, multi-module integration test templates, and alarm output test templates.
[0082] The matched test points are supplemented into complete test steps, the complete test steps are converted into triples, and the triples are converted into register operation instructions.
[0083] In some embodiments, the inputs to the AI test case generation and optimization module are: a natural language requirements document, a design document, a register mapping database, and a historical test case library. The requirements document is obtained by the product manager from the original customer needs; it serves as a reference standard for both development and test cases, and is also archived for future requirement changes. The design document is written by the developers and also serves as a reference standard for test cases. The register mapping database is a hardware system resource. The historical test case library is a combination of development documentation and automated testing tool recordings, including steps and associated requirements, design documents, and functional descriptions. The specific implementation process includes:
[0084] 1) Parse requirements and design documents into test case descriptions: Parse the new requirements and design documents input into the system, perform semantic understanding through general AI, and combine the system architecture document, the overall requirements and design documents of the modules involved in the requirements, the requirements and design documents of the modules that may be affected, and the test guidance manual document to generate corresponding functional description test cases.
[0085] 2) Multi-dimensional test template matching: The generated test cases are described and matched with predefined templates in the test template library to generate complete logical steps. Specifically, each test template is a semi-structured framework, in which the test objectives include: parameter boundary testing, abnormal process testing, multi-module integration testing, and alarm output testing; the trigger condition is: when the operation object is a preset set value.
[0086] 3) Expand test points into test steps and convert them into register instructions: The steps are converted into "object-operation-parameter" triples with functional meaning. Then, using a register lookup table, these triples are converted into specific register operation instructions. Specifically, the registers involved in the test cases are matched with a predefined register lookup table. The register lookup table records the functional description, data type, precision, and physical unit corresponding to each register address. In a specific embodiment, setting the temperature to 150 degrees Celsius is parsed as: `Set(object: temperature setpoint, parameter: 150℃)`. Further lookup shows that address 0x1000 maps to 'temperature setpoint', with data type U16 and unit ℃, thus yielding the operation instruction `SET_REG(0x1000, 150, 150)`, ultimately forming a series of executable steps.
[0087] Preferably, the specific steps for assigning tasks to the controller execution instructions based on test cases include:
[0088] Determine the actuator, controller execution instructions, and test cases based on the controller model and firmware version;
[0089] Based on the determined controller execution instructions and test cases, the executor is processed for concurrent execution, version classification, and tag management.
[0090] In practice, the task scheduling module and test case version management module automatically select the corresponding executor and test cases based on the controller model and firmware version. Furthermore, they support concurrent execution, version categorization, and tag management, enabling rapid reuse across different device models.
[0091] like Figure 2 As shown, the present invention also provides an automated testing method for industrial controllers based on artificial intelligence, implemented based on the aforementioned automated testing system for industrial controllers based on artificial intelligence, comprising the following steps:
[0092] Communication acquisition: Deploy an agent between the HMI and the controller, and capture communication packets through the agent and add timestamps;
[0093] Protocol parsing: Parses communication messages into register operation sequences and delay instructions;
[0094] Operation conversion: Map user manual operations in the HMI to message sequences and supplement the test cases with message sequences;
[0095] Test case generation: Generate structured test scripts based on requirements documents, register tables, and test cases;
[0096] Task scheduling: Determine the test tasks based on the industrial controller model and firmware version, and then send the test tasks to the execution engine;
[0097] Test case execution: Perform tests based on the register operation sequence and structured test script to obtain register writes and external signals;
[0098] Result detection: Multi-channel detection is performed on register writes and external signals to obtain the detection results;
[0099] Abnormal rollback: When abnormal test results occur, a rollback operation or manual confirmation is performed to restore the test environment;
[0100] Results analysis and optimization: Classify and diagnose the test results, feed back the diagnosed failure examples to the test case library, and update the test case generation strategy based on the test case library.
[0101] Preferably, multi-channel detection is performed on register writes and external signals to obtain detection results, including:
[0102] The actual value of the register is compared with the preset expected value using a fixed value, a range of values, or a logical relationship.
[0103] The digital I / O outputs, analog AI output signals, and external input signals of the industrial controller are compared and detected with preset expected values.
[0104] Preferably, the test results are classified and diagnosed, the diagnosed failure examples are fed back to the test case library, and the test case generation strategy is updated according to the test case library. The method also includes: adding new requirement documents, design documents and test cases to the knowledge base, and updating the test case generation strategy according to the knowledge base.
[0105] The beneficial effects of this invention are as follows:
[0106] 1) By combining communication proxy and protocol parsing technologies, non-intrusive parsing of private protocols is achieved, overcoming the limitations of existing dependency models or SDKs (Software Development Kits);
[0107] 2) By using the operation-to-message mechanism, the generated test scripts are made closer to actual user behavior. Through the multi-path detection mechanism of register feedback + external input + physical signal, full-link verification is achieved, reducing omissions.
[0108] 3) By using AI to generate test cases and perform closed-loop optimization, the amount of test case writing is reduced, testing efficiency and coverage are improved, and test case coverage and maintenance efficiency are also enhanced.
[0109] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0110] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. An artificial intelligence based industrial controller automation testing system, characterized in that, The application relates to a communication agent module, a protocol analysis module, an execution engine, a detection module, an AI use case generation and optimization module, and a task scheduling and test case version management module. The specific steps of intercepting bidirectional communication messages through the communication agent module include: Sending a fake ARP response to the controller host and the touch screen simultaneously, and mapping the IP address of the touch screen and the IP address of the controller host to the MAC address of the test tool to obtain a bidirectional UDP communication link; Building two independent UDP sockets and IP binding the UDP sockets; Based on the bidirectional UDP communication link, the bound UDP sockets are used for intercepting and forwarding bidirectional messages; The specific steps of generating a test case include: Performing semantic understanding analysis on the natural language requirement document and the design document to generate a function description test case; Matching the function description test case with a preset test template library; the test template library includes a parameter boundary test template, an abnormal flow test template, a multi-module integrated test template, and an alarm output test template; Supplementing the matched test points to complete test steps, converting the complete test steps into triples, and converting the triples into register operation instructions. The specific steps of analyzing the messages into register operation sequences and delay instructions through a register definition dictionary and an alarm dictionary include:
2. The artificial intelligence-based industrial controller automation testing system of claim 1, wherein, Storing the original data of the messages in a temporary buffer; Unpacking the message UDP load in the temporary buffer through a preset private protocol format to obtain an analysis result; Mapping the analysis result into test step commands; the test step commands include the register operation sequence and the delay instruction. The execution engine is used for generating controller execution instructions according to the register operation sequence, and the specific steps include:
3. The artificial intelligence-based industrial controller automation testing system of claim 1, wherein, Generating the controller execution instructions according to the register operation sequence; Saving the original value of the target register as a write-before snapshot; Allocating an independent cache area for the test case; Executing a test step according to the controller execution instructions, and when a repeated retry or backtracking test operation trigger occurs, executing a rollback operation to restore the original state of the target register according to the write-before snapshot. 4. The artificial intelligence-based industrial controller automation testing system of claim 1, wherein, The specific steps of the multi-channel detection of the register operation sequence include: Comparing the actual value of the register in the register operation sequence with the preset expected value, and obtaining a detection result according to the comparison result; the detection result includes success, failure and warning; Detecting the digital quantity IO output and analog quantity AI output signal of the industrial controller by taking the external input signal as the expected value, and obtaining the detection result.
5. The artificial intelligence-based industrial controller automation testing system of claim 1, wherein, The specific steps of the task allocation of the controller execution instruction according to the test case include: Determining the executor, the controller execution instruction and the test case according to the controller model and the firmware version; Concurrent execution, version classification and label management processing of the executor according to the determined controller execution instruction and test case.
6. An artificial intelligence based industrial controller automation testing method implemented based on the artificial intelligence based industrial controller automation testing system of any one of claims 1-5, characterized in that, The method includes the following steps: Deploying an agent between the HMI and the controller, and grabbing the communication message through the agent and adding a timestamp; Parsing the communication message into a register operation sequence and a delay instruction; Mapping the manual operation of the user on the HMI to a message sequence, and supplementing the message sequence to the test case; Generating a structured test script according to the requirement document, the register table and the test case; Determining the test task according to the industrial controller model and the firmware version, and issuing the test task to the execution engine; Performing execution test according to the register operation sequence and the structured test script, obtaining register writing and external signal; Performing multi-channel detection on the register writing and external signal, obtaining a detection result; When the detection result is abnormal, performing rollback operation or manual confirmation to restore the test environment; Classifying and diagnosing the detection result, feeding the diagnosed failure examples to the case library, and updating the test case generation strategy according to the case library.
7. The artificial intelligence-based industrial controller automation testing method of claim 6, wherein, The multi-channel detection of the register writing and external signal obtains a detection result, including: Comparing the register actual value with the preset expected value in fixed value, range value or logical relationship; Comparing the digital quantity IO output, analog quantity AI output signal and external input signal of the industrial controller with the preset expected value respectively.
8. The artificial intelligence based industrial controller automation testing method of claim 6, wherein, The classification and diagnosis of the detection result feed the diagnosed failure examples to the case library, and update the test case generation strategy according to the case library, and also include: supplementing new requirement documents, design documents and test cases to the knowledge base, and updating the test case generation strategy according to the knowledge base.
Citation Information
Patent Citations
AI large model-based unit test case rapid generation method
CN120994545A