Method and System for Automated Regression Testing of RPA Components
By designing an automated testing framework that does not rely on third-party tools in RPA component regression testing, the problems of poor testing adaptability and high maintenance costs in the existing RPA component regression testing methods are solved, and efficient, flexible and reliable component automated regression testing is achieved.
Patent Information
- Application Number
- CN202510314950.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-18
AI Technical Summary
The existing RPA component regression testing methods have problems such as poor test adaptability, high maintenance costs, unretrospective test results, inconsistent execution standards of human regression tests, lack of effective exception handling and repair mechanisms, and the inability to reuse component test dependencies.
A RPA component automation regression testing method is designed without relying on third-party tools, and the component automation regression testing is completed through the test framework encapsulated by the RPA tool itself. The method includes parameterized configuration, component general testing framework construction, test data collection and storage, data analysis, and message notification.
It realizes the flexibility and efficiency of component automation regression testing, reduces script maintenance costs, ensures traceability and consistency of test results, and improves the comprehensiveness and accuracy of RPA component regression testing.
Smart Images

Figure CN119847939B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of RPA testing, and particularly relates to a method and system for automated regression testing of RPA components. Background Art
[0002] RPA (Robotic Process Automation) is a technology that simulates and executes repetitive business tasks or processes through software robots. In the past few years, RPA has become an important tool for many enterprises to achieve digital transformation, especially in the fields of finance, accounting, customer service, supply chain management, etc. With the wide application of RPA technology, how to ensure the quality and stability of the RPA system has become the focus of enterprises. Especially when the RPA system undergoes version iteration, environment change or new scenario adaptation, how to effectively conduct regression testing of components to ensure the compatibility and correctness of automated processes has become a key issue in the testing field.
[0003] With the rapid development of RPA technology, traditional manual testing methods can no longer meet the needs of large-scale and efficient component regression testing. RPA testing faces the following challenges:
[0004] Frequent component changes: Since RPA tools need to continuously adapt to new systems, new page structures, and new scenarios, the number of components is increasing continuously, and the component functions are also constantly updated. Therefore, a large number of regression tests are required to ensure the quality of component releases.
[0005] Complex workflows: The processes automated by RPA are usually complex, involving the integration of multiple systems and applications. When testing, the correctness of each link and sub-process must be ensured.
[0006] Non-interactive execution environment: The execution of many RPA systems does not depend on manual interaction. Therefore, traditional user interface (UI) automation testing tools are difficult to be directly applied to RPA testing.
[0007] However, the existing methods for RPA component regression testing have the following disadvantages:
[0008] 1. The number and functions of components are updated frequently, resulting in poor test adaptability and high maintenance costs;
[0009] Existing RPA component testing often relies on third-party testing frameworks, and test cases and automation scripts for component testing need to be pre-built, making it not flexible enough for testing RPA components with frequent changes. Each time an RPA component is updated, the test cases and scripts need to be modified or rewritten, increasing the additional workload and labor costs.
[0010] 2. The results of component regression testing are not stored and cannot be traced;
[0011] The result data of manual tests are usually not stored in the database, or are only stored in the local file system, which makes data management and sharing difficult. In addition, the lack of centralized storage of test results often makes it impossible to conduct comprehensive analysis and monitoring across platforms and projects. The test team cannot read data online in real time, nor can they obtain test data from different environments and devices, which poses a challenge to the monitoring, evaluation and optimization of large-scale automated test projects.
[0012] 3. The problem of inconsistent execution standards for human regression testing;
[0013] When regression testing is performed manually, it is often limited by factors such as each executor's testing experience and familiarity with components, which often leads to inconsistent execution results and inability to determine whether the execution has passed. This brings hidden dangers to regression testing and subsequently affects the user experience.
[0014] 4. Lack of effective exception handling and repair mechanism;
[0015] Exception handling in RPA testing usually relies on manual intervention, and existing testing tools lack effective automatic repair mechanisms when encountering exceptions. Although some tools provide error capture and logging functions, once a test fails, it is usually necessary to manually fix the error and re-execute the test.
[0016] 5. Component test dependency files cannot be reused;
[0017] RPA tools often contain a large number of components that read and write files. After the execution of the files that the component functional regression depends on, the content or format is often changed and cannot be reused. Each regression requires repeated preparation of test files, which increases the testing cost.
[0018] Therefore, it is very important to design a method and system for automated regression testing of RPA components to achieve the purpose of completing automated regression testing of components through the test framework encapsulated by the RPA tool itself without relying on third-party tools. Summary of the invention
[0019] The present invention aims to overcome the problems in the prior art of the existing RPA component regression testing method, such as poor test adaptability, high maintenance cost, untraceable test results, inconsistent human regression test execution standards, lack of effective exception handling and repair mechanism, and inability to reuse component test dependency files. The present invention provides a method and system for RPA component automated regression testing that can achieve component automated regression testing without relying on third-party tools through a test framework encapsulated by the RPA tool itself.
[0020] To achieve the above invention objectives, the present invention adopts the following technical solutions:
[0021] A method for automated regression testing of RPA components, comprising the following steps:
[0022] S1. When the RPA components are regressed, parameterize and transfer the common configurations according to different execution environments, different client versions, and different executors;
[0023] S2. Build a component general test framework, fill the components to be tested into the component general test framework according to functional scenarios, and set the judgment criteria for whether the component functions pass and whether the component return value types are correct;
[0024] S3. Collect all test data and uniformly summarize all the test data into global variables;
[0025] S4. Store all the collected test data in a database and perform data analysis;
[0026] S5. After all the test data is stored in the database, judge whether to send a message notification according to the initialization configuration in step S1.
[0027] Preferably, step S1 includes the following steps:
[0028] S11. Add a custom dialog component, select an input box control, and configure the current executor and default value; add a radio box control, and configure the current execution environment and default value; add a radio box control, and configure whether to send a message notification after the operation ends; add a static text control, and configure the description of the current execution;
[0029] S12. Convert the custom dialog parameters into global variables; considering the large number of components to be tested, place the components with the same functional characteristics in the same task block for execution;
[0030] S13. Add an empty list variable list_data in the global variables to store the result data during the component execution process.
[0031] Preferably, step S2 includes the following steps:
[0032] S21. Package the component general test framework as follows:
[0033] Add a collapsible component named the test scenario of the component to be tested;
[0034] Add an exception acquisition component to ensure that the execution can continue when an error is encountered during the execution process;
[0035] Add the component to be tested and judgment conditions in the try statement block in sequence: judge whether the execution result of the component meets the expectation, and judge whether the return value type of the component is correct; the return value type of the component is used to affect the compatibility before and after component upgrade.
[0036] S22. Add a component for printing error logs in the exception branch.
[0037] S23. Execute the process for judging the return value type of the component, specifically as follows:
[0038] Obtain a data type component, pass in the component return value parameter, and directly return the type of the passed-in parameter after running.
[0039] S24. Restore the dependent files according to the function scenario of the component to be tested. The restoration process includes adding files and modifying files. The specific process is as follows:
[0040] Adding files: Create a word component, and after execution, add components for closing the document and deleting the file to delete the newly created word file.
[0041] Modifying files: For the component of writing text, a component for copying the file needs to be added before execution to back up the file to be operated. During execution, operate on the backup file, and then delete the backup file through the component for deleting the file after execution.
[0042] Preferably, in step S3, the test data includes positive result data, abnormal result data, and data with execution errors.
[0043] Preferably, step S4 includes the following steps:
[0044] S41. Add a component for connecting to the database and configure it according to the deployed database type information; after filling in the configuration and testing that the connection is normal, add a component for executing SQL statements and fill in the table creation statement.
[0045] S42. Loop through the empty list variable list_data in the global variables and batch insert the data into the database.
[0046] S43. After the data is stored in the database, it is necessary to query the execution situation of the current test group, and a sql query component needs to be added to analyze the results; all the statements of the sql query component use dynamic parameters to ensure generality for different test groups.
[0047] Preferably, in step S5, the types of message notifications support Feishu, DingTalk, and enterprise WeChat notification robots; the formats of message notifications include text, MarkDown (MarkDown is a lightweight markup language), and developer mode.
[0048] Preferably, when the type of message notification supports Feishu, step S5 includes the following steps:
[0049] S51, add a Feishu robot component, input the custom robot Webhook address that has been added to the Feishu group, send a test message after input, and receiving the test message indicates successful connection; then set the content format, select the rich text mode, and input the corresponding code.
[0050] The present invention also provides a system for automated regression testing of RPA components, including:
[0051] An initialization configuration module, which is used to parameterize and transfer common configurations according to different execution environments, different client versions, and different executors during the regression of RPA components;
[0052] A component test case execution module, which is used to build a general component test framework, fill the component to be tested into the general component test framework according to functional scenarios, and set the judgment criteria for whether the component function passes and whether the component return value type is correct;
[0053] A result collection module, which is used to collect all test data and summarize all test data into global variables;
[0054] A data analysis module, which is used to store all the collected test data in a database and perform data analysis;
[0055] A message push module, which is used to determine whether to send a message notification according to the initialization configuration after all test data is stored in the database.
[0056] Compared with the prior art, the present invention has the following advantages: (1) The testing scheme of the present invention is unique in the industry. By encapsulating the core steps of each link of the regression test into a visual framework, the connection between the various links of the RPA regression test is opened up, so that test engineers who have just entered the RPA field can quickly get started and reduce a lot of learning costs for component functions; (2) The present invention classifies components by function and automatically performs regression testing, ensuring that all functional scenarios are covered, solving the problem of test omissions caused by frequent updates of the number of components and functions, and improving the comprehensiveness and accuracy of the test; (3) Compared with third-party tools and code frameworks, the testing scheme of the present invention does not need to maintain a complete set of code environments separately, but only needs to provide component dependencies. It can be run directly, and can respond more quickly to the problem of frequent updates and changes in the number of components and functions, reducing the workload and labor costs of script maintenance; (4) The technical solution of the present invention optimizes the test process and collects and stores test data in a unified manner through a database storage solution, solving the problem of data opacity and avoiding the problems of data dispersion and inconsistent formats in traditional methods, which facilitates subsequent tracing and data analysis; (5) The technical solution of the present invention eliminates the problem of inconsistent manual judgment standards through the component assertion module encapsulated in the framework, thereby ensuring the consistency and reliability of regression testing; (6) The innovation, comprehensiveness, efficiency and ease of use of the technical solution of the present invention can greatly improve the performance of RPA component regression testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of the method for automated regression testing of RPA components in the present invention;
[0058] Figure 2 This is an overall architecture diagram of the method for automated regression testing of RPA components in the present invention;
[0059] Figure 3 A flow chart of the process of encapsulating the component universal test framework in the present invention;
[0060] Figure 4 A flow chart of the data analysis process in the present invention;
[0061] Figure 5 A flowchart of the method for automated regression testing of RPA components provided in an embodiment of the present invention in practical application. DETAILED DESCRIPTION
[0062] To more clearly illustrate the embodiments of the present invention, the specific implementation manners of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, and other implementation manners can also be obtained.
[0063] The present invention provides a method for automated regression testing of RPA components. As Figure 1 shown, first, the RPA components to be tested are divided into different regression test groups according to functional characteristics. In this embodiment, word and file processing categories are taken as examples. An initialization configuration module is built, which includes the executor triggering this regression, the running environment, whether to send message notifications, execution remarks, and global variable settings. Then a component general test framework is built, which supports regression testing of different types of components, including judging whether the component functions are implemented, judging whether the types of component return values are correct, writing positive and exception assertions, executing exception handling, and a post-processing module after execution, covering all component function scenarios under the word classification and file processing classification. During the test execution process, all test data are temporarily stored in variables and then the temporarily stored data are stored in the database. The test framework will automatically analyze the execution results of the regression test, count the total number of test cases, the number of successful test cases, the number of failed test cases, and the success rate under the current test group, and determine whether to send message notifications according to the initialization configuration based on the analysis results.
[0064] Specifically, the method for automated regression testing of RPA components of the present invention includes initialization configuration, component test case execution, result collection, data analysis, and message push. The overall architecture is as Figure 2 shown, specifically as follows:
[0065] 1. Initialization configuration
[0066] When the RPA components are regressed, due to different execution environments, different client versions, and different executors, common configurations need to be passed parametrically. The specific steps are as follows:
[0067] 1-1. Add a custom dialog box component, select an input box control, and configure the executor and default value for this execution; add a radio box control, and configure the execution environment and default value for this execution; add a radio box control, and configure whether to send message notifications after the execution ends; add a static text control, and configure the description of this execution.
[0068] 1-2. Convert the custom dialogue parameters into global variables. Since the number of components to be tested is huge, in actual operation, components with the same functional characteristics will be placed in the same task block for execution. For example, the word and file processing task groups mentioned above will be split into two process blocks, namely the word component and the data processing component. This requires converting the parameters defined in the initialization configuration into global variables to achieve cross-process block calls. Reassign the local variables input_executeby, input_env, input_send_message, and input_remark through the variable setting component and pass them to the global variables var_executeby, var_env, var_send_message, and var_remark.
[0069] 1-3. Add an empty list variable list_data to the global variables to store the result data during the execution of the component.
[0070] 2. Component test case execution
[0071] For the component test case execution part, a common test framework for components needs to be built. Fill the components under the test group into the test framework according to the functional scenarios and set the judgment criteria for passing or not. The specific steps are as follows:
[0072] 2-1. Encapsulate the common test framework for components. The process is as Figure 3 shown. Add a collapsible component named the test scenario of the component to be tested, and then add an exception acquisition component to ensure that the execution can continue when an error is encountered during the execution. Add the component to be tested and judgment conditions in the try statement block in turn: judge whether the execution result of the component meets the expectation, and judge whether the return value type of the component is correct. The return value type of the component affects the compatibility before and after the component upgrade. For example, if the return value type changes after the component is updated, such as from a list to a dictionary, it will cause the process using the component before the upgrade to be unusable. Therefore, the return value judgment part is encapsulated in the framework.
[0073] 2-2. Add a component for printing error logs in the exception branch. Considering the flexibility of the regression process package, it is necessary to support not only automatic regression execution but also manual trigger execution, so that the execution error situation of the component can be intuitively seen during the manual execution. The error log content is as follows:
[0074] The component function judgment fails: f'Component name: test scenario, function exception';
[0075] The component return value type judgment fails: f'Component name: test scenario, return value exception';
[0076] Abnormal component execution process: f'Component name: Process execution exception, reason for exception: '+str(ex);
[0077] 2-3, Component return value type judgment. Add a component to obtain the data type, pass in the component return value parameter, and directly return the type of the passed-in parameter after running. It can also be achieved by type(component return value).
[0078] 2-4, Post-processing after component execution. According to the functional scenario of the component under test, it is necessary to restore the dependent files. The restoration process includes adding files and modifying files:
[0079] Adding files: For example, when creating a new word component, after execution, it is necessary to add components to close the document and delete the file to delete the newly created word file to ensure the integrity of the data for the next execution.
[0080] Modifying files: For example, for the component of writing text, it is necessary to add a component to copy the file before execution to back up the file to be operated on, operate on the backup file during execution, and then delete it through the component to delete the file after execution.
[0081] 3. Result collection
[0082] The framework comes with positive result collection, exception result collection, and execution error collection. The data is uniformly summarized into the global variable list_data. After adding the component to insert code, write according to the actual scenario.
[0083] Positive result collection: list_data.append(["Component name","Component test scenario","Yes","Function normal"]);
[0084] Exception result collection: list_data.append(["Component name","Component test scenario","No","Function abnormal"]);
[0085] Execution error collection: list_data.append(["Component name","Component test scenario","No","Process execution exception, reason for exception: "+str(ex)]).
[0086] 4. Data analysis
[0087] After the execution of the Word and file processing regression process package is completed, the execution results have been automatically summarized into the global variable list_data. At this time, it is necessary to store the collected data in the database
[0088] 4-1, Create a data table. The process is as follows Figure 4As shown, add a database connection component. According to the configuration information of the deployed database type, it supports MySQL, SQL server, postgresql, Oracle, etc. In this article, mysql is used as an example. After filling in the configuration and testing the connection is normal, add an SQL statement execution component and fill in the table creation statement.
[0089] The table creation statement is as follows:
[0090] CREATE TABLE t_regression_result_data (
[0091] id INT AUTO_INCREMENT PRIMARY KEY, -- Auto-incrementing ID, used as the primary key
[0092] package_name VARCHAR(255) NOT NULL, -- Process package name
[0093] component_name VARCHAR(255) NOT NULL, -- Component name
[0094] component_test_scene VARCHAR(255) NOT NULL, -- Component test scenario
[0095] is_passed BOOLEAN NOT NULL, -- Whether the execution is passed (0: not passed, 1: passed)
[0096] execution_desc TEXT, -- Execution description
[0097] run_duration INT NOT NULL, -- Running duration (unit: seconds)
[0098] addtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- Creation time, default is the current time
[0099] updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -- Update time, automatically updated to the current time );
[0101] 4-2. Loop through the global variable list_data and batch insert the data into the database, as Figure 4As shown, the SQL batch insertion data component is used here;
[0102] 4-3. After the data is stored in the database, it is necessary to query the execution status of the current test group. An SQL query component needs to be added to analyze the results. All SQL statements here use dynamic parameters to ensure generality for different test groups.
[0103] Number of successfully executed test cases: sql_success_count
[0104] SELECT COUNT(*)
[0105] FROM t_regression_result_data t1
[0106] JOIN (
[0107] SELECT package_name, MAX(addtime) AS latest_addtime
[0108] FROM t_regression_result_data
[0109] GROUP BY package_name
[0110] ) t2 ON t1.package_name = t2.package_name
[0111] AND t1.addtime = t2.latest_addtime
[0112] WHERE t1.issuccess = 1
[0113] AND t1.package_name LIKE %s;
[0114] sql_fail_count: Query the number of test cases with failed execution
[0115] sql_total_count: Query the total number of executed test cases
[0116] sql_success_rate: Query the execution success rate.
[0117] 5. Message push
[0118] After the data is stored in the database, it is determined whether to send a message notification according to the initialization configuration. The message notification types support Feishu, DingTalk, and enterprise WeChat notification robots, and the formats include text, MarkDown (MarkDown is a lightweight markup language), and developer mode. Taking the Feishu robot configuration as an example, the specific process of message push is described as follows:
[0119] 5-1. Add the Feishu robot component, input the custom robot Webhook address that has been added to the Feishu group. After inputting, send a test message. Receiving the test message indicates a successful connection. Then set the content format, select the rich text mode, and input the corresponding code.
[0120] After the regression process package is executed, the following message notification results are obtained:
[0121] Regression process package operation result
[0122] Process package name: Word + file processing
[0123] Data overview: Total number of test cases - 80, number of successes - 80, number of failures - 0
[0124] Pass rate: 100.0000%
[0125] Start time: 2023-08-08 10:33:00
[0126] Operating environment: release
[0127] Operation result: Click to view the report
[0128] Executor: 567
[0129] Remarks: 660 - upgrade.
[0130] In addition, the present invention also provides a system for automated regression testing of RPA components, including:
[0131] Initialization configuration module, used to parameterize and transfer common configurations according to different execution environments, differences in client versions, and different executors during RPA component regression;
[0132] Component test case execution module, used to build a component general test framework, fill the components to be tested into the component general test framework according to functional scenarios, and set judgment criteria for whether the component functions pass and whether the component return value types are correct;
[0133] Result collection module, used to collect all test data and uniformly summarize all test data into global variables;
[0134] A data analysis module, which is used to store all the collected test data into a database and perform data analysis;
[0135] A message push module, which is used to determine whether to send a message notification according to the initialization configuration after all the test data is stored in the database.
[0136] Based on the technical solution of the present invention, the following case scenario is used to illustrate the implementation process of the present invention in actual application. The specific application implementation plan is as follows:
[0137] Example 1: Regression test of word - type components for a test task.
[0138] Initialization: Prepare the test dependency files for word components, fill in the executor for this time, select release for the execution environment, select to send a message notification and fill in the remarks as required. The process is as Figure 5 shown below, specifically as follows:
[0139] 1. Build a general component test framework;
[0140] 2. Add the newly created word components under the word classification to the test framework;
[0141] 3. Add positive result assertions, exception result assertions, and execution exception assertions;
[0142] 4. Collect the execution results into the list list_data, and the collected results are: [["Open the document", "doc format", "Yes", "Function is normal"], ["Open the document", "doc format", "Yes", "Return value is normal"]];
[0143] 5. Perform post - processing after execution and delete the newly created word file;
[0144] 6. Traverse the list_data data and write it into the configured database;
[0145] 7. Perform data analysis;
[0146] Query the number of test cases with execution failures:
[0147] SELECT COUNT(*)
[0148] FROM t_regression_result_data t1
[0149] JOIN (
[0150] SELECT package_name, MAX(addtime) AS latest_addtime
[0151] FROM t_regression_result_data
[0152] GROUP BY package_name
[0153] ) t2 ON t1.package_name = t2.package_name
[0154] AND t1.addtime = t2.latest_addtime
[0155] WHERE t1.issuccess = 0
[0156] AND t1.package_name LIKE %s;
[0157] Query the total number of executed test cases:
[0158] SELECT COUNT(*)
[0159] FROM t_regression_result_data t1
[0160] JOIN (
[0161] SELECT package_name, MAX(addtime) AS latest_addtime
[0162] FROM t_regression_result_data
[0163] GROUP BY package_name
[0164] ) t2 ON t1.package_name = t2.package_name
[0165] AND t1.addtime = t2.latest_addtime
[0166] WHERE t1.package_name LIKE %s;
[0167] Query the execution success rate:
[0168] sql_success_rate = sql_success_count / sql_total_count;
[0169] 8. Check the execution status of the message notification word test group;
[0170] 9. Screen the components that fail the screening and submit bugs to the corresponding development colleagues;
[0171] 10. Track and verify the submitted bugs;
[0172] 11. Output a test report according to the execution situation.
[0173] Example 2: Regression testing of file processing component in test task
[0174] Initialization: Prepare the test dependency files for the file processing component, fill in the executor of this time, select release for the execution environment, select to send message notifications and fill in remarks as required. Refer to Figure 5 the process shown below:
[0175] 1. Copy the established general component test framework;
[0176] 2. Fill the components to be tested under file processing classification into the test framework according to different test scenarios, and set post-execution processing to ensure that the files are restored to the initial state after execution;
[0177] 3. Add positive result assertions, exception result assertions, and execution exception assertions;
[0178] 4. Collect the execution results into the list list_data;
[0179] 5. Manually click to run and execute the regression process package;
[0180] 6. Check the components that fail the assertions printed in the output, and submit bugs to the corresponding development colleagues;
[0181] 7. Track and verify the submitted bugs;
[0182] 8. Output a test report according to the execution situation.
[0183] The innovation points of the present invention are as follows:
[0184] 1. Unique visual regression test framework:
[0185] Provide a visual regression test framework to help test engineers newly entering the RPA field get started quickly and reduce the learning cost.
[0186] 2. Comprehensive coverage of regression test scenarios:
[0187] Through function classification and automated execution, ensure that all test scenarios are covered, and solve the problem of test omissions caused by frequent updates.
[0188] 3. Easy-to-use visual configuration:
[0189] It can run directly only by providing component dependencies without a complex code environment, reducing script maintenance and labor costs.
[0190] 4. Unified data collection and storage:
[0191] The test data is stored uniformly through the database, avoiding data dispersion and format inconsistency problems, and improving data transparency and traceability.
[0192] 5. Standardized regression test judgment:
[0193] The assertion module is used to unify the judgment criteria to ensure the consistency and reliability of the regression test results.
[0194] The above is only a detailed description of the preferred embodiments and principles of the present invention. For those of ordinary skill in the art, according to the idea provided by the present invention, there will be changes in the specific implementation manners, and these changes should also be regarded as the protection scope of the present invention.
Claims
1. A method for automated regression testing of RPA components, characterized in that: The steps include: S1, when the RPA component is regressed, the common configuration is parameterized and passed according to the different execution environments, client versions, and executors; S2, build a component general test framework, fill the components to be tested into the component general test framework according to the functional scenarios, and set the judgment criteria for whether the component function is passed and whether the component return value type is correct; S3, collects all test data and aggregates all test data into global variables; S4, storing all collected test data into the database and performing data analysis; S5, after all test data are stored in the database, determine whether to send a message notification according to the initialization configuration of step S1; Step S2 includes the following steps: S21, encapsulates the component general test framework as follows: Add a folding component and name it as the test scenario of the component to be tested; Add an exception acquisition component to ensure that execution can continue if an error is encountered during execution; Add the components to be tested and the judgment conditions in the try statement block, which are: judging whether the component execution result meets expectations, judging whether the component return value type is correct; the component return value type is used to affect the compatibility before and after the component upgrade; S22, adding a print error log component in the abnormal branch; S23, the execution component return value type judgment process is as follows: Get the data type component, pass in the component return value parameter, and directly return the type of the passed parameter after running; S24, based on the functional scenario of the component to be tested, the dependent files are restored. The restoration process includes adding files and modifying files. The specific process is as follows: Add file: Create a new word component. After the execution is completed, you need to add the close document and delete file components to delete the newly created word file; Modify file: Write text component. You need to add copy file component before execution to back up the file to be operated. Operate the backup file during execution. After execution, delete the backup file through delete file component.
2. The method for automated regression testing of RPA components according to claim 1, characterized in that: Step S1 includes the following steps: S11, add a custom dialog component, select an input box control, configure the executor and default value for this time; add a radio button control, configure the execution environment and default value for this time; add a radio button control, configure whether to send a message notification after the operation ends; add a static text control, configure the description of this execution; S12, convert the custom dialogue parameters into global variables; considering the large number of components to be tested, put the components with the same functional characteristics into the same task block for execution; S13, adding an empty list variable list_data in the global variables to store the result data during the component execution process.
3. The method for automated regression testing of RPA components according to claim 1, characterized in that: In step S3, the test data includes positive result data, abnormal result data and execution error data.
4. The method for automated regression testing of RPA components according to claim 1, characterized in that: Step S4 includes the following steps: S41, add a database connection component and configure information according to the deployed database type; after filling in the configuration and testing the connection, add an SQL statement execution component and fill in the table creation statement; S42, looping through the empty list variable list_data in the global variable, and inserting the data into the database in batches; S43, after the data is stored in the database, it is necessary to query the execution status of the current test group, and it is necessary to add a SQL query component to analyze the results; the statements of the SQL query component all use dynamic parameters to ensure that different test groups are common.
5. The method for automated regression testing of RPA components according to claim 1, characterized in that: In step S5, the type of the message notification supports Feishu, DingTalk, and enterprise WeChat notification robots; the format of the message notification includes text, MarkDown, and developer mode.
6. The method for automated regression testing of RPA components according to claim 5, characterized in that: When the type of message notification supports Lark, step S5 includes the following steps: S51, add the Feishu robot component, enter the custom robot Webhook address that has been added in the Feishu group, send a test message after entering, and receiving the test message indicates a successful connection; then set the content format, select rich text mode, and enter the corresponding code.
7. A system for automated regression testing of RPA components, used to implement the method for automated regression testing of RPA components according to any one of claims 1 to 6, characterized in that: The system for automated regression testing of RPA components includes: Initialization configuration module, used to parameterize and transfer common configurations according to different execution environments, client versions, and executors during RPA component regression; The component use case execution module is used to build a component general test framework, fill the components to be tested into the component general test framework according to the functional scenarios, and set the judgment criteria for whether the component function is passed and whether the component return value type is correct; The result collection module is used to collect all test data and aggregate all test data into global variables; Data analysis module, used to store all collected test data into the database and perform data analysis; The message push module is used to determine whether to send a message notification based on the initial configuration after all test data is stored in the database.
Citation Information
Patent Citations
Cross-platform compatibility automatic testing method
CN119336650A
Method for automatically testing interface based on RPA
CN119537213A