UI automatic test method, system and equipment based on distributed architecture

The UI automation testing method and system address inefficiencies in complex scenarios by generating and distributing test scripts across multiple machines, enhancing efficiency and reducing redundancy.

CN119149395APending Publication Date: 2024-12-17SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411083935.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing UI automation testing tools struggle with complex scenarios requiring multiple browsers or languages, leading to long execution times and redundant script writing, and are difficult to adapt to comprehensive test coverage.

Method used

A UI automation testing method and system based on a distributed architecture that generates multiple test script sets for different client versions, uses a scheduling machine to distribute scripts to target execution machines, and enables concurrent execution, reducing redundancy and maintenance costs.

Benefits of technology

Improves testing efficiency and reduces maintenance costs in complex scenarios by generating specific script sets for different client versions and distributing them effectively across multiple machines for concurrent execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149395A_ABST
    Figure CN119149395A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software testing, and provides a UI automatic testing method, system and equipment based on a distributed architecture, and the method comprises the following steps: providing a plurality of testing script sets; the plurality of test script sets are generated based on the same set of service logic, and each test script set corresponds to a different client version; monitoring the state of the execution machine cluster, and selecting a plurality of target execution machines from the execution machine cluster according to the execution machine state; enabling the dispatcher to distribute the test scripts in the test script set to a plurality of target execution machines according to a distribution strategy; and concurrently executing the test by using the plurality of target execution machines, and storing a test result to a specified path. According to the embodiment of the invention, the maintenance cost of UI automatic testing in a complex scene can be reduced, and the testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing technology, and in particular to a UI automation testing method, system and device based on a distributed architecture. Background Art

[0002] UI automation testing is a method of automating software testing tasks by using specific testing tools. It can replace most manual testing, improve test accuracy and efficiency, achieve more comprehensive test content coverage, and simplify a large number of repetitive operations in manual testing.

[0003] However, among the existing testing tools, most of them only support a single test scenario, such as only testing by simulating the operation of the front-end page, or directly performing simple interface testing on the back-end code, which is difficult to adapt to complex test scenarios. Moreover, in scenarios that require multiple browsers or multiple languages ​​to switch, due to the necessity of full coverage of test scenarios by UI automated testing, existing testing tools are prone to problems such as long execution time and redundant script writing. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a UI automation testing method, system and device based on a distributed architecture to reduce the maintenance cost of UI automation testing in complex scenarios and improve the testing efficiency of UI automation testing in complex scenarios.

[0005] To achieve the above objectives, on the one hand, the embodiments of this specification provide a UI automation testing method based on a distributed architecture, including:

[0006] Providing multiple test script sets; the multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version;

[0007] Monitor the status of the execution machine cluster, and select multiple target execution machines from the execution machine cluster according to the execution machine status;

[0008] The scheduling machine distributes the test scripts in the test script set to the multiple target execution machines according to the distribution strategy;

[0009] The multiple target execution machines are used to concurrently execute the test, and the test results are saved to a specified path.

[0010] In the UI automated testing method based on a distributed architecture in the embodiment of this specification, the multiple test script sets are pre-generated according to the following method:

[0011] Obtaining a full set of business action functions and forming a business action function library; the business action functions are used to characterize the business operation behaviors of users;

[0012] Constructing a business data set corresponding to the business action function library;

[0013] Arrange and combine the elements of the business action function library and the business data set to form a UI test component library;

[0014] Constructing a test point set corresponding to the UI test component library;

[0015] The UI test component library and the test point set are arranged and combined as needed to form a test script set for each client version.

[0016] In the UI automated testing method based on a distributed architecture in the embodiment of the present specification, distributing the test scripts in the test script set to the multiple target execution machines according to the distribution strategy includes:

[0017] Selecting a first test script from the test script set, identifying the first test script as a first-category element in the script classification distribution set, and determining a database table set involved in the first test script as a database table set of the first-category element;

[0018] Select a second test script from the test script set, and perform an intersection operation on the database table set involved in the second test script and the database table set of the first type of elements;

[0019] Determine whether the intersection is empty;

[0020] If the intersection is empty, the second test script is identified as a second type of element in the script classification distribution set, and the database table set involved in the second test script is determined as the database table set of the second type of element;

[0021] If the intersection is not empty, identifying the second test script as a first-category element in the script classification distribution set, and adding the database table set involved in the second test script to the database table set of the first-category element;

[0022] This is repeated recursively until the category to which each test script in the test script set belongs in the script classification distribution set is determined;

[0023] The scheduling machine is used to concurrently distribute elements belonging to different categories to the multiple target execution machines.

[0024] In the UI automated testing method based on a distributed architecture in the embodiment of the present specification, the database table set includes a database table set involving write operations.

[0025] In the UI automated testing method based on distributed architecture in the embodiment of this specification, the different client versions include:

[0026] Different language versions of the client, and / or different kinds of clients.

[0027] On the other hand, the embodiment of this specification also provides a UI automation testing system based on a distributed architecture, including:

[0028] The storage service end is used to provide multiple test script sets; the multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version;

[0029] A heartbeat monitoring machine, used to monitor the status of the execution machine cluster and select multiple target execution machines from the execution machine cluster according to the execution machine status;

[0030] A scheduling machine, used to distribute the test scripts in the test script set to the multiple target execution machines according to the distribution strategy;

[0031] The execution machine cluster is used to use the multiple target execution machines to concurrently execute tests and save the test results to a specified path.

[0032] In the UI automated testing method based on a distributed architecture in the embodiment of this specification, the multiple test script sets are pre-generated according to the following method:

[0033] Obtaining a full set of business action functions and forming a business action function library; the business action functions are used to characterize the business operation behaviors of users;

[0034] Constructing a business data set corresponding to the business action function library;

[0035] Arrange and combine the elements of the business action function library and the business data set to form a UI test component library;

[0036] Constructing a test point set corresponding to the UI test component library;

[0037] The UI test component library and the test point set are arranged and combined as needed to form a test script set for each client version.

[0038] In the UI automated testing method based on a distributed architecture in the embodiment of the present specification, distributing the test scripts in the test script set to the multiple target execution machines according to the distribution strategy includes:

[0039] Selecting a first test script from the test script set, identifying the first test script as a first-category element in the script classification distribution set, and determining a database table set involved in the first test script as a database table set of the first-category element;

[0040] Select a second test script from the test script set, and perform an intersection operation on the database table set involved in the second test script and the database table set of the first type of elements;

[0041] Determine whether the intersection is empty;

[0042] If the intersection is empty, the second test script is identified as a second type of element in the script classification distribution set, and the database table set involved in the second test script is determined as the database table set of the second type of element;

[0043] If the intersection is not empty, identifying the second test script as a first-category element in the script classification distribution set, and adding the database table set involved in the second test script to the database table set of the first-category element;

[0044] This is repeated recursively until the category to which each test script in the test script set belongs in the script classification distribution set is determined;

[0045] The scheduling machine is used to concurrently distribute elements belonging to different categories to the multiple target execution machines.

[0046] In the UI automated testing method based on a distributed architecture in the embodiment of the present specification, the database table set includes a database table set involving write operations.

[0047] In the UI automated testing method based on distributed architecture in the embodiment of this specification, the different client versions include:

[0048] Different language versions of the client, and / or different kinds of clients.

[0049] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the instructions of the above method are executed.

[0050] On the other hand, an embodiment of the present specification further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer device, the instructions of the above method are executed.

[0051] On the other hand, an embodiment of the present specification further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor of a computer device, the computer program executes instructions of the above method.

[0052] It can be seen from the technical solutions provided by the above embodiments of this specification that the embodiments of this specification can select multiple target execution machines from the execution machine cluster according to the execution machine status, and then the scheduling machine distributes the test scripts to the multiple target execution machines according to the distribution strategy. The multiple target execution machines concurrently execute the test and save the test results to the specified path. In this way, through this distributed scheduling of test scripts and concurrent execution of test scripts, the testing efficiency of UI automation testing in complex scenarios can be greatly improved; not only that, since a one-to-one corresponding test script set can be generated for different client versions based on the same set of business logic in advance, the redundancy of multiple sets of corresponding test codes in the same or similar test scenarios of UI automation testing can be reduced, which greatly reduces the maintenance cost of UI automation testing in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0054] Figure 1 A schematic diagram of the structure of a UI automation testing system based on a distributed architecture in some embodiments of this specification is shown;

[0055] Figure 2 A flowchart of a UI automation testing system method based on a distributed architecture in some embodiments of this specification is shown;

[0056] Figure 3 Shows Figure 2 A flowchart of generating multiple test script sets based on the same set of business logic in the method shown;

[0057] Figure 4 Shows Figure 2 In the method shown, the business action function library and the business data set are arranged and combined to form a schematic diagram of a UI test component library;

[0058] Figure 5 Shows Figure 2 In the method shown, the UI test component library and the test point set are arranged and combined as needed to form a schematic diagram of different test script sets;

[0059] Figure 6 Shows Figure 2 A flowchart of the method shown in which a scheduling machine is used to distribute test scripts in a test script set to multiple target execution machines;

[0060] Figure 7 The structure block diagram of the computer device in some embodiments of the present specification is shown.

[0061] [Description of Reference Numerals]

[0062] 10. Storage service end;

[0063] 20. Dispatching machine;

[0064] 30. Heart rate monitoring machine;

[0065] 40. Execution machine cluster;

[0066] 702. Computer equipment;

[0067] 704, processor;

[0068] 706. Memory;

[0069] 708, driving mechanism;

[0070] 710, input / output interface;

[0071] 712. Input devices;

[0072] 714. Output devices;

[0073] 716. Presentation equipment;

[0074] 718. Graphical user interface;

[0075] 720, network interface;

[0076] 722. Communication link;

[0077] 724. Communication bus. DETAILED DESCRIPTION

[0078] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0079] Figure 1A schematic diagram of a UI automation test system based on a distributed architecture in some embodiments of this specification is shown in the figure; the system includes a storage service end 10, a scheduling machine 20, a heartbeat monitor 30, and an execution machine cluster 40 composed of multiple execution machines. Among them, the storage service end 10 is used to provide multiple test script sets; the multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version; the heartbeat monitor 30 is used to monitor the status of the execution machine cluster 40, and select multiple target execution machines from the execution machine cluster 40 according to the execution machine status; the scheduling machine 20 is used to distribute the test scripts in the test script set to the multiple target execution machines according to the distribution strategy; the execution machine cluster 40 is used to use the multiple target execution machines to concurrently execute tests, and save the test results to a specified path (a specified storage path on the storage service end 10). In this way, the maintenance cost of UI automation testing in complex scenarios can be reduced, and the test efficiency of UI automation testing in complex scenarios can be improved.

[0080] In some embodiments of this specification, the distributed architecture may include, but is not limited to, the RobotFramework framework. In some embodiments of this specification, the storage service end 10 may be, for example, a NAS (Network Attached Storage) server. The scheduling machine 20, the heartbeat monitoring machine 30, and the execution machine cluster 40 may all be electronic devices with computing and network interaction functions; or they may be software running in the electronic device to provide business logic for data processing and network interaction.

[0081] In some embodiments of the present specification, the heartbeat monitoring machine 30 is a server end configured with a heartbeat algorithm, and the Heartbeat algorithm can detect whether a node or service (mainly used to detect the execution machine in the embodiments of the present specification, and can also monitor the scheduling machine 20) is faulty by regularly sending heartbeat messages. If no heartbeat message is received within a predefined time interval, it is considered that the node or service is faulty. In addition, in some embodiments of the present specification, the Heartbeat algorithm can also provide a pre-check mechanism and a process check mechanism. Among them, the pre-check mechanism refers to: before the overall UI automation test is executed, each node of the execution machine cluster is pre-checked, and for node or service failures (such as distributed test services based on Robot Framework), it can be attempted to recover by restarting the node or restarting the service. The process check mechanism refers to: during the execution of the UI automation test, if a node or service failure occurs, resulting in the failure or non-execution of the corresponding test script, the scheduling machine 20 is notified to redistribute the failed and unexecuted test scripts.

[0082] This specification embodiment provides a UI automation testing method based on a distributed architecture, which can be applied to the above-mentioned system side, refer to Figure 2 As shown, in some embodiments of this specification, the UI automation testing method based on the distributed architecture may include the following steps:

[0083] Step 201: provide multiple test script sets; the multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version.

[0084] Step 202: monitor the status of the execution machine cluster, and select multiple target execution machines from the execution machine cluster according to the execution machine status.

[0085] Step 203: Enable the scheduling machine to distribute the test scripts in the test script set to the multiple target execution machines according to the distribution strategy.

[0086] Step 204: Utilize the multiple target execution machines to concurrently execute the test, and save the test results to a specified path.

[0087] In the embodiments of the present specification, multiple target execution machines can be selected from the execution machine cluster according to the execution machine status, and then the scheduling machine distributes the test scripts to the multiple target execution machines according to the distribution strategy. The multiple target execution machines concurrently execute the test and save the test results to the specified path. In this way, the test efficiency of UI automation testing in complex scenarios can be greatly improved through this distributed scheduling of test scripts and concurrent execution of test scripts. Moreover, since a one-to-one corresponding test script set can be generated for different client versions based on the same set of business logic in advance, the redundancy of multiple sets of corresponding test codes generated by UI automation testing in the same or similar test scenarios can be reduced, which greatly reduces the maintenance cost of UI automation testing in complex scenarios.

[0088] refer to Figure 3 As shown, in some embodiments of this specification, generating multiple test script sets based on the same set of business logic may include the following steps:

[0089] Step 301: Obtain a full set of business action functions and form a business action function library; the business action functions are used to characterize the business operation behaviors of users.

[0090] In some embodiments of this specification, the full amount of business action functions refers to: business action functions (or business action scripts) that require users to perform input operations in all or specified businesses provided by the business system. For example, taking the personal online banking business in the online banking system as an example, business action functions can be extracted from the user's account registration operation, account cancellation operation, system login operation, account query operation, transfer and remittance operation, and online payment operation through crawler tools, etc. For example, taking the transfer and remittance operation as an example, it can be further subdivided into intra-bank transfer operations, domestic bank transfer operations, overseas remittance operations, etc.

[0091] In some embodiments of the present specification, the business action function library is a collection of a series of business action functions, which can also be called a business action script set.

[0092] Step 302: Construct a business data set corresponding to the business action function library.

[0093] In some embodiments of the present specification, for each business action function in the business action function library, real business data can be obtained from the business database as the input of the business action function; business data can also be constructed by random generation or other methods to serve as the input of the business action function; real business data can also be combined with constructed business data to serve as the input of the business action function.

[0094] Step 303: Arrange and combine the elements of the business action function library and the business data set to form a UI test component library.

[0095] In the embodiments of this specification, UI test component = business action function + business data, that is, a business action function and a type of business data can be combined into a UI test component. In some embodiments of this specification, the business action function library and the business data set can be combined by element arrangement (for example Figure 4 As shown), a UI test component library with comprehensive business logic coverage, strong readability and can be reused is obtained.

[0096] On this basis, when the business logic changes (for example, adding or modifying a part of the business logic), you only need to modify the UI test component library accordingly, which is very easy to maintain.

[0097] Step 304: construct a test point set corresponding to the UI test component library.

[0098] In the embodiments of this specification, the test point describes the arrangement and combination of the test methods of the test component, such as boundary value testing, enumeration verification, exception verification, etc.

[0099] Step 305: Arrange and combine elements of the UI test component library and the test point set as needed to form a test script set for each client version.

[0100] In the embodiments of the present specification, a test script = a UI test component + a test point, that is, a UI test component and a test point can be combined into a test script.

[0101] In some embodiments of the present specification, different client versions include clients of different language versions and / or clients of different types. Among them, clients of different language versions may include, for example, a Chinese version of an online banking client, an English version of an online banking client, a Japanese version of an online banking client, etc. In some embodiments of the present specification, the classification criteria of different types of clients may be customized. For example, taking a web client as an example, different browsers may be classified according to the different operating systems they rely on; different browsers may also be classified according to different browser kernels; and different browsers may also be classified according to other classification methods.

[0102] After building the test point set corresponding to the UI test component library, different test targets can be set for different client versions. Therefore, the UI test component library and the test point set can be selectively arranged and combined as needed to obtain a test script set for each client version. In this way, the test script set corresponding to each client version is generated based on the same set of business logic.

[0103] For example, in Figure 5In the illustrated embodiment, for a certain client version, UI test script 11 is obtained by combining UI test component 1 + test point 1, UI test script 12 is obtained by combining UI test component 3 + test point 2, and UI test script 13 is obtained by combining UI test component 4 + test point 3; then the test script set A formed by UI test script 11, UI test script 12 and UI test script 13 is the test script set corresponding to the client version. For another client version, UI test script 21 is obtained by combining UI test component 2 + test point 4, UI test script 22 is obtained by combining UI test component 5 + test point 6, and UI test script 23 is obtained by combining UI test component 8 + test point 7; then the test script set B formed by UI test script 21, UI test script 22 and UI test script 23 is the test script set corresponding to the other client version.

[0104] In some embodiments of the present specification, selecting multiple target execution machines from the execution machine cluster according to the execution machine status may refer to: selecting multiple execution machines with normal health status from the execution machine cluster. In this way, it is possible to avoid affecting the execution progress due to selecting abnormal execution machines.

[0105] refer to Figure 6 As shown, in some embodiments of the present specification, for each test script set, distributing the test scripts in the test script set to the multiple target execution machines according to the distribution strategy may include the following steps:

[0106] Step 601: select a first test script from a test script set, identify the first test script as a first-category element in a script classification distribution set, and determine a database table set involved in the first test script as a database table set of the first-category element.

[0107] The script classification distribution set refers to the set corresponding to the test script set under the classification. For example, if there are 100 test scripts in the test script set, and the classification of the 100 test scripts is as follows:

[0108] The 1st to 30th test scripts are the first category test scripts; the 31st to 80th are the second category test scripts; the 81st to 90th test scripts are the third category test scripts; the 91st to 100th test scripts are the fourth category test scripts; the set formed by these four categories of test scripts is the script classification distribution set.

[0109] In some embodiments of the present specification, the database table set may be a database table set corresponding to a test script involving a write operation.

[0110] Step 602: Select a second test script from the test script set, and perform an intersection operation on the database table set involved in the second test script and the database table set of the first type of elements.

[0111] Step 603: Determine whether the intersection is empty; if so, execute step 604a; otherwise, execute step 604b.

[0112] For example, in an exemplary embodiment of the present specification, if the first test script involves database tables a, b, c, d, that is, the set of database tables corresponding to the first test script is {a, b, c, d}, and the second test script involves database tables a, c, e, that is, the set of database tables corresponding to the second test script is {a, c, e}, then the intersection of {a, b, c, d} and {a, c, e} is {a, c}, and obviously {a, c} is not empty, so step 604b can be executed.

[0113] For example, in an exemplary embodiment of the present specification, the database table set corresponding to the first test script is {a, b, c, d}, and the database table set corresponding to the second test script is {e, f, g}, then {a, b, c, d} and {e, f, g} have no intersection, that is, the intersection is empty, then step 604a can be executed.

[0114] Step 604a: Identify the second test script as a second type of element in the script classification distribution set, and determine the database table set involved in the second test script as the database table set of the second type of element.

[0115] Step 604b: Identify the second test script as a first-category element in the script classification distribution set, and add the database table set involved in the second test script to the database table set of the first-category element.

[0116] Identifying the second test script as a first-category element in the script classification distribution set means treating the second test script and the first test script as elements of the same category.

[0117] Adding the database table set involved in the second test script to the database table set of the first type of elements means determining the union of the database table set involved in the second test script and the database table set involved in the first test script as the database table set of the first type of elements, thereby updating the database table set of the first type of elements. This helps reduce subsequent intersection operations, thereby further improving the efficiency of UI automated testing.

[0118] Step 605 , determine whether there is an unselected test script in the test script set; if yes, execute step 606 ; otherwise, execute step 610 .

[0119] Step 606: Select a test script from the unselected test scripts in the test script set.

[0120] For example, in an exemplary embodiment of the present specification, if there are 100 test scripts in the test script set, after two test scripts are selected therefrom, there are 98 unselected test scripts remaining, and then one test script may be selected from the remaining 98 test scripts.

[0121] Step 607: perform an intersection operation on the database table set involved in the selected test script and the database table set involved in each type of element in the case classification set.

[0122] Step 608, determine whether the intersection is empty; if so, execute step 609a; otherwise, execute step 609b.

[0123] Step 609a: Identify the selected test script as a new type of element in the script classification distribution set, and determine the database table set involved in the selected test script as the database table set of the new type of element; then jump to execute step 605.

[0124] For example, in an exemplary embodiment of the present specification, if the currently selected test script is x, the database table set involved in the test script x is S1; if the case classification set involves four element classes A, B, C, and D, the database table sets of the four element classes A, B, C, and D correspond to S2 to S5 respectively; then it is necessary to calculate the intersection of S1 with each of S2 to S5. If the intersection of S1 and S2 is not empty, the test script x is identified as the element class corresponding to S2 (i.e., element class A), and S1 is added to S2, thereby updating S2.

[0125] Step 609b, identifying the selected test script as the element class corresponding to the intersection with the script classification distribution set, and adding the database table set involved in the selected test script to the database table set of the corresponding element class; then jump to execute step 605.

[0126] Step 610: Utilize the scheduling machine to concurrently distribute the elements belonging to different categories to the multiple target execution machines.

[0127] based on Figure 6The distribution strategy shown can achieve the distribution of elements belonging to different categories to the multiple target execution machines in the same batch for concurrent execution, thereby avoiding database table write conflicts that may be caused by the distribution of elements belonging to the same category to the multiple target execution machines in the same batch for concurrent execution, and further avoiding the abnormal situation of large-scale test execution failure caused by this.

[0128] For example, in an exemplary embodiment of the present specification, if the script classification distribution set includes four element classes A, B, C, and D, the database table sets of the four element classes A, B, C, and D are respectively:

[0129] A: {t1, t2, t3, t4};

[0130] B: {t5, t6, t7, t8};

[0131] C: {t9,t10,t11,t12};

[0132] D: {t13, t14, t15, t16};

[0133] Thus, since there is no intersection between the database table sets of the four element classes A, B, C, and D, even if any test script a in element class A i , any test script b in element class B i , any test script c in element class C i , any test script d in element class D i They are executed concurrently in the same batch, and there will be no database table write conflicts.

[0134] Although the process flows described above include multiple operations that occur in a particular order, it should be clearly understood that the processes may include more or fewer operations, which may be performed sequentially or in parallel (eg, using parallel processors or a multi-threaded environment).

[0135] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0136] It should be noted that in the embodiments of this specification, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user and fully authorized by all parties, that is, the acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0137] The embodiments of this specification also provide a computer device. Figure 7 As shown, in some embodiments of the present specification, the computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs) or graphics processing units (GPUs), and each processing unit may implement one or more hardware threads. The computer device 702 may also include any memory 706, which is used to store any kind of information such as code, settings, data, etc. In a specific embodiment, the computer program on the memory 706 and can be run on the processor 704, when the computer program is run by the processor 704, can execute the instructions of the UI automation testing method based on the distributed architecture described in any of the above embodiments. Non-limiting, for example, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 702. In one case, when the processor 704 executes an associated instruction stored in any memory or combination of memories, the computer device 702 can perform any operation of the associated instruction. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0138] The computer device 702 may also include an input / output interface 710 (I / O) for receiving various inputs (via input device 712) and for providing various outputs (via output device 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface 718 (GUI). In other embodiments, the input / output interface 710 (I / O), input device 712, and output device 714 may not be included, and the computer device 702 may be used as a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.

[0139] The communication link 722 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0140] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), computer-readable storage media, and computer program products of some embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processor to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processor generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processor to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processor so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0143] In a typical configuration, a computer device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0144] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0145] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computer device. As defined in this specification, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0146] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0147] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processors connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0148] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0149] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0150] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0151] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A UI automation testing method based on distributed architecture, characterized in that: include: Provide multiple test script collections; The multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version; Monitor the status of the execution machine cluster, and select multiple target execution machines from the execution machine cluster according to the execution machine status; The scheduling machine distributes the test scripts in the test script set to the multiple target execution machines according to the distribution strategy; The multiple target execution machines are used to concurrently execute the test, and the test results are saved to a specified path.

2. The UI automation testing method based on distributed architecture as claimed in claim 1, characterized in that: The multiple test script sets are pre-generated according to the following method: Obtaining a full set of business action functions and forming a business action function library; the business action functions are used to characterize the business operation behaviors of users; Constructing a business data set corresponding to the business action function library; Arrange and combine the elements of the business action function library and the business data set to form a UI test component library; Constructing a test point set corresponding to the UI test component library; The UI test component library and the test point set are arranged and combined as needed to form a test script set for each client version.

3. The UI automation testing method based on distributed architecture as claimed in claim 1, characterized in that: The distributing the test scripts in the test script set to the multiple target execution machines according to the distribution strategy includes: Selecting a first test script from the test script set, identifying the first test script as a first-category element in the script classification distribution set, and determining a database table set involved in the first test script as a database table set of the first-category element; Select a second test script from the test script set, and perform an intersection operation on the database table set involved in the second test script and the database table set of the first type of elements; Determine whether the intersection is empty; If the intersection is empty, the second test script is identified as a second type of element in the script classification distribution set, and the database table set involved in the second test script is determined as the database table set of the second type of element; If the intersection is not empty, identifying the second test script as a first-category element in the script classification distribution set, and adding the database table set involved in the second test script to the database table set of the first-category element; This is repeated recursively until the category to which each test script in the test script set belongs in the script classification distribution set is determined; The scheduling machine is used to concurrently distribute elements belonging to different categories to the multiple target execution machines.

4. The UI automation testing method based on distributed architecture as claimed in claim 3, characterized in that: The database table set includes a database table set involved in a write operation.

5. The UI automation testing method based on distributed architecture as claimed in claim 1, characterized in that: The different client versions include: Different language versions of the client, and / or different kinds of clients.

6. A UI automation testing system based on distributed architecture, characterized in that: include: The storage service end is used to provide multiple test script sets; The multiple test script sets are generated based on the same set of business logic, and each of the test script sets corresponds to a different client version; A heartbeat monitoring machine, used to monitor the status of the execution machine cluster and select multiple target execution machines from the execution machine cluster according to the execution machine status; A scheduling machine, used to distribute the test scripts in the test script set to the multiple target execution machines according to the distribution strategy; The execution machine cluster is used to use the multiple target execution machines to concurrently execute tests and save the test results to a specified path.

7. The UI automated testing system based on distributed architecture as claimed in claim 6, characterized in that: The multiple test script sets are pre-generated according to the following method: Obtaining a full set of business action functions and forming a business action function library; the business action functions are used to characterize the business operation behaviors of users; Constructing a business data set corresponding to the business action function library; Arrange and combine the elements of the business action function library and the business data set to form a UI test component library; Constructing a test point set corresponding to the UI test component library; The UI test component library and the test point set are arranged and combined as needed to form a test script set for each client version.

8. The UI automated testing system based on distributed architecture as claimed in claim 6, characterized in that: The distributing the test scripts in the test script set to the multiple target execution machines according to the distribution strategy includes: Selecting a first test script from the test script set, identifying the first test script as a first-category element in the script classification distribution set, and determining a database table set involved in the first test script as a database table set of the first-category element; Select a second test script from the test script set, and perform an intersection operation on the database table set involved in the second test script and the database table set of the first type of elements; Determine whether the intersection is empty; If the intersection is empty, the second test script is identified as a second type of element in the script classification distribution set, and the database table set involved in the second test script is determined as the database table set of the second type of element; If the intersection is not empty, identifying the second test script as a first-category element in the script classification distribution set, and adding the database table set involved in the second test script to the database table set of the first-category element; This is repeated recursively until the category to which each test script in the test script set belongs in the script classification distribution set is determined; The scheduling machine is used to concurrently distribute elements belonging to different categories to the multiple target execution machines.

9. The UI automated testing system based on distributed architecture as claimed in claim 8, characterized in that: The database table set includes a database table set involved in a write operation.

10. The UI automated testing system based on distributed architecture as claimed in claim 6, characterized in that: The different client versions include: Different language versions of the client, and / or different kinds of clients.

11. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 5.

12. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes the instructions of the method according to any one of claims 1 to 5.

13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor of a computer device, the computer program executes instructions of the method according to any one of claims 1 to 5.