Method for automatically testing interface based on RPA
Through the RPA-based interface automation testing method, the problems of high costs, high technical thresholds and environmental dependence in the existing automated testing methods are solved, and a zero-code basis, low-cost and efficient automated testing process is realized. It is suitable for various testing environments, including verification codes or SMS verification code systems.
Patent Information
- Application Number
- CN202411497943.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-28
AI Technical Summary
The existing automated testing methods have high initial investment and maintenance costs, high technical barriers, strict dependence on the test environment, and special processing difficulties for verification codes or SMS verification code systems.
Using RPA-based interface automation testing method, through RPA's graphical interface and predefined operations, the automated process design can be completed by dragging out nodes and configuration, reducing coding requirements and technical thresholds.
It realizes the basic requirements of zero code, reduces labor costs and test cycles, improves the accuracy and reliability of tests, simplifies the configuration and maintenance of the test environment, and has the ability to process verification codes or SMS verification code systems.
Smart Images

Figure CN119537213A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated testing, and in particular relates to a method for performing automated interface testing based on RPA. Background Art
[0002] Automated testing is a process that converts human-driven testing behavior into machine execution. It uses software tools or scripts to automatically execute predefined test cases to check whether the functions, performance, and user interface of software applications meet expectations. It simulates manual testing steps to automatically test the software by executing test scripts written in a programming language. It includes all testing stages and is cross-platform compatible and process-independent.
[0003] In fact, strictly speaking, automated testing can be divided into broad and narrow definitions. The broad definition is test automation, which emphasizes that the entire testing process is completed by a computer system, and has a wider scope. The narrow definition is what we usually call automated testing, which mainly refers to automatically executing a certain test task through an automated tool, and has a relatively small processing scope.
[0004] The current automated testing methods include developing a test plan; analyzing test requirements; designing test cases; setting up a test environment; writing test scripts; executing tests and analyzing results; maintaining and optimizing test scripts.
[0005] However, there are some problems with the existing technology: 1. High initial investment and maintenance costs: The development of automated testing frameworks, tools, and test scripts requires a lot of time and resources; as the software system is updated and changed, the test scripts need to be constantly updated and maintained, which also adds additional costs.
[0006] 2. High technical threshold and strict requirements on personnel skills: Automated testing requires testers to have certain programming and scripting skills, as well as in-depth understanding of the use of test frameworks and tools. This requires at least some members of the test team to have a high level of technical skills. When testers are not skilled enough, the quality of the test scripts may be low, which in turn affects the accuracy and reliability of the test results.
[0007] 3. Strict reliance on the test environment: Automated testing has high requirements for the consistency of the test environment. Any environmental differences may lead to test failures. Therefore, a lot of effort needs to be invested in configuring and maintaining the test environment. When the software operating environment changes (such as operating system upgrades, browser updates, etc.), the automated test script may need to be modified and adapted accordingly.
[0008] 4. Systems that require a verification code or SMS verification code to log in require special handling.
[0009] Therefore, we propose a method for interface automation testing based on RPA. Summary of the invention
[0010] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method for performing automated interface testing based on RPA. By performing automated testing on the basis of RPA, it is only necessary to open RPA, drag out nodes, and perform configuration to complete the automated process design. The operation is relatively simple and convenient.
[0011] The present invention is implemented as follows: a method for performing interface automation testing based on RPA, the method is based on RPA and includes the following steps:
[0012] S1, develop a test plan: analyze the requirements for interface testing, determine the test objectives and scope, identify test resources, determine the test type and method, develop a test strategy, and determine quality standards;
[0013] S2, build a test framework: build an environment suitable for interface testing, including configuring hardware devices, installing operating systems, and installing development tools;
[0014] S3, write test scripts: First, use RPA's design tool to create an automated test process. Then, based on the designed test process, use RPA's development tool to write an automated script. The script is used to simulate user operations, send requests, and receive responses.
[0015] S4, Integration Testing: Combine the automated testing process with the continuous integration (CI) and continuous deployment (CD) processes to ensure that the code can be automatically tested and problems can be discovered in a timely manner;
[0016] S5, execute test script: run the written test script to perform automated testing;
[0017] S6, test result analysis: Analyze the results of the test execution to verify whether the software functions meet expectations and evaluate the effectiveness of automated testing;
[0018] S7, Maintain test scripts: Maintain and update test scripts to ensure the continuity and effectiveness of testing.
[0019] Optionally, the hardware devices in the test framework constructed in S2 include servers, client devices and network devices.
[0020] The development tools include automated testing tools, performance testing tools and security testing tools to support different types of testing.
[0021] Optionally, the test script writing in S3 is implemented based on the scripting language of RPA, and the creation of the automated test process includes: starting the RPA design tool, creating a project process, dragging out nodes and configuring information and conditions;
[0022] The automated testing includes interface automated testing and UI automated testing.
[0023] Optionally, the interface automation testing step includes:
[0024] S31, use interface test platform and tabular data to organize and manage parameters and expected results;
[0025] S32, log in to the system and obtain a token identity authentication, which is based on the information verification method of RPA;
[0026] S33, thereby obtaining the parameters of the interface and splicing them into the parameters;
[0027] S34, query whether the SQL database query language is configured, and determine whether to use the database configuration node to connect to the database;
[0028] S35, configure the HTTP request node, assemble the acquired parameter information, and make a test interface request;
[0029] S36, obtaining the fields involved in the assertion configured in the table data, extracting the field values to be asserted, comparing the expected results with the actual results, and filling the actual values of the test results into the table data;
[0030] The parameters and expected results include the address of the API access, the interface request type, the input parameters, the database query result sql, the asserted field name, the expected result, and whether testing is required.
[0031] The UI automation test includes:
[0032] S37, obtaining the browser to be tested, and using the node to open the corresponding browser;
[0033] S38, use navigation to open the URL;
[0034] S39, obtain verification and log in;
[0035] S310, obtaining actual values of the web page element display value and attribute value, and comparing them with expected values.
[0036] Optionally, the S4 integration test includes version control, automatic building, triggering mechanism, test execution, result reporting and continuous deployment;
[0037] The version control is to ensure that all test scripts and related resources are stored in the version control system;
[0038] The automatic construction: setting up a CI server to automatically build an interface automation test project;
[0039] The trigger mechanism: determines the time when the CI server triggers the build and test through a polling mechanism;
[0040] The test execution: executing the automated test script on the CI server;
[0041] The result report: generates a detailed report on the test results;
[0042] Continuous deployment: Deploy tested code to the production environment to shorten the release cycle and increase delivery speed.
[0043] Optionally, the automatic construction includes the following steps:
[0044] Step 1: Select the corresponding build tool according to the language and framework of the project;
[0045] Step 2: Define build tasks and processes;
[0046] Step 3: Integrate the build process into the continuous integration (CI) tool;
[0047] Step 4: Set code submission as a specific event in the code repository to trigger automatic building;
[0048] Step 5: After the trigger conditions are met, the CI tool automatically detects the code, executes the build script, and generates the corresponding output;
[0049] Step 6: Automated testing is included in the build process to ensure code quality;
[0050] Step 7: After the build is successful and passes all tests, it is automatically deployed to the test environment.
[0051] Optionally, in the process of automatically checking out the code in step 5, the Jenkins automation server divides the construction process into multiple stages through a parallel construction mechanism, and allows these stages to be executed in parallel on multiple computers under the control of the server;
[0052] The automatic code detection in step 5 and the automatic detection in step 6 include incremental construction, and the incremental construction includes the following steps:
[0053] Detect files that have changed since the last build through the version control system;
[0054] When you compile the code again, only the changed source code is compiled;
[0055] Run unit tests and integration tests associated with the changed code to ensure that the changes have not introduced new errors;
[0056] Deploy the compiled files and changed configuration to the test environment.
[0057] Optionally, the step of analyzing the detection results in S6 includes:
[0058] After the test execution is completed, collect all relevant test results including: test case execution status (pass or fail), error messages and screenshots;
[0059] Identify failed test cases and analyze the reasons for failure;
[0060] For the passed test cases, check if there are any anomalies;
[0061] Evaluate test coverage, check whether all functional points have been tested, and detect whether there are any missing test scenarios to determine whether corresponding test cases need to be supplemented;
[0062] According to the analysis results, formulate corresponding improvement measures, including fixing software defects, optimizing test cases and adjusting test strategies;
[0063] After implementing the corrective actions, re-execute the test cases to verify whether the problem has been resolved;
[0064] Organize the entire testing process and results into a report to understand the overall situation and quality level of the test.
[0065] Optionally, the test coverage includes requirement coverage and code coverage;
[0066] The evaluation of the requirement coverage is used to analyze the correspondence between requirements and test cases to ensure that all requirements are converted into test cases and executed;
[0067] The code coverage is evaluated using the Git version control system, and coverage information is combined to generate a coverage report with incremental information.
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] 1. Zero code foundation requirement: RPA tools use graphical interfaces and predefined operations to allow testers to create automated test scripts without writing any code. Testers can define complex test processes by simply dragging, clicking, and configuring.
[0070] Easy to use: RPA tools are usually designed to be intuitive and easy to use, so even testers without any programming experience can quickly get started. Through simple training and practice, testers can master the basic skills of automated testing.
[0071] 2. Reduce labor costs: Automated testing can replace some manual testing work, reducing the reliance on a large number of testers. Enterprises can focus limited testing resources on more complex and challenging testing tasks, improving testing efficiency and quality.
[0072] Shorten the testing cycle: RPA tools can quickly build and execute automated test scripts, greatly shortening the testing cycle. This helps companies release products faster and seize market opportunities.
[0073] Reduce errors and rework: Automated testing reduces the possibility of human error and improves the accuracy and reliability of testing. At the same time, through automated error location and reporting, testers can find problems and fix them faster, reducing the time and cost of rework.
[0074] 3. Script maintainability: RPA tools usually provide script editing and management functions, so that testers can easily modify and maintain automated test scripts. When test requirements change, testers only need to make simple adjustments to the scripts without having to write new scripts from scratch; Integration and scalability: RPA tools can usually be integrated with other test tools and systems to form a complete test solution. At the same time, with the development of technology and changes in test requirements, RPA tools can also be expanded and upgraded to meet new test requirements.
[0075] 4. RPA has a unique verification method for login systems that require verification. It can perform targeted system verification and facilitate the acquisition of tokens through the login interface.
[0076] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a schematic diagram of the method architecture provided by the present invention;
[0078] Figure 2 It is a schematic diagram of the automated testing algorithm provided by the present invention;
[0079] Figure 3 It is a flow chart of the verification code picture system provided by the present invention. DETAILED DESCRIPTION
[0080] In order to further understand the content, features and effects of the present invention, the following embodiments are given as examples and described in detail with reference to the accompanying drawings.
[0081] like Figures 1 to 3 As shown, an embodiment of the present invention provides a method for performing interface automation testing based on RPA, and the method is based on RPA and includes the following steps:
[0082] S1, develop a test plan: analyze the requirements for interface testing, determine the test objectives and scope, identify test resources, determine the test type and method, develop a test strategy, and determine quality standards;
[0083] S2, build a test framework: build an environment suitable for interface testing, including configuring hardware devices, installing operating systems, and installing development tools;
[0084] S3, write test scripts: First, use RPA's design tool to create an automated test process. Then, based on the designed test process, use RPA's development tool to write an automated script. The script is used to simulate user operations, send requests, and receive responses.
[0085] S4, Integration Testing: Combine the automated testing process with the continuous integration (CI) and continuous deployment (CD) processes to ensure that the code can be automatically tested and problems can be discovered in a timely manner;
[0086] S5, execute test script: run the written test script to perform automated testing;
[0087] S6, test result analysis: Analyze the results of the test execution to verify whether the software functions meet expectations and evaluate the effectiveness of automated testing;
[0088] S7, Maintain test scripts: Maintain and update test scripts to ensure the continuity and effectiveness of testing.
[0089] It should be noted that currently, enterprises need to conduct automated testing. First, it requires high initial investment and maintenance costs:
[0090] The development of automated testing frameworks, tools, and test scripts requires a lot of time and resources. For some small projects or projects with fast iterations, automated testing may not be the most economical choice.
[0091] As software systems are updated and changed, test scripts need to be constantly updated and maintained, which will also add additional costs.
[0092] Second, the technical threshold is high and the requirements for personnel skills are strict:
[0093] Automated testing requires testers to have certain programming and scripting skills, as well as in-depth understanding of the use of testing frameworks and tools. This requires at least some members of the testing team to have a high level of technical skills.
[0094] When testers are not skilled enough, it may lead to poor quality of test scripts, which in turn affects the accuracy and reliability of test results.
[0095] Third, strict dependence on the test environment:
[0096] Automated testing has high requirements for the consistency of the test environment. Any environmental differences may lead to test failure. Therefore, a lot of effort needs to be invested in configuring and maintaining the test environment.
[0097] When the software operating environment changes (such as operating system upgrades, browser updates, etc.), the automated testing scripts may need to be modified and adapted accordingly.
[0098] Fourth, systems that require a verification code or SMS verification code to log in require special treatment.
[0099] Common solutions include: 1) Ask the development team to provide a version without the verification code or set a universal verification code in the code. 2) Use some third-party verification code recognition tools.
[0100] Furthermore, the essence of automated testing is to create test scripts to test the code written by R&D, and the cost of this process is actually no less than developing a product. Using RPA can significantly shorten the development time.
[0101] Furthermore, in traditional automated testing, after developing automated test scripts, professional automated test engineers are also required to maintain them in the later operation stage. When the interface or element changes, the script needs to be changed, and the robustness of the script needs to be continuously improved. However, for RPA, you only need to design a general process, and then use the element picking function to pick up the Xpath of the element again.
[0102] Specifically, the hardware devices in the S2 test framework include servers, client devices and network devices.
[0103] The development tools include automated testing tools, performance testing tools and security testing tools to support different types of testing.
[0104] Furthermore, the hardware requirements for building a test framework are mainly used to ensure the stability and reliability of the test environment and to simulate the real user usage environment. Performance requirements: Hardware resources such as servers, computers or mobile devices need to have sufficient processing power, memory capacity and storage space to run the test framework and execute test cases; Compatibility requirements: In order to simulate the usage environment of different users, various operating systems, browser versions and mobile device models may be required; Network requirements: Network bandwidth and connection stability are critical for performing automated tests and accessing network resources (such as API testing).
[0105] Furthermore, software requirements include: Testing tools: According to the test type (such as unit testing, integration testing, functional testing, etc.), select appropriate testing frameworks and tools, such as JUnit, Selenium, Appium, etc.; Development tools: Integrated development environment (IDE), compiler, code editor, etc., for writing and maintaining test scripts; Management tools: Test management tools, version control systems, etc., for organizing test cases, tracking test results and coordinating teamwork; Auxiliary tools: For hardware testing, specific instruments and equipment may be required, such as oscilloscopes, spectrum analyzers, etc.
[0106] In general, by meeting these hardware and software requirements, an effective testing framework can be established to help improve testing efficiency, discover potential problems, and ensure software quality.
[0107] The automated testing algorithm provided by the present invention is as follows Figure 2 and Figure 3 As shown, the S3 test script writing is implemented based on the RPA scripting language, and the creation of the automated test process includes: starting the RPA design tool, creating a project process, dragging out nodes and configuring information and conditions;
[0108] The automated testing includes interface automated testing and UI automated testing.
[0109] Furthermore, interface automation testing mainly tests the backend or service interface of the system. This testing method usually does not care about the user interface, but verifies whether the interfaces between the various modules of the system can work properly. Interface testing usually adopts the gray box testing method, that is, designing test cases to call the API and check whether the request and response meet expectations. Since interface testing focuses on data and functions, it has high stability and efficiency. Once the interface is clearly defined, the test case can be repeatedly executed without frequent modification;
[0110] Different from interface automation testing, UI automation testing is closer to real user behavior. It verifies whether the application functions are running normally by simulating user operations on the software interface. UI testing usually requires the use of tools such as Selenium to drive the browser or other user interface and check whether the results of various user interactions are correct.
[0111] The interface automation testing steps include:
[0112] S31, use interface test platform and tabular data to organize and manage parameters and expected results;
[0113] S32, log in to the system and obtain a token identity authentication, which is based on the information verification method of RPA;
[0114] S33, thereby obtaining the parameters of the interface and splicing them into the parameters;
[0115] S34, query whether the SQL database query language is configured, and determine whether to use the database configuration node to connect to the database;
[0116] S35, configure the HTTP request node, assemble the acquired parameter information, and make a test interface request;
[0117] S36, obtaining the fields involved in the assertion configured in the table data, extracting the field values to be asserted, comparing the expected results with the actual results, and filling the actual values of the test results into the table data;
[0118] The parameters and expected results include the address of the API access, the interface request type, the input parameters, the database query result sql, the asserted field name, the expected result, and whether testing is required.
[0119] The UI automation test includes:
[0120] S37, obtaining the browser to be tested, and using the node to open the corresponding browser;
[0121] S38, use navigation to open the URL;
[0122] S39, obtain verification and log in;
[0123] S310, obtaining actual values of the web page element display value and attribute value, and comparing them with expected values.
[0124] Adopt the above solution: Based on the RPA automated testing process, the operation is simple. You only need to open RPA, drag out the node, and configure it to complete the automated process design. In addition, RPA has solutions for verification systems:
[0125] For the verification code image system, use the HTTP interface request node, configure the correct URL and request method to request the verification code image interface, receive the response, extract the verification code image code from the response, and then use the encoding / decoding node to decode it into an image, and then configure the verification code recognition node. According to the verification code type, select the corresponding verification code type, and use the verification code image obtained in the previous step as the node input parameter. After the node is executed, you can get the recognition result. Then use the HTTP request interface, configure the account password and verification code recognition result, and request the login interface to obtain the token;
[0126] For the SMS verification code system, Rongzhi RPA comes with a SMS box. Users only need to insert the phone card into the SMS box to automatically receive and process the verification code. First, configure the HTTP interface request node in Rongzhi RPA, use the HTTP interface request node to request the send verification code interface, then use the receive SMS verification code to obtain the SMS verification code, and then use the HTTP request login interface to obtain the token;
[0127] In addition, Rongzhi RPA can set the task execution method, schedule it, and set cron expressions and other operations.
[0128] In the present invention, the S4 integration test includes version control, automatic construction, trigger mechanism, test execution, result reporting and continuous deployment;
[0129] The version control is to ensure that all test scripts and related resources are stored in the version control system;
[0130] It should be noted that version control is a key practice to ensure that all test scripts and related resources are properly stored and managed. Version control ensures that teams can work together by tracking all code changes and history, while reducing the risk of errors and data loss during the development process. For example, when developers edit code, the version control system takes snapshots of these code files and permanently saves these snapshots so that they can be recalled later as needed. This technology not only helps teams effectively manage project progress, but also improves development efficiency and code quality.
[0131] The automatic construction: setting up a CI server to automatically build an interface automation test project;
[0132] Automatic build is the process of setting up CI server to automatically build interface automated test projects to ensure immediate build, test and deployment after code submission; automatic build is part of continuous integration (CI) and aims to achieve immediate build and test after code changes to ensure the stability and consistency of software functions.
[0133] The trigger mechanism: determines the time when the CI server triggers the build and test through a polling mechanism;
[0134] Polling is a processing method that allows the CPU to query each peripheral device in a certain period in order to see if there is any data input or output demand. Its working principle is that the CPU continuously asks each I / O device in a certain order whether it needs service. If the device has a demand, it will perform corresponding data processing; if not, the CPU will continue to query the next device.
[0135] The test execution: executing the automated test script on the CI server;
[0136] The result report: generates a detailed report on the test results;
[0137] Continuous deployment: Deploy tested code to the production environment to shorten the release cycle and increase delivery speed.
[0138] Adopting the above scheme: integration testing can check the interaction and integration between multiple modules, and discover interface problems and integration problems that cannot be revealed in unit testing, thereby improving the test coverage; it helps to discover more potential problems, such as data transmission errors, functional conflicts and logical errors, etc., to ensure the stability and reliability of the system, thereby improving the overall software quality; integration testing in the early stages of software development can detect problems early and avoid encountering more problems in later integration, which can improve development efficiency and reduce rework costs; and unit testing before integration testing can ensure the effectiveness of integration testing while reducing the cost of code correction; integration testing has good flexibility and can adopt different strategies and execution methods, such as the big bang method, incremental method (top-down, bottom-up, sandwich method), each of which has its own advantages and limitations, and the most appropriate testing strategy can be selected according to the specific circumstances of the project.
[0139] In summary, integration testing not only helps improve the overall quality and development efficiency of the software, but also ensures the correctness and stability of the system. Through effective integration testing, the risks and costs after the software is released can be minimized.
[0140] Specifically, the automatic construction includes the following steps:
[0141] Step 1: Select the corresponding build tool according to the language and framework of the project;
[0142] Build tools are software tools used to automate the software project build process. They can automatically perform a series of build tasks such as compiling code, running tests, packaging and distribution, and play a vital role in modern software development. From automated compilation and testing to optimized deployment, build tools have significantly improved development efficiency and software quality.
[0143] Step 2: Define build tasks and processes;
[0144] Step 3: Integrate the build process into the continuous integration (CI) tool;
[0145] Step 4: Set code submission as a specific event in the code repository to trigger automatic building;
[0146] Step 5: After the trigger conditions are met, the CI tool automatically detects the code, executes the build script, and generates the corresponding output;
[0147] Step 6: Automated testing is included in the build process to ensure code quality;
[0148] Step 7: After the build is successful and passes all tests, it is automatically deployed to the test environment.
[0149] In the automatic code checkout process of step 5, the Jenkins automation server divides the build process into multiple stages through a parallel build mechanism, and allows these stages to be executed in parallel on multiple computers under the control of the server;
[0150] Furthermore, parallel construction can improve computing speed: by breaking down the build task into multiple subtasks and executing them in parallel, the computing resources of multi-core processors and multiple computers can be fully utilized, thereby significantly shortening the build time; this not only improves computing power, but also makes the build task more resilient and flexible, able to adapt to the needs of projects of different sizes and complexities.
[0151] In the case of multi-core processors, parallel construction can make full use of CPU resources and improve system throughput and resource utilization.
[0152] Parallel builds bring significant advantages to the software development process by increasing computing speed, expanding computing resources, improving reliability and stability, improving resource utilization, reducing waiting time, optimizing user experience, saving memory consumption, and reducing response time.
[0153] Specifically, the automatic code detection in step 5 and the automatic detection in step 6 include incremental construction, and the incremental construction includes the following steps:
[0154] Detect files that have changed since the last build through the version control system;
[0155] When you compile the code again, only the changed source code is compiled;
[0156] Run unit tests and integration tests associated with the changed code to ensure that the changes have not introduced new errors;
[0157] Deploy the compiled files and changed configuration to the test environment.
[0158] Furthermore, incremental builds are implemented by monitoring changes in inputs. If changes are detected in the inputs, the build system will re-execute the relevant tasks; otherwise, it will skip the build of the unchanged parts and directly use the results of the last build.
[0159] This approach significantly improves build efficiency, especially in large projects. In the incremental build process, each build task is divided into three parts: input, task itself, and output. The input can be source code, configuration files, etc., and the output is usually a compiled class file or a packaged archive file.
[0160] In addition, incremental builds are not only used in the compilation phase, but are also widely used in the testing and deployment phases. In the continuous integration and continuous deployment (CI / CD) process, incremental builds can quickly feedback build and test results, helping the development team to discover and solve problems in a timely manner.
[0161] In general, incremental build is an important build optimization technology in modern software development. It significantly improves build efficiency, shortens feedback cycle, and adapts to the needs of rapid iterative development by intelligently identifying and processing changes.
[0162] Specifically, the step of analyzing the S6 test results includes:
[0163] After the test execution is completed, collect all relevant test results including: test case execution status (pass or fail), error messages and screenshots;
[0164] Identify failed test cases and analyze the reasons for failure;
[0165] For the passed test cases, check if there are any anomalies;
[0166] Evaluate test coverage, check whether all functional points have been tested, and detect whether there are any missing test scenarios to determine whether corresponding test cases need to be supplemented;
[0167] According to the analysis results, formulate corresponding improvement measures, including fixing software defects, optimizing test cases and adjusting test strategies;
[0168] After implementing the corrective actions, re-execute the test cases to verify whether the problem has been resolved;
[0169] Organize the entire testing process and results into a report to understand the overall situation and quality level of the test.
[0170] The test coverage includes requirement coverage and code coverage;
[0171] The evaluation of the requirement coverage is used to analyze the correspondence between requirements and test cases to ensure that all requirements are converted into test cases and executed;
[0172] The code coverage is evaluated using the Git version control system, and coverage information is combined to generate a coverage report with incremental information.
[0173] Furthermore, test coverage is an important test technology indicator, which is used to measure the coverage of test cases on software code. Test coverage shows what proportion of code is actually run and tested when the test case is executed. This helps to identify which code areas have not been tested or are insufficiently tested, and thus require additional test cases to cover; and through test coverage, we can evaluate the quality of test cases as an indicator for assessing project risks to ensure the quality and reliability of the software.
[0174] In summary, the present invention performs interface automation testing based on RPA. First, the test requirements are analyzed according to the software requirement specification and system test cases, the test scenarios and test cases are determined, and automated test cases that can cover all the requirements are designed.
[0175] Then, by using the interface test platform or Excel, maintain the interface URL, interface request type, input parameters, database query result sql, asserted field name, expected result, whether testing is required, etc.; log in to the interface to obtain a token,
[0176] If the data is in table format, use the table data operation nodes in RPA to obtain the relevant information of each interface in turn and splice the input parameters. If the interface is maintained by the interface automation platform, use the HTTP request interface in RPA to obtain it in turn and use the variable processing nodes to process and splice the input parameters.
[0177] Then obtain the table data or whether the query SQL is configured in the interface platform mode. If configured, use the database configuration node to connect to the database and use the execute SQL node to execute the obtained SQL;
[0178] Then configure the HTTP request node, configure the obtained URL, input parameters, token, etc., and make a request for the test interface;
[0179] Finally, get the fields configured in the table data that participate in the assertion, use the regular extraction node to extract the field value to be asserted from the response value of the previous interface request, use the variable comparison node to compare the expected result and the actual result, and write the test results, actual values, etc. into the table data to complete the automation process design. Compared with the existing automated testing, this patent is easier for ordinary testers to use, and provides script editing and management functions, so that testers can easily modify and maintain automated test scripts, replace some manual testing work, and reduce dependence on a large number of testers.
[0180] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for automated interface testing based on RPA, characterized in that: The method is based on RPA and includes the following steps: S1, develop a test plan: analyze the requirements for interface testing, determine the test objectives and scope, identify test resources, determine the test type and method, develop a test strategy, and determine quality standards; S2, build a test framework: build an environment suitable for interface testing, including configuring hardware devices, installing operating systems, and installing development tools; S3, write test scripts: First, use RPA's design tool to create an automated test process. Then, based on the designed test process, use RPA's development tool to write an automated script. The script is used to simulate user operations, send requests, and receive responses. S4, Integration Testing: Combine the automated testing process with the continuous integration (CI) and continuous deployment (CD) processes to ensure that the code can be automatically tested and problems can be discovered in a timely manner; S5, execute test script: run the written test script to perform automated testing; S6, test result analysis: Analyze the results of the test execution to verify whether the software functions meet expectations and evaluate the effectiveness of automated testing; S7, Maintain test scripts: Maintain and update test scripts to ensure the continuity and effectiveness of testing.
2. According to claim 1, a method for performing interface automation testing based on RPA is characterized in that: The hardware equipment in the S2 test framework includes servers, client devices and network devices. The development tools include automated testing tools, performance testing tools and security testing tools to support different types of testing.
3. According to claim 1, a method for performing interface automation testing based on RPA is characterized in that: The S3 test script writing is implemented based on the RPA scripting language. The creation of the automated test process includes: starting the RPA design tool, creating a project process, dragging out nodes and configuring information and conditions; The automated testing includes interface automated testing and UI automated testing.
4. According to claim 1, a method for performing interface automation testing based on RPA is characterized in that: The interface automation testing steps include: S31, use interface test platform and tabular data to organize and manage parameters and expected results; S32, log in to the system and obtain a token identity authentication, which is based on the information verification method of RPA; S33, thereby obtaining the parameters of the interface and splicing them into the parameters; S34, query whether the SQL database query language is configured, and determine whether to use the database configuration node to connect to the database; S35, configure the HTTP request node, assemble the acquired parameter information, and make a test interface request; S36, obtaining the fields involved in the assertion configured in the table data, extracting the field values to be asserted, comparing the expected results with the actual results, and filling the actual values of the test results into the table data; The parameters and expected results include the address of the API access, the interface request type, the input parameters, the database query result sql, the asserted field name, the expected result, and whether testing is required. The UI automation test includes: S37, obtaining the browser to be tested, and using the node to open the corresponding browser; S38, use navigation to open the URL; S39, obtain verification and log in; S310, obtaining actual values of the web page element display value and attribute value, and comparing them with expected values.
5. According to claim 1, a method for performing interface automation testing based on RPA is characterized in that: The S4 integration test includes version control, automatic building, triggering mechanism, test execution, result reporting and continuous deployment; The version control is to ensure that all test scripts and related resources are stored in the version control system; The automatic construction: setting up a CI server to automatically build an interface automation test project; The trigger mechanism: determines the time when the CI server triggers the build and test through a polling mechanism; The test execution: executing the automated test script on the CI server; The result report: generates a detailed report on the test results; Continuous deployment: Deploy tested code to the production environment to shorten the release cycle and increase delivery speed.
6. According to claim 5, a method for performing interface automation testing based on RPA is characterized in that: The automatic construction includes the following steps: Step 1: Select the corresponding build tool according to the language and framework of the project; Step 2: Define build tasks and processes; Step 3: Integrate the build process into the continuous integration (CI) tool; Step 4: Set code submission as a specific event in the code repository to trigger automatic building; Step 5: After the trigger conditions are met, the CI tool automatically detects the code, executes the build script, and generates the corresponding output; Step 6: Automated testing is included in the build process to ensure code quality; Step 7: After the build is successful and passes all tests, it is automatically deployed to the test environment.
7. According to claim 6, a method for performing interface automation testing based on RPA is characterized in that: In the automatic code checkout process of step 5, the Jenkins automation server divides the build process into multiple stages through a parallel build mechanism, and allows these stages to be executed in parallel on multiple computers under the control of the server; The automatic code detection in step 5 and the automatic detection in step 6 include incremental construction, and the incremental construction includes the following steps: Detect files that have changed since the last build through the version control system; When you compile the code again, only the changed source code is compiled; Run unit tests and integration tests associated with the changed code to ensure that the changes have not introduced new errors; Deploy the compiled files and changed configuration to the test environment.
8. According to claim 1, a method for performing interface automation testing based on RPA is characterized in that: The step of analyzing the S6 test results includes: After the test execution is completed, collect all relevant test results including: test case execution status (pass or fail), error messages and screenshots; Identify failed test cases and analyze the reasons for failure; For the passed test cases, check if there are any anomalies; Evaluate test coverage, check whether all functional points have been tested, and detect whether there are any missing test scenarios to determine whether corresponding test cases need to be supplemented; According to the analysis results, formulate corresponding improvement measures, including fixing software defects, optimizing test cases and adjusting test strategies; After implementing the corrective actions, re-execute the test cases to verify whether the problem has been resolved; Organize the entire testing process and results into a report to understand the overall situation and quality level of the test.
9. The method for performing interface automation testing based on RPA according to claim 8, characterized in that: The test coverage includes requirement coverage and code coverage; The evaluation of the requirement coverage is used to analyze the correspondence between requirements and test cases to ensure that all requirements are converted into test cases and executed; The code coverage is evaluated using the Git version control system, and coverage information is combined to generate a coverage report with incremental information.
Citation Information
Cited By
Method and system for automatic regression test of RPA component
CN119847939A
Method and System for Automated Regression Testing of RPA Components
CN119847939B