An automated testing method, equipment, and medium for industrial robots.
By connecting the terminal and controller via dual servers and using the SDK interface, automated testing of industrial robot controllers was achieved, solving the problems of insufficient and inefficient real-world testing and improving the comprehensiveness and accuracy of the tests.
Patent Information
- Application Number
- CN202510584502.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the real-world testing coverage of industrial robot controllers is insufficient, the testing efficiency is low, there is a lack of technical means to directly operate real controllers, and commonly used testing tools cannot be used on dedicated controllers, resulting in compatibility issues and insufficient testing.
By connecting to the first and second servers of the controller via the terminal, the test script path is obtained and copied to the controller. After restarting, a sequence of test commands is sent based on the SDK to control the controller to run the test script and obtain the running results. The dual-server design avoids compatibility issues and realizes automated testing.
It improves testing efficiency, covers hardware real-time performance and resource scheduling scenarios that cannot be verified in simulation environments, reduces manual intervention, and enhances the comprehensiveness and accuracy of testing.
Smart Images

Figure CN123103756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to an automated testing method, equipment, and medium for industrial robots. Background Technology
[0002] With the widespread application of industrial robots in modern manufacturing, their stability requirements are becoming increasingly stringent. After each functional iteration of the industrial robot controller, functional verification requires manual operation. The testing process relies on engineers to verify each function point in a real controller or PC simulation environment, such as sending enable commands, loading programs, and observing operating status. The testing methods for industrial robots mainly consist of manual regression testing and PC simulation environment testing.
[0003] However, related tests are mainly based on PC simulations, while robot controllers are embedded devices. The real hardware environment (such as control cabinet operation, real-time response, and hardware resource scheduling) differs from the simulation environment. Functions that pass simulation may have compatibility issues (such as program lag or errors) in real controllers. In addition, the closed nature of dedicated controllers means that commonly used testing tools cannot be used with dedicated controllers, and there is a lack of technical means to directly operate real controllers, leaving automated testing in real-world environments virtually nonexistent. Summary of the Invention
[0004] The purpose of this invention is to provide an automated testing method, equipment, and medium for industrial robots, enabling the coverage of more robot controller functions in a short time, improving controller stability, and solving the problems of low testing efficiency and insufficient real-world testing during iteration.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide an automated testing method for industrial robots, applied to a terminal. The terminal is connected to a controller of the industrial robot, and the controller is used to control the movement of the industrial robot. The method includes: obtaining the path of at least one test script; connecting a first server and a second server of the controller; sending a folder under the path to the first server; restarting the controller through the second server to enter test mode, so that the first server can copy the test script in the corresponding folder to the controller according to the path; sending a sequence of test commands based on an SDK to control the controller to run the test script, and obtaining the running results.
[0006] An embodiment of the present invention also provides an automated testing method for an industrial robot, applied to a controller for controlling the movement of the industrial robot. The method includes: obtaining a test script from a first server; re-entering a test mode according to control commands from a second server; and calculating the test script according to a sequence of test commands generated by the controller to generate a running result.
[0007] Embodiments of the present invention also provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described automated testing method for industrial robots.
[0008] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described automated testing method for industrial robots.
[0009] Compared to related technologies and existing technologies, the embodiments of the present invention allow the terminal to directly obtain the test script path from the database, avoiding manual input or searching of script paths. The database can also pre-store information such as script names and simulation test modes. The terminal automatically matches paths based on this information, adapting to the need for batch execution of multiple scripts during testing, reducing repetitive operations and improving testing efficiency. Furthermore, the terminal automatically connects to the controller's first server (for file transfer) and second server (for sending control commands). The first server copies the script to the controller, eliminating the need for manual file transfer via physical interface or manual commands, and the second server automatically sends a restart command. The controller enters test mode, replacing manual restarts and mode switching. Finally, it communicates with the real controller via the first and second servers to load and run scripts on the real hardware (e.g., restarting into test mode). This covers scenarios such as hardware real-time performance, resource scheduling, and control cabinet operation that cannot be verified in the simulation environment, solving the problem of insufficient real-world testing coverage. Simultaneously, the "test mode" entered by the controller after restarting is a unique operating state of the real controller, triggering functional verification in a real hardware environment. Thus, by reducing manual intervention and improving testing efficiency, this approach addresses the issues of low testing efficiency and insufficient real-world testing. Attached Figure Description
[0010] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0011] Figure 1 This is a flowchart of the control terminal of an automated testing method for an industrial robot applied to a terminal, provided in an embodiment of this application;
[0012] Figure 2 This is another flowchart of an automated testing method for an industrial robot applied to a terminal, provided in another embodiment of this application;
[0013] Figure 3 This is another flowchart of an automated testing method for an industrial robot applied to a controller, provided in another embodiment of this application;
[0014] Figure 4 This is a schematic diagram illustrating the principle of an automated testing method for an industrial robot controller provided in another embodiment of this application;
[0015] Figure 5 This is a flowchart illustrating an execution example of an automated testing method for industrial robots provided in another embodiment of this application;
[0016] Figure 6 This is a schematic diagram of a terminal structure provided in another embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0019] To address the issues of extremely low efficiency, time-consuming and labor-intensive nature, and susceptibility to omissions in manual testing; insufficient coverage of real controller testing; and a lack of technical means to directly operate real controllers, as commonly used testing tools are often unusable on dedicated controllers, this application provides an automated testing method for industrial robots. This method connects a terminal to a first and second server of the controller, obtains the test script path, copies it to the controller, and after restarting, sends a series of test command sequences based on the SDK to control the robot's controller to run the test script. Finally, the results of the industrial robot's operation are obtained. This method reduces manual intervention and improves testing efficiency, thereby solving the problems of low testing efficiency and insufficient real-world testing. To facilitate understanding of the automated testing method for industrial robots provided in this application, its different implementation processes will be described below.
[0020] In some embodiments, a flowchart of an automated testing method for industrial robots is shown, such as... Figure 1 As shown, it includes the following steps:
[0021] Step 301: The terminal obtains the path to at least one test script.
[0022] Step 302: The terminal connects to the first and second servers of the controller, sends the folder under the path to the first server, and restarts the controller through the second server to enter the test mode, so that the first server can copy the test script in the corresponding folder to the controller according to the path.
[0023] Step 303: The terminal sends a series of test commands based on the SDK to control the controller to run the test script and obtain the running results.
[0024] In steps 301 to 303, the terminal directly retrieves the test script path from the database, avoiding manual input or searching for script paths. The database can also pre-store information such as script names and simulation test modes. The terminal automatically matches paths based on this information, adapting to the need for batch execution of multiple scripts during testing, reducing repetitive operations, improving testing efficiency, and solving the problem of low testing efficiency. Next, the terminal automatically connects to the controller's first server (for file transfer) and second server (for restart control). The first server sends a folder containing several test scripts to the controller, eliminating the need for manual file transfer via physical interface or manual commands. The second server automatically sends a command to restart the controller into test mode, replacing manual restart and mode switching operations. Finally, the terminal dynamically generates test command sequences (such as enable, load program, speed setting, and run commands) based on the SDK, eliminating the need for manual command input. Simultaneously, the SDK automatically obtains the industrial robot's status information and operating results, avoiding manual observation and recording of status. Thus, the terminal directly connects to the industrial robot's actual controller ("terminal connecting to the industrial robot's controller"), rather than relying on a PC simulation environment. By communicating with the real controller through the first and second servers, the script can be loaded and run on the real hardware (such as restarting to enter test mode), covering scenarios such as hardware real-time performance, resource scheduling, and control cabinet operation that cannot be verified in the simulation environment, thus solving the problem of "insufficient test coverage in the real environment". At the same time, the "test mode" entered by the controller after restarting is a unique operating state of the real controller, which can trigger functional verification in the real hardware environment.
[0025] To facilitate better understanding by those skilled in the art Figure 1 The automated testing method for the industrial robot shown below will be further explained in the following steps.
[0026] In step 301, the test script paths are stored in the database. These paths can also be stored in different ways and locations depending on the application scenario and controller characteristics. For example, this application uses centralized management via Excel. The visual interface of Excel allows test engineers (and even non-technical personnel) to quickly understand and edit test case metadata (such as file paths, script names, supported environments, etc.), avoiding the technical hurdle of writing complex configuration files or code. The same spreadsheet format supports collaborative editing by multiple users (e.g., through shared documents), facilitating synchronized updates of the test case library by different engineers (development, testing, operations), which is suitable for team collaboration scenarios. Theoretically, other management methods can also be used, such as JSON / YAML configuration files, dedicated test case management tools (such as TestRail, ALM, etc.).
[0027] In some embodiments, for step 301, obtaining the path of at least one test script can be achieved by retrieving the path of the test script from the database, wherein the database also includes the name of the test script and the simulation test mode, and the terminal determines the path of the test script based on the name of the test script and / or the simulation test mode.
[0028] The database, acting as a "repository" for storing test script-related information, provides a unified management and query portal for path retrieval. Besides storing the actual paths of the test scripts, the database also contains two key attributes: "Name" and "Simulation Test Mode." The "Name" identifies the function or purpose of the test script, such as "Spraying Trajectory Test Script," allowing for quick identification of the script's core function. The "Simulation Test Mode" defines the simulation scenarios to which the script is applicable, such as "Offline Simulation Mode" or "Real-time Dynamic Simulation Mode," reflecting the script's operational characteristics in a simulation environment. When the terminal explicitly needs to execute a script for a specific function, it can directly input or specify a "name" (such as "spray trajectory test script") to retrieve a matching path from the database, quickly locating the script's storage location. If the terminal has already determined the simulation environment's operating mode based on testing requirements (such as "high-precision simulation mode"), it can filter out script paths suitable for this mode, ensuring the script runs correctly under specific simulation conditions. Alternatively, when both the functional attribute represented by the name and a specific simulation test mode are required (such as "spray trajectory test script + virtual debugging simulation mode"), the terminal can accurately match the path in the database using a combination of these conditions, ensuring the obtained script meets both functional requirements and is suitable for the simulation scenario, avoiding incorrect script acquisition due to inaccurate single conditions. This design makes the process of obtaining test script paths more flexible and precise, improving the efficiency and accuracy of test script calls, providing reliable preliminary preparation for the smooth execution of subsequent automated tests, and as the test case library is updated, the covered functions will increase, and the controller will become increasingly stable.
[0029] In some embodiments, for step 302, connecting the first server and the second server of the controller, sending a path to the first server, and restarting the controller through the second server can be implemented in the following way: connecting the first server of the controller, sending a folder under the path to the first server, so that the first server can copy the test script in the folder to the controller and return the processing result; if the processing result is that the copy is successful, then connecting the second server of the controller, and sending a reboot command through the second server to restart the controller to enter the test mode.
[0030] The terminal first establishes a connection with the controller's first server (which is primarily responsible for file transfer). Then, the terminal sends the folder containing the test scripts retrieved from the database to the first server. This folder contains several test scripts. The first server copies the test scripts to the controller and returns a processing result to the terminal (indicating whether the copy operation was successful). If the first server returns a successful copy result, the terminal further connects to the controller's second server (which is primarily responsible for controlling the controller's operating status). The terminal then sends a reboot command to the controller through the second server, causing the controller to restart and enter a specific test mode, preparing for the subsequent execution of the test scripts.
[0031] Industrial robot controllers, as embedded devices, typically have independent communication interfaces and protocols, and their functional modules (such as file systems and hardware control) are relatively isolated. Traditional testing tools cannot directly operate them, so separate servers are needed to connect to different functional modules. The first server (FTP server) connects to the controller's file system to read, transfer, and store script files, while the second server (Telnet server) connects to the controller's hardware control interface to perform low-level operations such as restarting and mode switching. This covers scenarios such as hardware initialization and firmware loading that cannot be verified in a simulation environment. This dual-server design avoids compatibility issues or functional conflicts that might arise from a single server handling both file transfer and hardware control simultaneously. Furthermore, this "transfer first, control later" step-by-step mechanism, through the state isolation of the two servers, avoids the process chaos that might occur if a step fails, as is possible with a traditional single server.
[0032] In some examples, step 303, which involves sending a series of test command sequences based on the SDK to control the controller to run the test script and obtain the results, may include the following process: Calling the SDK interface to send a series of test command sequences to the controller to run the test script. The test command sequences are dynamically generated based on predefined test cases and execution parameters included in the test script, and each sequence consists of at least one of an enable command, a program loader command, a speed setting command, and a run command. Calling the SDK interface to obtain the industrial robot's status information and comparing it with the expected status determines the running result. In this way, through standardized communication via the SDK interface, dynamic generation of test command sequences, and automated comparison of status information, efficient verification of the industrial robot controller's functions is achieved. Simultaneously, the automated process reduces manual intervention and achieves comprehensive testing of the actual controller.
[0033] Specifically, the SDK (Software Development Kit) provides a standardized communication channel between the terminal and the industrial robot controller, which solves the problem of "common testing tools cannot be directly operated" caused by the closed nature of dedicated controllers. Through the SDK interface, the terminal does not need to pay attention to the underlying hardware protocol or complex instruction format of the controller. It can directly call the preset functions to realize command sending and status acquisition, which greatly reduces the development difficulty.
[0034] This application's terminal employs a dynamic generation mechanism for test command sequences. The terminal dynamically generates test command sequences based on predefined test cases and execution parameters contained in the test script. The specific implementation of this dynamic generation mechanism can be as follows: Functional verification points (such as "joint motion accuracy test" and "program interruption recovery test") are pre-written in the test script, along with configuration parameters corresponding to each test case (such as target speed, motion trajectory coordinates, timeout time, etc.). Then, based on the functional requirements and execution parameters of the test cases, the sequence and parameters of the aforementioned enable commands are automatically combined. The test command sequence consists of at least one of the following commands: Enable command: activates the controller or robot motor, putting it into an operable state; Load program command: loads the test script into the controller's memory or a specified storage location; Speed setting command: configures the robot's motion speed, acceleration, and other dynamic parameters; Run command: triggers the controller to execute the loaded test script, etc.
[0035] After generating the test command sequence, the terminal sends the dynamically generated test command sequence to the controller via the SDK interface. The controller parses the sequence and executes them sequentially (e.g., first loading the script into memory, then running it at the set speed). This process is completely automated by the system, replacing the inefficient operation of "engineers entering commands line by line and observing feedback" in traditional manual testing. For example, manual testing requires manually entering enable(), load("test_script.prg"), set_speed(50%), and run(); while this invention sends a combination of commands at once via the SDK interface, and the controller automatically executes them sequentially.
[0036] After the terminal runs the test script according to the test command sequence, it obtains the industrial robot's status information in real time through the SDK interface. After obtaining the status information, it compares it with the expected state to determine the running result. In some examples, obtaining the industrial robot's status information and comparing it with the expected state to determine the running result can be achieved as follows: The SDK interface is called to obtain the industrial robot's motion parameter information; the error between the motion parameter information and the expected motion parameter information is calculated; and the running result is determined based on the relationship between the error and a threshold. Here, the motion parameter information is parsed from the status information, and the expected motion parameter information is parsed from the expected state.
[0037] The terminal acquires real-time status information of the industrial robot through the SDK interface, including but not limited to: motion parameters (joint angles, end effector coordinates, running speed); equipment status (motor temperature, error codes, program running progress); and controller status (memory usage, CPU load, communication connection status). The acquired actual motion parameters are compared with the expected motion parameters (derived from the expected state), and the error between the two is calculated. The running result is determined based on the relationship between the error and a preset threshold. If the error is less than or equal to the threshold, the industrial robot's operation meets expectations and is considered successful; if the error exceeds the threshold, the running result is considered a failure. In this way, by quantitatively analyzing the difference between the actual motion parameters and the expected parameters, an objective and accurate assessment of the industrial robot's operating status is achieved, ensuring the scientific validity and reliability of the test results.
[0038] After the test is completed, the test results can be reproduced to analyze test failures. In other words, in some embodiments, the process of the automated testing method for industrial robots can also be as follows: Figure 2 As shown, it may also include reproducing the test results to determine the cause of failure.
[0039] Step 304: The terminal obtains program running information and log information sent by the industrial robot's controller, wherein the program running information includes at least: program variables and running steps;
[0040] Step 305: The terminal determines the test completion rate based on the log information, and performs simulation testing based on the test tool according to the program variables and running steps to determine the cause of failure.
[0041] Specifically, the terminal is pre-installed with testing tools that can build a simulation environment to simulate the operation scenario of an industrial robot controller. When the test script fails to run on the real controller (e.g., motion parameter error exceeds the threshold), the terminal will obtain two types of key information from the controller: program running information, which includes at least program variables (such as motion parameter values and logic flags) and running steps (which line of code or functional module the script has executed to), to reflect the actual running status of the script, and log information, which records the operation events during the test (such as command reception time, error codes, and resource usage), to trace the test process.
[0042] In the terminal's testing tools, by parsing log information, the stage at which the test failure occurred can be identified. For example, if the log shows "The loading command succeeded, but the running command was not executed," it indicates that the failure occurred during the initialization stage after the script was loaded. If the log contains "The position error exceeded the threshold during movement," the failure occurred during the actual motion control stage. In this way, by parsing log information, the scope of troubleshooting can be narrowed down, and analysis efficiency can be improved.
[0043] The terminal utilizes testing tools, taking the acquired program variables and execution steps as input, to reproduce the operating state of the real controller in a simulation environment. For example, it inputs abnormal program variables (such as incorrect speed parameters) and observes whether the same error occurs in the simulation environment. It then debugs line by line according to the recorded execution steps, checking for logic loopholes (such as executing motion commands without loading necessary functions). In this way, the cause of failure can be accurately located, which may be due to abnormal program variables, logical errors in the execution steps, or incompatibility issues between the script and the hardware.
[0044] An automated testing method for industrial robot controllers is implemented by executing steps 301 to 305. This method involves obtaining the test script path, connecting the controller's first and second servers, sending the path to the first server, and restarting the controller via the second server to enter test mode. The first server then copies the test script to the controller. Based on the SDK, a sequence of test commands, including enable and load commands, is sent to control the controller to run the test script. The method acquires the industrial robot's status information and compares it to the expected state to determine the running result. If a failure occurs, the method combines program running information, log information, and simulation analysis using testing tools to analyze the cause of the failure. This method reduces manual intervention, improves testing efficiency, and solves the problems of low testing efficiency and insufficient real-world testing.
[0045] Another embodiment of this application relates to an automated testing method for industrial robots, applied to a controller, such as... Figure 3 As shown, Figure 3 A flowchart of the method is provided, which includes the following steps:
[0046] Step 501: The controller obtains the test script from the first server;
[0047] Step 502: The controller re-enters the test mode according to the control command from the second server.
[0048] Step 503: The controller calculates the test script based on a series of test commands generated by the controller and generates the running results.
[0049] For steps 501 and 502, the terminal first establishes a connection with the controller's first server (the first server is mainly responsible for file transfer). Then, the terminal copies the test scripts to the folder corresponding to the path on the first server. This folder contains several test scripts. The first server copies the test scripts to the controller and returns a processing result to the terminal (informing whether the copy operation was successful). If the first server returns a successful copy result, the terminal further connects to the controller's second server (the second server is mainly responsible for controlling the controller's operating status). The terminal sends a reboot command to the controller through the second server, causing the controller to restart and enter a specific test mode, preparing for the subsequent execution of the test scripts.
[0050] Industrial robot controllers, as embedded devices, typically have independent communication interfaces and protocols, and their functional modules (such as file systems and hardware control) are relatively isolated. Traditional testing tools cannot directly operate them, so separate servers are needed to connect to different functional modules. The first server (FTP server) connects to the controller's file system to read, transfer, and store script files, while the second server (Telnet server) connects to the controller's hardware control interface to perform low-level operations such as restarting and mode switching. This covers scenarios such as hardware initialization and firmware loading that cannot be verified in a simulation environment. This dual-server design avoids compatibility issues or functional conflicts that might arise from a single server handling both file transfer and hardware control simultaneously. Furthermore, this "transfer first, control later" step-by-step mechanism, through the state isolation of the two servers, avoids the process chaos that might occur if a step fails, as is possible with a traditional single server.
[0051] In some embodiments, step 503 can also be implemented by the following steps: obtaining the test script copied from the first server; restarting the system according to the reboot command sent by the second server to enter the test mode; wherein the first server is an FTP server and the second server is a Telnet server.
[0052] In this way, the controller obtains a copy of the script from the first server and automatically restarts the controller into test mode based on commands sent by the second server, replacing manual restart and mode switching operations. Through communication between the first and second servers and the real controller, the script is loaded and run on the real hardware (e.g., restarting into test mode), covering scenarios such as hardware real-time performance, resource scheduling, and control cabinet operation that cannot be verified in a simulation environment, thus solving the problem of "insufficient real-world testing coverage."
[0053] For ease of understanding, a specific implementation of the automated testing method for industrial robot controllers provided in this application is given here. This method is applied to a terminal connected to the controller of the industrial robot. The controller is used to control the movement of the industrial robot. The terminal is a PC, and the industrial robot controller is a real controller. Using the method provided in this application, before each update of the industrial robot controller, a test case library consisting of multiple test scripts can be automatically run on both the PC and the real controller. As the test case library is updated, the covered functions will increase, and the controller will become increasingly stable.
[0054] Please see Figure 4 , Figure 4 A schematic diagram illustrating the principle of automated testing for industrial robot controllers is provided. The method describes how Excel is used to manage the directory of test case files, QT is used to develop the interface for launching the test, and the robot controller is operated by calling the SDK interface. It simultaneously supports testing on PCs and real controllers, and outputs test results to log files for easy analysis and viewing.
[0055] Excel is used to centrally manage test case metadata, including key information such as "controller program directory," "controller FTP directory," and "test case library tags," providing a basic configuration for subsequent testing processes. Qt is used to develop the interface and build the SDK library. The PC HMI (Human-Machine Interface) and Control ARM (controller hardware) are the execution terminals for test cases. Qt tool commands (such as replacing FTP, restarting EXE, connecting to the server, uploading and decompressing ftp.zip, restarting the controller, connecting to the server, and running the test case library) will run on these two devices to achieve actual testing of the industrial robot controller. At the same time, relevant information during the testing process will be recorded and logs generated for easy viewing, analysis of test results, and troubleshooting.
[0056] SDK-based controller automation testing allows direct calls to relevant interfaces and test cases. The test case library can be run on PCs or real controllers, and it can be continuously updated. The framework was designed to accommodate the continuous updates of test scripts and test cases by different engineers. The modular test scripts and test cases only require adding the corresponding files and code as needed, without needing to be familiar with the entire testing tool's code, making it easier to maintain and use.
[0057] Please continue reading. Figure 5 , Figure 5An execution example of an automated testing method for industrial robots is provided. The folder paths corresponding to the test scripts are located in an Excel spreadsheet of the test case library. The spreadsheet specifies the storage path of each test case, the corresponding test script name, and whether it supports both actual and simulation testing. After starting the testing tool, it copies the folders that the test cases depend on from the corresponding directories one by one according to the test items in the Excel spreadsheet, then copies them to the actual controller, executes the corresponding test scripts, and outputs the test results to a log file. This execution flow is explained below.
[0058] 1. Extract the paths to the files that the test cases depend on from the test case library (Excel);
[0059] 2. Connect the PC to the controller, and then connect to the controller's FTP server. Copy the files that the test cases depend on in step 1 to the robot controller, or replace the existing test files in the controller.
[0060] 3. Then connect to the controller's telnet server, wait for the FTP file copy to complete, and then restart the controller using the reboot command;
[0061] 4. First, use the SDK to initialize the connection with the controller. Then, according to the steps of the test case, send the relevant commands to the controller. For example, if you need to test whether a program can run normally, you can first use the SDK to send the enable command, load program command, speed setting command, and run command to the robot controller in sequence. Then, use the SDK to obtain the robot's status information and determine whether there is an error when the robot controller is in a stopped state.
[0062] 5. After each test case's SDK command is executed, the robot's status will be obtained through the SDK and compared with the expected status. If it meets the expectation, the test passes; otherwise, an error file will be output to the log folder, and the subsequent test cases will continue to be executed.
[0063] 6. After all test cases have been executed, go to the log folder to view the test results.
[0064] In the testing phase after developing a functional package for an industrial robot controller, manual testing is performed first. Based on the test results, some related automated test cases are added. Then, industrial robot automated testing software is used to run the entire test case library, covering all test cases. Test logs are analyzed to identify defects such as abnormal speeding or program execution failures. These issues are reported to the developers for modification and re-verification until all test cases pass. This process ensures that all test cases in the test case library can be used normally in the newly released industrial robot controller, and it is time-efficient. A dedicated robot and computer can be used to perform automated testing. If these test cases were covered manually, it would not only be time-consuming but also potentially miss some test operations, causing problems to go undetected before release.
[0065] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0066] Additionally, embodiments of this application also provide an electronic device, such as... Figure 6 As shown, it includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to execute the automated testing method for industrial robots provided in the embodiments of this application (which will be described in detail later in this document and will not be repeated here).
[0067] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and the memory. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which also receives and transmits data to the processor. The processor manages the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor during operation.
[0068] Meanwhile, this application also provides a computer-readable storage medium that can be built into a device for storing a computer program, wherein the computer program, when executed by a processor, implements the automated testing method for industrial robots provided in this application (which has been described in detail above and will not be repeated here).
[0069] Those skilled in the art will understand that all or part of the steps in the above embodiments or the methods of the following embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0070] The above-described method of this application establishes an electronic device and storage medium for implementing an automated testing method for industrial robots, thereby reducing manual intervention and improving testing efficiency; thus solving the problems of low testing efficiency and insufficient real-world testing.
[0071] Those skilled in the art will understand that the above embodiments are specific examples of implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.
Claims
1. An automated testing method for industrial robots, characterized in that, The method is applied to a terminal, which is connected to the controller of an industrial robot, the controller being used to control the movement of the industrial robot, and includes: Obtain the path to at least one test script; The controller is connected to a first server and a second server. The first server sends the folder under the path to the first server, and the second server restarts the controller to enter the test mode, so that the first server can copy the test script in the corresponding folder to the controller according to the path. Based on the SDK, a series of test command sequences are sent to control the controller to run the test script and obtain the running results.
2. The automated testing method for industrial robots according to claim 1, characterized in that, The path to obtain at least one test script includes: The terminal obtains the path of the test script from the database, wherein the database also includes the name of the test script and the simulation test mode, and determines the path of the test script based on the name of the test script and / or the simulation test mode.
3. The automated testing method for industrial robots according to claim 1, characterized in that, The first server and the second server connecting the controller send the folder under the path to the first server, and restart the controller through the second server, including: A first server connected to the controller sends a folder under the specified path to the first server, so that the first server can copy the test scripts in the folder to the controller and return the processing result. If the processing result is a successful copy, then connect to the second server of the controller, and send a reboot command through the second server to restart the controller to enter test mode.
4. The automated testing method for industrial robots according to claim 1, characterized in that, The step of sending a sequence of test commands based on the SDK to control the controller to run the test script and obtain the running results includes: The SDK interface is invoked to send a series of test command sequences to the controller so that the controller runs the test script. The test command sequence is dynamically generated based on the predefined test cases and execution parameters contained in the test script. The test command sequence consists of at least one of the following: enable command, load program command, speed setting command, and run command. The SDK interface is called to obtain the status information of the industrial robot, and the status information is compared with the expected status to determine the running result.
5. The automated testing method for industrial robots according to claim 4, characterized in that, The step of calling the SDK interface to obtain the industrial robot's status information, comparing the status information with the expected status, and determining the running result includes: The motion parameter information of the industrial robot is obtained by calling the SDK interface. The error between the motion parameter information and the expected motion parameter information is calculated. The running result is determined according to the relationship between the error and the threshold. The motion parameter information is obtained by parsing the state information, and the expected motion parameter information is obtained by parsing the expected state.
6. The automated testing method for industrial robots according to claim 5, characterized in that, The terminal is also equipped with testing tools, and the terminal performs simulation testing based on the testing tools. After obtaining the running results, the method further includes: If the running result is a failure, the program running information and log information sent by the controller of the industrial robot are obtained, wherein the program running information includes at least: program variables and running steps; The test completion rate is determined based on the log information, and a simulation test is performed using the test tool based on the program variables and the running steps to determine the cause of failure.
7. An automated testing method for industrial robots, characterized in that, Applied to a controller for controlling the movement of the industrial robot, the method includes: Retrieve the test script from the first server; Re-enter test mode according to the control commands from the second server; The test script is processed based on a series of test commands generated by the controller to generate the running results.
8. The automated testing method for industrial robots according to claim 7, characterized in that, The step of obtaining the test script from the first server and re-entering the test mode according to the control commands from the second server includes: Obtain the test script copied from the first server; The system restarts itself by sending a reboot command from the second server to enter test mode; wherein the first server is an FTP server and the second server is a Telnet server.
9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform an automated testing method for an industrial robot as described in claims 1 to 6, or as described in any one of claims 7 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements claims 1 to 6, or performs the automated testing method for the industrial robot as described in any one of claims 7 to 8.
