Automatic test method and system of UI, terminal and storage medium
Through automated UI testing methods, the problems of low efficiency and low accuracy in the existing technology are solved, and fast and accurate UI testing is achieved, suitable for various times and places.
Patent Information
- Application Number
- CN202411370601.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, UI testing requires manual participation, resulting in long test time, low efficiency, easy errors, and low accuracy.
Provides an automated test method for UI. By receiving UI testing instructions, starting the software to be tested, obtaining the UI to be tested, and building a target testing framework, automating the test UI to be tested, and generating a test report file.
It reduces UI testing time, improves testing efficiency, avoids testing errors, improves testing accuracy, and is not limited by time and location.
Smart Images

Figure CN119415421A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to an automated testing method, system, terminal and computer-readable storage medium for UI. Background Art
[0002] Testing is an indispensable part of a complete R&D system. Since the front-end logic of software products is relatively complex and needs to be changed frequently, regression errors often occur. Although there are many testing tools now, they are not widely used in front-end automated testing, and most of them are still based on manual testing.
[0003] At present, in the prior art, UI testing still mainly requires manual participation, which not only consumes a lot of time during testing, resulting in low test efficiency, but also causes errors during testing, resulting in low test accuracy.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a UI automated testing method, system, terminal and storage medium, aiming to solve the problem in the prior art that UI testing not only consumes a lot of time during testing, resulting in low testing efficiency, but also causes errors during testing, resulting in low test accuracy.
[0006] To achieve the above object, the present invention provides an automated testing method for a UI, the automated testing method for a UI comprising the following steps:
[0007] When a UI test instruction is received, the software to be tested is started according to the UI test instruction, and the UI to be tested running by the software to be tested is obtained;
[0008] A corresponding target test framework is constructed according to the UI to be tested, an automated test is performed on the UI to be tested according to the target test framework to obtain a test result, and a test report file is generated according to the test result.
[0009] Optionally, the automated testing method for UI, wherein when a UI test instruction is received, starting the software to be tested according to the UI test instruction, and obtaining the UI to be tested that is run by the software to be tested, specifically includes:
[0010] When it is detected that the UI test button is clicked and a UI test instruction is generated, the UI test instruction is acquired, and the UI test instruction is analyzed and processed to obtain a software analysis result;
[0011] The corresponding software to be tested is searched out according to the software analysis result, the software to be tested is started to obtain a start result, and the UI to be tested of the software to be tested is obtained according to the start result.
[0012] Optionally, in the automated testing method for UI, the step of constructing a corresponding target testing framework according to the UI to be tested specifically includes:
[0013] Determine the corresponding test case capability information according to the UI to be tested, and build a unit test framework according to the test case capability information, wherein the test case capability information includes writing capability, management capability, scheduling execution capability and report generation capability;
[0014] Acquire the test interface of the UI to be tested according to the unit test framework, build a corresponding UI test framework according to the test interface, determine the distributed interface test capability information of the UI to be tested, and build a distributed test framework according to the distributed interface test capability information and the unit test framework;
[0015] The unit test framework, the UI test framework and the distributed test framework are combined to obtain a target test framework.
[0016] Optionally, the automated testing method for UI, wherein the step of building a corresponding target testing framework according to the UI to be tested further comprises:
[0017] Obtain a UI test control script and a project test script for each test item, and build a UI sub-test library according to the UI test control script and all the project test scripts;
[0018] A software control script of the software to be tested is obtained, and a corresponding UI test script library is constructed according to the software control script and the UI sub-test library.
[0019] Optionally, the automated testing method for the UI, wherein the automated testing of the UI to be tested is performed according to the target testing framework to obtain the test results, and a test report file is generated according to the test results, specifically comprising:
[0020] Matching the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested has been tested according to the test results;
[0021] If the test result is that all test items of the UI to be tested are completed, it is determined that the test of the UI to be tested is completed, and a corresponding test report file is generated according to the test result.
[0022] Optionally, the automated testing method for UI, wherein the step of performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, specifically includes:
[0023] Starting a target UI test control script of the target UI sub-test library, and starting a target project test script of the target UI sub-test library according to the target UI test control script;
[0024] A test environment is formulated for the test items of the UI to be tested to obtain a target operating environment, and test processing is performed on the test items of the UI to be tested according to the target item test script and the target operating environment to obtain corresponding test results.
[0025] Optionally, the method for automated testing of a UI, wherein the UI test script library is matched according to the target test framework to obtain a target UI sub-test library, an automated test is performed on the UI to be tested through the target UI sub-test library to obtain a corresponding test result, and whether the UI to be tested is tested is determined according to the test result, and then further comprises:
[0026] If the test result is that there is an abnormality in the test item of the UI to be tested, it is determined that the test of the UI to be tested is not completed, and the corresponding abnormal test item is extracted;
[0027] The abnormal test items are recorded and processed to obtain abnormal log information, abnormal reminder information is generated according to the abnormal log information, and an early warning is issued according to the abnormal reminder information.
[0028] Optionally, in the method for automated testing of a UI, the automated testing system for a UI comprises:
[0029] A UI acquisition module is used to start the software to be tested according to the UI test instruction when a UI test instruction is received, and obtain the UI to be tested that is run by the software to be tested;
[0030] The UI testing module is used to build a corresponding target testing framework according to the UI to be tested, perform automated testing on the UI to be tested according to the target testing framework, obtain test results, and generate a test report file according to the test results.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an automated testing program for the UI stored in the memory and executable on the processor, and when the automated testing program for the UI is executed by the processor, the steps of the automated testing method for the UI as described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automated testing program for a UI, and when the automated testing program for a UI is executed by a processor, the steps of the automated testing method for a UI as described above are implemented.
[0033] In the present invention, a method, system, terminal and storage medium for automatic testing of UI are disclosed, and the method comprises: when receiving a UI test instruction, starting the software to be tested according to the UI test instruction, and obtaining the UI to be tested that the software to be tested runs; building a corresponding target test framework according to the UI to be tested, performing automatic testing on the UI to be tested according to the target test framework, obtaining test results, and generating a test report file according to the test results. The present invention can reduce the test time of UI to improve the corresponding test efficiency, and also avoids the problem of errors caused by the test, thereby improving the test accuracy, and is not limited by time and place. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a preferred embodiment of the automated testing method of UI in the present invention;
[0035] Figure 2 It is a structural diagram of a preferred embodiment of the automated testing system for UI in the present invention;
[0036] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0038] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0039] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0040] The automated testing method of the UI described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the automated testing method for the UI includes the following steps:
[0041] Step S10: When a UI test instruction is received, the software to be tested is started according to the UI test instruction, and the UI to be tested running by the software to be tested is obtained.
[0042] The step S10 comprises:
[0043] Step S11: when it is detected that the UI test button is clicked and a UI test instruction is generated, the UI test instruction is acquired, and the UI test instruction is analyzed and processed to obtain a software analysis result;
[0044] Step S12: searching for the corresponding software to be tested according to the software analysis result, starting the software to be tested, obtaining a starting result, and acquiring a UI to be tested of the software to be tested according to the starting result.
[0045] Specifically, testing is an indispensable part of a complete R&D system. Since the front-end logic of software products is relatively complex and needs to be changed frequently, regression errors often occur. Although there are many testing tools now, they are not widely used in front-end automated testing. Most of them are still based on manual testing. Therefore, it is necessary to automate the UI testing. The significance of automating the UI testing is that, first, for repetitive functional testing and verification, the use of UI automation can quickly return to the main system business processes under tight time and heavy tasks, saving labor costs; second, avoiding omissions in manual testing during fatigued operations; third, using lower manpower and equipment resources to build simulations of real product usage scenarios, breaking the limitations of time and location, and monitoring the product's operating status 24 hours a day. UI automated testing is an automated testing method that uses tools or scripts to achieve automatic operation and verification by simulating manual operation of the user UI interface. In an embodiment of the present invention, when it is detected that the UI test button is clicked and a UI test instruction is generated, the UI test instruction is obtained, and the UI test instruction is analyzed and processed to obtain a software analysis result; then, the corresponding software to be tested is searched according to the software analysis result, the software to be tested is started to obtain a startup result, and the UI to be tested of the software to be tested is obtained according to the startup result.
[0046] Step S20: construct a corresponding target test framework according to the UI to be tested, perform automated testing on the UI to be tested according to the target test framework, obtain test results, and generate a test report file according to the test results.
[0047] The step S20 comprises:
[0048] Step S21, determining the corresponding test case capability information according to the UI to be tested, and constructing a unit test framework according to the test case capability information, wherein the test case capability information includes writing capability, management capability, scheduling execution capability and report generation capability;
[0049] Step S22: acquiring the test interface of the UI to be tested according to the unit test framework, constructing a corresponding UI test framework according to the test interface, and determining the distributed interface test capability information of the UI to be tested, and constructing a distributed test framework according to the distributed interface test capability information and the unit test framework;
[0050] Step S23, combining the unit test framework, the UI test framework and the distributed test framework to obtain a target test framework;
[0051] Step S24: matching the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested has been tested according to the test results;
[0052] Step S25: If the test result shows that all test items of the UI to be tested are completed, it is determined that the test of the UI to be tested is completed, and a corresponding test report file is generated according to the test result.
[0053] Specifically, in an embodiment of the present invention, after obtaining the UI to be tested of the software to be tested, it is necessary to construct a corresponding test framework, namely, a target test framework. The specific construction process is to determine the corresponding test case capability information according to the UI to be tested, wherein the test case capability information includes writing capability, management capability, scheduling execution capability and report generation capability, and construct a unit test framework according to the test case capability information, wherein the unit test framework provides unit test case execution capability for testing the system or application interface, so that the base support of the entire test framework can also support the execution of subsequent UI test cases and distributed test cases; thereafter, the test interface of the UI to be tested is obtained according to the unit test framework, and a corresponding UI test framework is constructed according to the test interface, wherein the UI test framework provides an API (Application Programming Interface) for UI testing. Interface, application programming interface), based on the unit test framework, user interface testing can be performed, including basic UI capabilities such as UI operation, UI control detection, page switching, etc., supporting users to develop automated test scripts based on interface operations, and the corresponding APIs include describe interface, beforeAll interface, beforeEach interface, afterEach interface, afterAll interface, it interface and expect interface, wherein the describe interface refers to defining a test suite, supporting two parameters, namely the test suite name and the test suite function; the beforeAll interface refers to defining a preset condition in the test suite, which is executed before all test cases start and is only executed once, supporting one parameter, which is a preset action function; the be The foreEach interface means defining a unit preset condition in the test suite, which is executed before each test case starts, and the number of executions is consistent with the number of test cases defined by it. It supports one parameter, which is a preset action function; the afterEach interface means defining a unit cleanup condition in the test suite, which is executed after each test case ends, and the number of executions is consistent with the number of test cases defined by it. It supports one parameter, which is a cleanup action function; the afterAll interface means defining a cleanup condition in the test suite, which is executed and only executed once after all test cases end, and supports one parameter, which is a cleanup action function; the it interface means defining a test case, and supports three parameters, namely, the case name, the filter parameter, and the case function; the expect interface means supporting multiple assertion methods such as bool type judgment;Afterwards, the distributed interface test capability information of the UI to be tested is determined, and a distributed test framework is constructed according to the distributed interface test capability information and the unit test framework, wherein the distributed test framework provides distributed interface test capability, and provides distributed interface test capability on the basis of the unit test framework, and can test whether the distributed characteristics of the main device are successfully executed on the auxiliary device of the network; finally, the unit test framework, the UI test framework and the distributed test framework are combined and processed to obtain the target test framework. ;
[0054] After obtaining the corresponding target test framework, it is necessary to build a UI test script library. The specific construction process is to obtain the UI test control script and the project test script of each test project, wherein the UI test control script is used to control the operation of each project test script, and the project test script is used to automatically test the corresponding test items in the UI through test case data and comparison interface data, and build a UI sub-test library according to the UI test control script and all the project test scripts; then, obtain the software control script of the software to be tested, wherein the software control script is used to control the operation of the software to be tested, and build a corresponding UI test script library according to the software control script and the UI sub-test library.
[0055] It is necessary to perform automated testing on the UI to be tested. In an embodiment of the present invention, the UI test script library is matched and processed according to the target test framework in order to obtain the best UI self-test library, that is, the target UI sub-test library. The UI to be tested is automatically tested through the target UI sub-test library. Specifically, the target UI test control script of the target UI sub-test library is started, and the target project test script of the target UI sub-test library is started according to the target UI test control script; a test environment is formulated for the test items of the UI to be tested to obtain a target operating environment, and the test items of the UI to be tested are tested and processed according to the target project test script and the target operating environment to obtain corresponding test results, and whether the test of the UI to be tested is completed is judged according to the test results; if the test result shows that all the test items of the UI to be tested are completed, it is determined that the test of the UI to be tested is completed, and a corresponding test report file is generated according to the test result; the present invention can reduce the test time of the UI to improve the corresponding test efficiency, and at the same time avoid the problem of errors caused by the test, thereby improving the test accuracy, and is not limited by time and place.
[0056] Furthermore, if the test result shows that there is an abnormality in the test item of the UI to be tested, it is determined that the test of the UI to be tested is incomplete, and the corresponding abnormal test item is extracted; the abnormal test item is recorded and processed to obtain abnormal log information, abnormal reminder information is generated according to the abnormal log information, and an early warning is issued according to the abnormal reminder information, so as to promptly remind the corresponding relevant personnel to handle it.
[0057] Furthermore, if Figure 2 As shown, based on the above-mentioned UI automated testing method, the present invention also provides a UI automated testing system accordingly, and the UI automated testing system includes:
[0058] A UI acquisition module is used to start the software to be tested according to the UI test instruction when a UI test instruction is received, and obtain the UI to be tested that is run by the software to be tested;
[0059] The UI testing module is used to build a corresponding target testing framework according to the UI to be tested, perform automated testing on the UI to be tested according to the target testing framework, obtain test results, and generate a test report file according to the test results.
[0060] Furthermore, if Figure 3 As shown, based on the above-mentioned UI automated testing method, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0061] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal, etc. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores an automated test program 40 for UI, and the automated test program 40 for UI can be executed by the processor 10, thereby realizing the automated test method for UI in the present application.
[0062] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing an automated testing method of the UI.
[0063] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0064] In one embodiment, when the processor 10 executes the UI automated testing program 40 in the memory 20, the following steps are implemented:
[0065] When a UI test instruction is received, the software to be tested is started according to the UI test instruction, and the UI to be tested running by the software to be tested is obtained;
[0066] A corresponding target test framework is constructed according to the UI to be tested, an automated test is performed on the UI to be tested according to the target test framework to obtain a test result, and a test report file is generated according to the test result.
[0067] When a UI test instruction is received, starting the software to be tested according to the UI test instruction and obtaining the UI to be tested that is run by the software to be tested specifically includes:
[0068] When it is detected that the UI test button is clicked and a UI test instruction is generated, the UI test instruction is acquired, and the UI test instruction is analyzed and processed to obtain a software analysis result;
[0069] The corresponding software to be tested is searched out according to the software analysis result, the software to be tested is started to obtain a start result, and the UI to be tested of the software to be tested is obtained according to the start result.
[0070] The step of building a corresponding target test framework according to the UI to be tested specifically includes:
[0071] Determine the corresponding test case capability information according to the UI to be tested, and build a unit test framework according to the test case capability information, wherein the test case capability information includes writing capability, management capability, scheduling execution capability and report generation capability;
[0072] Acquire the test interface of the UI to be tested according to the unit test framework, build a corresponding UI test framework according to the test interface, determine the distributed interface test capability information of the UI to be tested, and build a distributed test framework according to the distributed interface test capability information and the unit test framework;
[0073] The unit test framework, the UI test framework and the distributed test framework are combined to obtain a target test framework.
[0074] The step of building a corresponding target test framework according to the UI to be tested further includes:
[0075] Obtain a UI test control script and a project test script for each test item, and build a UI sub-test library according to the UI test control script and all the project test scripts;
[0076] A software control script of the software to be tested is obtained, and a corresponding UI test script library is constructed according to the software control script and the UI sub-test library.
[0077] The step of performing automated testing on the UI to be tested according to the target test framework to obtain test results and generating a test report file according to the test results specifically includes:
[0078] Matching the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested has been tested according to the test results;
[0079] If the test result is that all test items of the UI to be tested are completed, it is determined that the test of the UI to be tested is completed, and a corresponding test report file is generated according to the test result.
[0080] The step of performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results specifically includes:
[0081] Starting a target UI test control script of the target UI sub-test library, and starting a target project test script of the target UI sub-test library according to the target UI test control script;
[0082] A test environment is formulated for the test items of the UI to be tested to obtain a target operating environment, and test processing is performed on the test items of the UI to be tested according to the target item test script and the target operating environment to obtain corresponding test results.
[0083] The method further comprises: performing matching processing on the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested is tested according to the test results, and then further comprising:
[0084] If the test result is that there is an abnormality in the test item of the UI to be tested, it is determined that the test of the UI to be tested is not completed, and the corresponding abnormal test item is extracted;
[0085] The abnormal test items are recorded and processed to obtain abnormal log information, abnormal reminder information is generated according to the abnormal log information, and an early warning is issued according to the abnormal reminder information.
[0086] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an automated testing program for a UI, and when the automated testing program for a UI is executed by a processor, the steps of the automated testing method for a UI as described above are implemented.
[0087] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0088] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0089] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A UI automated testing method, characterized in that: The automated testing method for the UI includes: When a UI test instruction is received, the software to be tested is started according to the UI test instruction, and the UI to be tested running by the software to be tested is obtained; A corresponding target test framework is constructed according to the UI to be tested, an automated test is performed on the UI to be tested according to the target test framework to obtain a test result, and a test report file is generated according to the test result.
2. The automated testing method for UI according to claim 1, characterized in that: When a UI test instruction is received, starting the software to be tested according to the UI test instruction, and obtaining the UI to be tested that is run by the software to be tested, specifically includes: When it is detected that the UI test button is clicked and a UI test instruction is generated, the UI test instruction is acquired, and the UI test instruction is analyzed and processed to obtain a software analysis result; The corresponding software to be tested is searched out according to the software analysis result, the software to be tested is started to obtain a start result, and the UI to be tested of the software to be tested is obtained according to the start result.
3. The automated testing method for UI according to claim 1, characterized in that: The step of constructing a corresponding target test framework according to the UI to be tested specifically includes: Determine the corresponding test case capability information according to the UI to be tested, and build a unit test framework according to the test case capability information, wherein the test case capability information includes writing capability, management capability, scheduling execution capability and report generation capability; Acquire the test interface of the UI to be tested according to the unit test framework, build a corresponding UI test framework according to the test interface, determine the distributed interface test capability information of the UI to be tested, and build a distributed test framework according to the distributed interface test capability information and the unit test framework; The unit test framework, the UI test framework and the distributed test framework are combined to obtain a target test framework.
4. The automated testing method for UI according to claim 1, characterized in that: The step of building a corresponding target test framework according to the UI to be tested further includes: Obtain a UI test control script and a project test script for each test item, and build a UI sub-test library according to the UI test control script and all the project test scripts; A software control script of the software to be tested is obtained, and a corresponding UI test script library is constructed according to the software control script and the UI sub-test library.
5. The automated testing method for UI according to claim 4, characterized in that: The step of performing automated testing on the UI to be tested according to the target test framework, obtaining test results, and generating a test report file according to the test results specifically includes: Matching the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested has been tested according to the test results; If the test result is that all test items of the UI to be tested are completed, it is determined that the test of the UI to be tested is completed, and a corresponding test report file is generated according to the test result.
6. The automated testing method for UI according to claim 5, characterized in that: The step of performing automated testing on the UI to be tested by using the target UI sub-test library to obtain corresponding test results specifically includes: Starting a target UI test control script of the target UI sub-test library, and starting a target project test script of the target UI sub-test library according to the target UI test control script; A test environment is formulated for the test items of the UI to be tested to obtain a target operating environment, and test processing is performed on the test items of the UI to be tested according to the target item test script and the target operating environment to obtain corresponding test results.
7. The automated testing method for UI according to claim 5, characterized in that: The method further comprises: matching the UI test script library according to the target test framework to obtain a target UI sub-test library, performing automated testing on the UI to be tested through the target UI sub-test library to obtain corresponding test results, and judging whether the UI to be tested is tested according to the test results, and then further comprising: If the test result is that there is an abnormality in the test item of the UI to be tested, it is determined that the test of the UI to be tested is not completed, and the corresponding abnormal test item is extracted; The abnormal test items are recorded and processed to obtain abnormal log information, abnormal reminder information is generated according to the abnormal log information, and an early warning is issued according to the abnormal reminder information.
8. An automated testing system for UI, characterized in that: The automated testing system for the UI includes: A UI acquisition module is used to start the software to be tested according to the UI test instruction when a UI test instruction is received, and obtain the UI to be tested that is run by the software to be tested; The UI testing module is used to build a corresponding target testing framework according to the UI to be tested, perform automated testing on the UI to be tested according to the target testing framework, obtain test results, and generate a test report file according to the test results.
9. A terminal, characterized in that: The terminal includes a memory, a processor, and an automated testing program for a UI stored in the memory and executable on the processor. When the automated testing program for a UI is executed by the processor, the steps of the automated testing method for a UI as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer-readable storage medium stores an automated testing program for a UI. When the automated testing program for a UI is executed by a processor, the steps of the automated testing method for a UI as described in any one of claims 1 to 7 are implemented.