Program testing method and device

By determining the executor connected to the master device in program testing, and using registry query to determine the executor connected to the terminal device, sending test scripts for testing, the problem of low program testing efficiency in the prior art is solved, and efficient testing dynamically adapted to multiple terminal devices is achieved.

CN113535590BActive Publication Date: 2025-04-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110965088.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-20
Publication Date
2025-04-18
Estimated Expiration
2041-08-20

AI Technical Summary

Technical Problem

In the prior art, the testing efficiency of program testing is not high, especially when facing multiple browsers and models, it is difficult to quickly adapt to different terminal devices.

Method used

By determining that there is a communication connection with the master device and querying the registry to determine the executors connected to the terminal devices, test the applications running on the terminal devices connected to it are sent to these executors, allowing them to test the applications running on the terminal devices connected to themselves by running the test script.

Benefits of technology

It realizes dynamic discovery of terminal devices, real-time viewing of terminal devices' connection status, improves the efficiency and convenience of program testing, and can automate program testing and adapt to multiple terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535590B_ABST
    Figure CN113535590B_ABST
Patent Text Reader

Abstract

The present disclosure provides a program testing method, the method comprising: determining at least one first execution machine that is in communication connection with a main control device; determining at least one second execution machine connected to a terminal device in the at least one first execution machine; and sending a test script to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script. The present disclosure also provides a program testing device, an electronic device, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a program testing method and device. Background Art

[0002] Program testing is an indispensable part of the product development cycle. With the continuous promotion of agile testing, the business side has put forward new requirements for the delivery and iteration cycle of software products. However, since the developed products are aimed at both the brand side (i.e., management platform) and the C-side (i.e., consumers, individual users), how to quickly adapt the brand-side system to the popular browsers on the market and the mainstream models of C-side users has become a challenge.

[0003] In the process of implementing the inventive concept of the present disclosure, the inventors found that there are at least the following problems in the related art:

[0004] In the related art, the testing efficiency of program testing is not high. Summary of the invention

[0005] One aspect of the present disclosure provides a program testing method, including: determining at least one first execution machine that has a communication connection with a main control device; determining at least one second execution machine that is connected to a terminal device among the at least one first execution machine; and sending a test script to each of the at least one second execution machine, so that each of the execution machines tests an application running on the terminal device connected to itself by running the received test script.

[0006] Optionally, determining at least one second execution machine connected to a terminal device among the at least one first execution machine includes: querying a registry on each of the at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; and determining the at least one second execution machine connected to the terminal device among the at least one first execution machine based on the at least one query result.

[0007] Optionally, based on the at least one query result, determining the at least one second execution machine connected to the terminal device in the at least one first execution machine includes: for each query result, in response to version information about the terminal device in a registry representing the current query result, determining that the first execution machine corresponding to the current query result is connected to the terminal device, and using the first execution machine as a second execution machine.

[0008] Optionally, sending the test script to each of the at least one second execution machines includes one of the following: sending the entire test script to each of the at least one second execution machines respectively; first dividing the entire test script into multiple sub-scripts, and then distributing the multiple sub-scripts to the corresponding execution machines of the at least one second execution machine according to preset rules.

[0009] Optionally, the above-mentioned multiple sub-scripts are distributed to the corresponding execution machines of the above-mentioned at least one second execution machine according to preset rules, including at least one of the following: when the number of sub-scripts is less than the number of second execution machines, each sub-script of the above-mentioned multiple sub-scripts is randomly sent to one of the above-mentioned at least one second execution machines, so that different sub-scripts run on different second execution machines; when the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines, the above-mentioned multiple sub-scripts are evenly distributed to each second execution machine of the above-mentioned at least one second execution machine.

[0010] Optionally, the above application program includes a program for implementing a UI interface.

[0011] Optionally, the program testing method further includes: for each of the at least one second execution machines, in response to the current execution machine successfully completing the current program test, obtaining and displaying the test result returned by the current execution machine.

[0012] Another aspect of the present disclosure provides a processing method for an execution machine, comprising: generating a registry; storing the registry on the execution machine; and in response to a terminal device being connected to the execution machine, recording version information about the terminal device in the registry, so that a master control device having a communication connection with the execution machine can determine whether the terminal device is connected to the execution machine based on the information recorded in the registry.

[0013] Optionally, the program testing apparatus further includes: in response to a terminal device being disconnected from the execution machine, deleting version information of the terminal device that is disconnected from the execution machine in the registration table.

[0014] Another aspect of the present disclosure provides a program testing device, including: a first execution machine determination module, used to determine at least one first execution machine that has a communication connection with a main control device; a second execution machine determination module, used to determine at least one second execution machine connected to a terminal device among the at least one first execution machine; and a test script sending module, used to send a test script to each of the at least one second execution machine, so that each of the execution machines can test an application running on the terminal device connected to itself by running the received test script.

[0015] Optionally, the above-mentioned module for determining the second execution machine includes: a query sub-module, used to query the registry on each of the above-mentioned at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; and a sub-module for determining the second execution machine, used to determine the above-mentioned at least one second execution machine connected to the terminal device in the above-mentioned at least one first execution machine based on the above-mentioned at least one query result.

[0016] Optionally, the above-mentioned determination of the second execution machine submodule includes: for each query result, in response to the version information about the terminal device in the current query result representation registry, determining that the first execution machine corresponding to the current query result is connected to the terminal device, and using the first execution machine as a second execution machine.

[0017] Optionally, the above-mentioned test script sending module includes one of the following: a script sending sub-module, used to send the entire test script to each execution machine of the above-mentioned at least one second execution machine respectively; a script distribution sub-module, used to first divide the entire test script into multiple sub-scripts, and then distribute the above-mentioned multiple sub-scripts to the corresponding execution machines of the above-mentioned at least one second execution machine according to preset rules.

[0018] Optionally, the script distribution submodule comprises at least one of the following: a first distribution unit, which randomly sends each of the multiple sub-scripts to one of the at least one second execution machines when the number of sub-scripts is less than the number of second execution machines, so that different sub-scripts run on different second execution machines; and a second distribution unit, which evenly distributes the multiple sub-scripts to each of the at least one second execution machines when the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines.

[0019] Optionally, the above application program includes a program for implementing a UI interface.

[0020] Optionally, the above-mentioned program testing method also includes: a result display unit, which is used to obtain and display the test results returned by the current execution machine for each of the above-mentioned at least one second execution machine in response to the current execution machine successfully completing the current program test.

[0021] Another aspect of the present disclosure provides a processing device for an execution machine, including: a registry generation module for generating a registry; a storage module for storing the above registry on the execution machine; and a first response module for recording version information about the terminal device in the above registry in response to a terminal device being connected to the above execution machine, so that a main control device that has a communication connection with the above execution machine can determine whether the terminal device is connected to the above execution machine based on the information recorded in the above registry.

[0022] Optionally, the program testing device further includes: a second response module, configured to delete the version information of the terminal device that is disconnected from the execution machine in the registration table in response to a terminal device being disconnected from the execution machine.

[0023] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.

[0024] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0025] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the above method when executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:

[0027] Figure 1 The system architecture suitable for the program testing method and device according to the embodiment of the present disclosure is schematically shown;

[0028] Figure 2 A flowchart of a program testing method according to an embodiment of the present disclosure is schematically shown;

[0029] Figure 3 A flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown;

[0030] Figure 4 A flowchart of determining a second execution machine based on a query result according to another embodiment of the present disclosure is schematically shown;

[0031] Figure 5 A flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown;

[0032] Figure 6 A flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown;

[0033] Figure 7 A flowchart of a processing method for executing a machine according to an embodiment of the present disclosure is schematically shown;

[0034] Figure 8 A block diagram of a program testing device according to an embodiment of the present disclosure is schematically shown;

[0035] Fig. 9 A block diagram of determining a second execution machine module according to an embodiment of the present disclosure is schematically shown;

[0036] Fig.10 A block diagram of a test script sending module according to an embodiment of the present disclosure is schematically shown;

[0037] Fig.11 Schematically shows a block diagram of another sending test script module according to an embodiment of the present disclosure;

[0038] Fig.12 A block diagram of a script distribution submodule according to an embodiment of the present disclosure is schematically shown;

[0039] Fig.13 A block diagram schematically shows a program testing device according to another embodiment of the present disclosure;

[0040] Fig.14 A block diagram schematically shows a processing device for executing a machine according to an embodiment of the present disclosure;

[0041] Fig.15 A block diagram schematically shows a processing device for executing a machine according to another embodiment of the present disclosure; and

[0042] Fig.16 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0043] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0044] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0045] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0046] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0047] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts 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, or other programmable data processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable storage medium storing instructions, which can be used by an instruction execution system or used in conjunction with an instruction execution system.

[0048] The embodiment of the present disclosure provides a program testing method and a program testing device capable of applying the method. The method includes: determining at least one first execution machine that has a communication connection with a main control device; determining at least one second execution machine connected to a terminal device among the at least one first execution machine; and sending a test script to each of the at least one second execution machine, so that each of the execution machines tests the application running on the terminal device connected to itself by running the received test script.

[0049] Figure 1 The system architecture suitable for the program testing method and device according to the embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0050] like Figure 1 As shown, the system architecture 100 includes: terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0051] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0052] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0053] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0054] It should be noted that the program testing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the program testing device provided in the embodiment of the present disclosure can generally be arranged in the server 105. The program testing method provided in the embodiment of the present disclosure can also be performed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Accordingly, the program testing system provided in the embodiment of the present disclosure can also be arranged in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Alternatively, the program testing method provided in the embodiment of the present disclosure can also be performed by the terminal device 101, 102, or 103, or can also be performed by other terminal devices different from the terminal device 101, 102, or 103. Accordingly, the program testing device provided in the embodiment of the present disclosure can also be arranged in the terminal device 101, 102, or 103, or can be arranged in other terminal devices different from the terminal device 101, 102, or 103.

[0055] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0056] Figure 2 The flowchart of the program testing method according to the embodiment of the present disclosure is schematically shown.

[0057] like Figure 2 As shown, the method includes operations S210 to S230.

[0058] In operation S210 , at least one first execution machine that is in communication connection with a master device is determined.

[0059] In this operation, the master control device may add one or more first execution machines, and each time one is added, the master control device may establish a corresponding communication connection with the first execution machine.

[0060] The master control device can check the connection status of each first execution machine with the master control device. If the master control device cannot check a first execution machine, it indicates that the master control device has failed to add the first execution machine. If the master control device cannot check the connection status of a first execution machine with the master control device, it indicates that the first execution machine has not successfully established a communication connection with the master control device, or the communication connection between the first execution machine and the master control device is interrupted.

[0061] If the master control device fails to add the first execution machine, the operation of adding the first execution machine by the master control device may be repeated until the master control device successfully adds the first execution machine.

[0062] In operation S220, it is determined that at least one second execution machine of the at least one first execution machine is connected to the terminal device.

[0063] In this operation, each first execution machine in operation S210 may be bound to the terminal device, and after the binding is completed, the terminal device may establish a connection with the first execution machine.

[0064] Each first execution machine can display the connection status of the terminal device. If a first execution machine displays that the connected terminal device is successfully connected, it can be determined that the first execution machine is one of the second execution machines.

[0065] There may be multiple first executors that are in communication connection with the main control device. Accordingly, there may also be multiple first executors that are successfully connected to the terminal device, and accordingly, there may also be multiple second executors that can be determined.

[0066] In operation S230, the test script is sent to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0067] In this operation, the test script is sent to each of the plurality of second execution machines in operation S220. After receiving the test script, each second execution machine runs the test script to test the application running on the terminal device connected to itself.

[0068] For example, each second execution machine can test the functions of an application running on a terminal device connected to itself, test the operation status of each function of the application, and display the test results.

[0069] For example, each second execution machine can test the UI (User Interface) running on the browser of the terminal device connected to itself, test each functional button on the UI, test whether the operation and interaction of each button meet the expected requirements, and display the test results.

[0070] It can be understood that according to the program testing method provided in the embodiment of the present disclosure, at least one first execution machine that has a communication connection with the main control device is determined, and at least one second execution machine that is connected to a terminal device is determined in the at least one first execution machine, and a test script is sent to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0071] According to the program testing method provided by the embodiment of the present disclosure, the main control device adds a first execution machine, establishes a connection with the first execution machine, and confirms the second execution machine connected to the terminal device. The main control device can dynamically discover the terminal device and check the connection status of the terminal device in real time. If the connection between the terminal device and the second execution machine is interrupted, the interruption of the script operation can be known in real time, and the failed script can be run again immediately, thereby improving the efficiency of program testing. The second execution machine tests the application running on the terminal device connected to itself, generates a test report of the application, and returns it to the main control device for display.

[0072] Figure 3 The flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown.

[0073] like Figure 3 As shown, the method includes operations S210, S310-S320 and S230.

[0074] In operation S210 , at least one first execution machine that is in communication connection with a master device is determined.

[0075] This operation and Figure 2 The operation S210 shown is the same and will not be described again.

[0076] In operation S310, a registry on each of the at least one first execution machine is queried to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine.

[0077] In this operation, the main control device queries the registration table on each first execution machine, obtains the corresponding query result on each first execution machine, and determines the connection status between the terminal device and the first execution machine.

[0078] For example, when testing the UI running on the browser of the terminal device, the main control device can query the registry on each first execution machine to obtain the corresponding query results on each first execution machine, thereby determining the connection status between the terminal device and the first execution machine.

[0079] In operation S320, based on the at least one query result, at least one second execution machine connected to the terminal device in the at least one first execution machine is determined.

[0080] In this operation, based on the query result on each first execution machine obtained by the main control device in operation S310, it is determined whether each first execution machine is connected to a terminal device, and a plurality of second execution machines are determined.

[0081] In operation S230, the test script is sent to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0082] This operation and Figure 2 The operation S230 shown is the same and will not be described again.

[0083] According to the program testing method of the embodiment of the present disclosure, the main control device queries the registration table on each first execution machine and obtains the corresponding query results on each first execution machine to determine the connection status between the terminal device and the first execution machine, and determines multiple second execution machines based on the connection status.

[0084] According to the program testing method of the embodiment of the present disclosure, the main control device adds multiple first execution machines, determines whether the addition of the multiple first execution machines is successful, and if the addition is successful, loops through the registration table on each first execution machine, checks the connection status of each terminal device and the execution machine, determines the second execution machine, and thus binds the terminal device to the second execution machine.

[0085] For example, multiple first execution machines may be added through Jenkins. It should be understood that Jenkins is an open source continuous integration tool that provides a user-friendly interface and is mainly used to continuously and automatically build or test software projects and detect the execution of external tasks.

[0086] After the master control device binds the terminal device and the second execution machine, it traverses all the second execution machines to determine whether each second execution machine is connected to the master control device. If the second execution machine is connected to the master control device, the master control device then traverses the registration table of each second execution machine to determine whether the terminal device is connected to the second execution machine and displays the connection status of the terminal device.

[0087] According to the program testing method of the embodiment of the present disclosure, the main control device can dynamically discover the terminal device by adding multiple first execution machines, checking the connection status of each terminal device and the execution machine, determining the second execution machine, and querying the registry on each second execution machine. The connection status of each terminal device and the execution machine can be checked in real time, thereby determining in real time whether the program test of the terminal device is interrupted.

[0088] Figure 4 The flowchart of determining the second execution machine based on the query result according to another embodiment of the present disclosure is schematically shown.

[0089] like Figure 4 As shown, in operation S320, based on at least one query result, determining at least one second execution machine connected to the terminal device in at least one first execution machine may include operations S321 to S323.

[0090] In operation S321, for each query result, in response to the current query result characterizing that there is version information about the terminal device in the registration table.

[0091] In operation S322, for each query result, it is determined whether the first execution machine corresponding to the current query result is connected to a terminal device.

[0092] In operation S323, for each query result, the first execution machine is used as a second execution machine.

[0093] According to the program testing method of the embodiment of the present disclosure, the registry on each first execution machine contains a lot of information. For example, the version information of the terminal device. For example, the version information of the browser running on the terminal device. The master control device can obtain the version information about the terminal device by querying the registry on each first execution machine, and judge the connection status between the terminal device and the first execution machine in response to the version information about the terminal device in the query result.

[0094] It should be understood that in the related art, before program testing, it is necessary to manually modify the configuration file so that the test script is compatible with the terminal device. According to the program testing method of the embodiment of the present disclosure, the master control device obtains version information about the terminal device by querying the registry on each first execution machine. The version information can be used to replace the operation of manually modifying the configuration file. Therefore, in the subsequent program testing of the terminal device, it is not necessary to manually modify the configuration file in the test script before each test. By establishing a connection between the master control device and the first execution machine, and the second execution machine and the terminal device, the master control device can dynamically discover the terminal device and check the connection status of the terminal device in real time, so as to realize automated program testing, thereby improving the efficiency of program testing and the convenience of program testing.

[0095] For example, when testing the UI running on the browser of the terminal device, the main control device can query the registry on each first execution machine to obtain the browser version information about the terminal device running the test UI, thereby determining the connection status between the terminal device and the first execution machine.

[0096] According to the program testing method of the embodiment of the present disclosure, the main control device obtains the query result of the version information about the terminal device in the registration table on each first execution machine, and can determine that each first execution machine connected to the terminal device is the second execution machine.

[0097] It can be understood that according to the program testing method of the embodiment of the present disclosure, the main control device can obtain version information about the terminal device by querying the registry on each first execution machine, and in response to the version information about the terminal device in the query result, it can judge the connection status between the terminal device and the first execution machine, and can determine that each first execution machine connected to the terminal device is a second execution machine.

[0098] According to the program testing method of the embodiment of the present disclosure, based on the version information about the terminal device in the registration table on each first execution machine, it can be determined whether the terminal device is connected to the execution machine, thereby determining whether the program test on the terminal device is interrupted.

[0099] According to the program testing method of the embodiment of the present disclosure, sending the test script to each of the at least one second execution machine may include one of the following: sending the entire test script to each of the at least one second execution machine respectively; first dividing the entire test script into multiple sub-scripts, and then distributing the multiple sub-scripts to the corresponding execution machines in the at least one second execution machine according to preset rules.

[0100] According to the program testing method of the embodiment of the present disclosure, the main control device can send the entire test script to each of the multiple second execution machines respectively.

[0101] According to the program testing method of the embodiment of the present disclosure, the main control device may also first divide the entire test script into multiple sub-scripts, and then distribute the multiple sub-scripts to corresponding execution machines among the multiple second execution machines according to preset rules.

[0102] According to the program testing method of the embodiment of the present disclosure, the main control device can send the entire test script to each execution machine, or it can first divide the entire test script into multiple sub-scripts, and then distribute the multiple sub-scripts to the corresponding execution machines in multiple second execution machines according to preset rules. The execution machine can run the entire script or the sub-script, so that the running status of the script can be known in detail.

[0103] Figure 5 The flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown.

[0104] like Figure 5 As shown, the method includes operations S210-S220, S510-S560.

[0105] In operation S210 , at least one first execution machine that is in communication connection with a master device is determined.

[0106] This operation and Figure 2 The operation S210 shown is the same and will not be described again.

[0107] In operation S220, it is determined that at least one second execution machine of the at least one first execution machine is connected to the terminal device.

[0108] This operation and Figure 2 The operation S220 shown is the same and will not be described again.

[0109] In operation S510, the entire test script is divided into a plurality of sub-scripts.

[0110] In this operation, the entire test script is divided into multiple sub-scripts. For example, the scripts can be divided according to tabs or drawers to facilitate subsequent automated program testing of terminal devices.

[0111] In operation S520, it is determined whether the number of sub-scripts is less than the number of the second execution machines, and if so, the subsequent operation S540 is performed. If not, the subsequent operation S530 is performed.

[0112] In this operation, it is determined whether the number of the plurality of sub-scripts obtained in operation S510 is less than the number of the second execution machines.

[0113] In operation S530, it is determined whether the number of sub-scripts is greater than or equal to the number of the second execution machines and the number of sub-scripts is an integer multiple of the number of the second execution machines. If yes, the subsequent operation S550 is performed.

[0114] In this operation, if the number of the plurality of sub-scripts obtained in operation S510 is not less than the number of the second execution machines, it is determined whether the number of the plurality of sub-scripts obtained in operation S510 is greater than or equal to the number of the second execution machines and the number of the sub-scripts is an integer multiple of the number of the second execution machines.

[0115] In operation S540, when the number of sub-scripts is less than the number of second execution machines, each sub-script in the plurality of sub-scripts is randomly sent to one of the at least one second execution machine, so that different sub-scripts are run on different second execution machines.

[0116] In this operation, when the number of the multiple sub-scripts obtained in operation S510 is less than the number of second execution machines, each of the multiple sub-scripts is randomly sent to one of the at least one second execution machines, so that different second execution machines run different sub-scripts, and some second execution machines may not run the script.

[0117] In operation S550 , when the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines, the plurality of sub-scripts are evenly distributed to each second execution machine in the at least one second execution machine.

[0118] In this operation, when the number of the multiple sub-scripts obtained in operation S510 is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines, the multiple sub-scripts are evenly distributed to each second execution machine in at least one second execution machine, so that different second execution machines run different sub-scripts, and each second execution machine runs the same number of scripts.

[0119] In operation S560, each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0120] According to the program testing method of the embodiment of the present disclosure, the scripts are allocated according to the number of sub-scripts and the number of second execution machines, so that multiple second execution machines concurrently execute different sub-scripts. Once the connection between the terminal device and the corresponding second execution machine is disconnected, the execution of the sub-script stops, and it can be known which terminal devices have successfully tested which sub-scripts, and which terminal devices have failed to test which sub-scripts.

[0121] It should be understood that in the related art, during program testing, the entire script is executed concurrently on multiple execution machines. Once a terminal device is disconnected from the execution machine, the test of the terminal device stops, but the entire program test has not stopped, resulting in a waste of time.

[0122] According to the program testing method of the embodiment of the present disclosure, when the connection between a terminal device and the corresponding second execution machine is disconnected, the second execution machine stops executing the sub-script. Since the entire script is divided into multiple sub-scripts, even if the connection between the terminal device and the corresponding second execution machine is disconnected, it is possible to know which terminal devices have failed to test which sub-scripts. Subsequently, the failed sub-scripts can be retested instead of the entire script, thereby saving program testing time and improving program testing efficiency.

[0123] According to the program testing method of the embodiment of the present disclosure, the application program may include a program that implements a UI interface.

[0124] For example, the program testing method of the embodiment of the present disclosure can test the functions of the UI interface on different browsers of the terminal device. The second execution machine can run the script through Airtest.

[0125] Airtest is a cross-platform user interface automation testing framework. Airtest uses image recognition technology to locate user interface elements. Airtest can easily run scripts on large-scale device clusters.

[0126] Currently, Airtest mainly supports concurrent execution on Android devices. For PC devices, ordinary automation script developers need to perform complex configurations when developing scripts.

[0127] According to the program testing method of the embodiment of the present invention, the main control device obtains version information about the terminal device by querying the registry on each first execution machine. By using this version information, there is no need to manually modify the configuration file in the test script before each test, thereby realizing automated program testing, thereby improving the efficiency of program testing and the convenience of program testing.

[0128] The efficiency of Airtest's concurrent execution of multiple scripts is not high. According to the program testing method of the embodiment of the present disclosure, the entire script is divided into multiple sub-scripts. Even if the connection between the terminal device and the corresponding second execution machine is disconnected, it is possible to know which terminal devices have failed to test which sub-scripts. The failed sub-scripts can be rerun later instead of retesting the entire script, thereby saving program testing time and improving program testing efficiency.

[0129] Figure 6 The flowchart of a program testing method according to another embodiment of the present disclosure is schematically shown.

[0130] like Figure 6 As shown, the method includes operations S210-S230, S610.

[0131] In operation S210 , at least one first execution machine that is in communication connection with a master device is determined.

[0132] This operation and Figure 2 The operation S210 shown is the same and will not be described again.

[0133] In operation S220, it is determined that at least one second execution machine of the at least one first execution machine is connected to the terminal device.

[0134] This operation and Figure 2 The operation S220 shown is the same and will not be described again.

[0135] In operation S230, the test script is sent to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0136] This operation and Figure 2 The operation S230 shown is the same and will not be described again.

[0137] In operation S610, for each execution machine of at least one second execution machine, in response to the current execution machine successfully completing the current program test, a test result returned by the current execution machine is obtained and displayed.

[0138] In this operation, for each of the multiple second execution machines, the main control device responds to the current execution machine successfully completing the current program test, and obtains and displays the test result returned by the current execution machine.

[0139] For example, the master control device can add multiple first execution machines through Jenkins, confirm the second execution machine, and perform program testing on the second execution machine through Airtest. When performing program testing through Jenkins, a task needs to be created.

[0140] A main task is created based on the multiple sub-scripts that are divided. Each main task represents the final running status of the corresponding sub-script. Sub-tasks corresponding to the main task are created based on the distribution, running and other processing flows of each sub-script during its running process. Each sub-task represents the running status of the corresponding sub-script processing flow.

[0141] When the execution machine is testing the program, it can obtain the main task with the task status of "Executing" in real time, traverse the multiple subtasks under the main task, and determine whether each subtask has failed. Once there is a failed subtask, the task status of the main task corresponding to the subtask is set to "Failed". If the task status of a subtask under the main task is "Executing", the task status of the main task corresponding to the subtask is set to "Executing". When the task status of all main tasks is "Completed" and "Successful", the execution status of all main tasks is stored.

[0142] After the current execution machine successfully completes the program test, the main control device obtains and displays the execution status of all main tasks, that is, the final program test result.

[0143] Figure 7 The flowchart of the processing method for executing a machine according to an embodiment of the present disclosure is schematically shown.

[0144] like Figure 7 As shown, the method includes operations S710 to S730.

[0145] In operation S710, a registration table is generated.

[0146] In operation S720, a registration table is stored on the execution machine.

[0147] In operation S730, in response to a terminal device being connected to the execution machine, version information about the terminal device is recorded in a registry so that a master control device that has a communication connection with the execution machine can determine whether the terminal device is connected to the execution machine based on the information recorded in the registry.

[0148] According to the program testing method of the embodiment of the present disclosure, when the terminal device is connected to the execution machine, the execution machine generates a registration table and stores the registration table on the execution machine. The registration table contains version information about the terminal device, and based on the version information, it can be determined whether the execution machine is connected to the terminal device.

[0149] According to the program testing method of the embodiment of the present disclosure, when a terminal device is disconnected from an execution machine, the execution machine deletes the version information of the terminal device that is disconnected from the execution machine in a registry in response to the terminal device being disconnected from the execution machine.

[0150] According to the program testing method of the embodiment of the present disclosure, the execution machine can check the connection status between the terminal device and the execution machine in real time based on the version information about the terminal device in the registry on the execution machine, so as to determine the test status of the program test.

[0151] Figure 8 The figure schematically shows a block diagram of a program testing device according to an embodiment of the present disclosure.

[0152] like Figure 8 As shown, the program testing device 800 includes: determining a first execution machine module 810, determining a second execution machine module 820 and sending a test script module 830. The program testing device can execute the method described in the above reference method embodiment, which will not be repeated here.

[0153] Specifically, the first execution machine determination module 810 may be used to determine at least one first execution machine that is in communication connection with the main control device.

[0154] The second execution machine determination module 820 may be used to determine at least one second execution machine connected to a terminal device in at least one first execution machine.

[0155] The test script sending module 830 may be used to send a test script to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

[0156] Fig. 9 A block diagram of determining a second execution machine module according to an embodiment of the present disclosure is schematically shown.

[0157] like Fig. 9 As shown, the second execution machine determination module 820 includes: a query submodule 821 and a second execution machine determination submodule 822 .

[0158] Specifically, the query submodule 821 can be used to query the registry on each first execution machine in at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine.

[0159] The second execution machine determination submodule 822 may be configured to determine, based on at least one query result, at least one second execution machine connected to a terminal device in at least one first execution machine.

[0160] The second execution machine determination submodule 822 can determine, for each query result, in response to the version information about the terminal device in the current query result representation registry, that the first execution machine corresponding to the current query result is connected to the terminal device, and use the first execution machine as a second execution machine.

[0161] Fig.10 The block diagram of the sending test script module according to an embodiment of the present disclosure is schematically shown.

[0162] like Fig.10 As shown, the test script sending module 830 may include a script sending submodule 831 .

[0163] Specifically, the script sending submodule 831 is used to send the entire test script to each execution machine in the at least one second execution machine.

[0164] Fig.11 A block diagram of another sending test script module according to an embodiment of the present disclosure is schematically shown.

[0165] like Fig.11 As shown, the test script sending module 830 may include a script distribution submodule 832 .

[0166] Specifically, the script distribution submodule 832 is used to first divide the entire test script into multiple sub-scripts, and then distribute the multiple sub-scripts to corresponding execution machines in at least one second execution machine according to preset rules.

[0167] Fig.12 The block diagram of the script distribution submodule according to the embodiment of the present disclosure is schematically shown.

[0168] like Fig.12 As shown, the script distribution submodule 832 may include a first distribution unit 8321 and a second distribution unit 8322 .

[0169] Specifically, when the number of sub-scripts is less than the number of second execution machines, the first distribution unit 8321 randomly sends each sub-script of the multiple sub-scripts to one of the at least one second execution machines, so that different sub-scripts run on different second execution machines.

[0170] The second distribution unit 8322 evenly distributes the plurality of sub-scripts to each second execution machine in the at least one second execution machine when the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines.

[0171] According to the program testing device of the embodiment of the present disclosure, the application program may include a program that implements a UI interface.

[0172] Fig.13 The figure schematically shows a block diagram of a program testing device according to another embodiment of the present disclosure.

[0173] The program testing device 800 includes: a first execution machine determination module 810 , a second execution machine determination module 820 , a test script sending module 830 and a result displaying unit 840 .

[0174] Specifically, a first execution machine module 810 is determined, a second execution machine module 820 is determined, and a test script sending module 830 is determined.

[0175] The result display unit 840 is used to obtain and display the test result returned by the current execution machine for each execution machine of the at least one second execution machine in response to the current execution machine successfully completing the current program test.

[0176] Fig.14 The block diagram schematically shows a processing program testing device for an execution machine according to an embodiment of the present disclosure.

[0177] The program testing device 900 includes: a registration table generation module 910 , a storage module 920 and a first response module 930 .

[0178] Specifically, the registration table generation module 910 is used to generate a registration table;

[0179] A storage module 920, configured to store the registration table on the execution machine; and

[0180] The first response module 930 is used to record version information about the terminal device in a registry in response to a terminal device being connected to the execution machine, so that the main control device that has a communication connection with the execution machine can determine whether the terminal device is connected to the execution machine based on the information recorded in the registry.

[0181] Fig.15 A block diagram of a processing device for executing a machine according to another embodiment of the present disclosure is schematically shown.

[0182] The program testing device 800 includes: a registration table generation module 910 , a storage module 920 , a first response module 930 and a second response module 940 .

[0183] Specifically, the second response module 940 is used to delete the version information of the terminal device that is disconnected from the execution machine in the registration table in response to the terminal device being disconnected from the execution machine.

[0184] It should be noted that the implementation method of the device part is similar to the implementation method of the method part, and the technical effects achieved are also similar, which will not be repeated here.

[0185] According to the modules, submodules and units of the embodiments of the present disclosure, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules and units of the embodiments of the present disclosure, any one or more can be split into multiple modules for implementation. According to the modules and units of the embodiments of the present disclosure, any one or more can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, according to the modules and units of the embodiments of the present disclosure, one or more can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0186] For example, any multiple of the first execution machine module 810, the second execution machine module 820, and the test script sending module 830 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first execution machine module 810, the second execution machine module 820, and the test script sending module 830 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first execution engine determination module 810, the second execution engine determination module 820, and the test script sending module 830 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be executed.

[0187] Fig.16A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Fig.16 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0188] like Fig.16 As shown, the electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0189] In RAM 1003, various programs and data required for the operation of system 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other through bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0190] According to an embodiment of the present disclosure, the system 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The system 1000 may further include one or more of the following components connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0191] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0192] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0193] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0194] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 1002 and / or the RAM 1003 described above and / or one or more memories other than the ROM 1002 and the RAM 1003 .

[0195] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0196] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0197] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A program testing method, comprising: Determine at least one first execution machine that is in communication connection with the master control device; Determine at least one second execution machine of the at least one first execution machine connected to the terminal device; The step of determining that at least one of the at least one first execution machine is connected to at least one second execution machine of the terminal device comprises: querying a registry on each of the at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; Determine, based on the at least one query result, the at least one second execution machine connected to the terminal device in the at least one first execution machine, wherein the query result includes version information about the terminal device; Wherein, when a terminal device is connected to the execution machine, version information about the terminal device is recorded in the registration table; when the terminal device is disconnected from the execution machine, the execution machine deletes the version information of the terminal device that is disconnected from the execution machine in the registration table in response to the disconnection of the terminal device from the execution machine; and The test script is sent to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

2. The method according to claim 1, wherein: Based on the at least one query result, determining the at least one second execution machine connected to the terminal device in the at least one first execution machine includes: for each query result, In response to the current query result indicating that there is version information about the terminal device in the registration table, it is determined that a first execution machine corresponding to the current query result is connected to the terminal device, and the first execution machine is used as a second execution machine.

3. The method according to any one of claims 1 to 2, wherein: Sending the test script to each of the at least one second execution machine includes one of the following: Sending the entire test script to each of the at least one second execution machine respectively; First, the entire test script is divided into a plurality of sub-scripts, and then the plurality of sub-scripts are distributed to corresponding execution machines in the at least one second execution machine according to a preset rule.

4. The method according to claim 3, wherein: Distributing the plurality of sub-scripts to corresponding execution machines in the at least one second execution machine according to a preset rule includes at least one of the following: When the number of sub-scripts is less than the number of second execution machines, randomly sending each sub-script of the plurality of sub-scripts to one of the at least one second execution machines, so that different sub-scripts are run on different second execution machines; When the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines, the plurality of sub-scripts are evenly distributed to each second execution machine in the at least one second execution machine.

5. The method according to claim 1, wherein: The application program includes a program for implementing a UI interface.

6. The method according to claim 1, further comprising: For each of the at least one second execution machine, In response to the current execution machine successfully completing the current program test, the test result returned by the current execution machine is obtained and displayed.

7. A processing method for an execution machine, comprising: Generate a registration form; storing the registry on an execution machine; as well as In response to a terminal device being connected to the execution machine, recording version information about the terminal device in the registration table, so that a master control device having a communication connection with the execution machine can determine whether the terminal device is connected to the execution machine based on the information recorded in the registration table; The main control device is used to determine at least one second execution machine connected to the terminal device in at least one first execution machine; The step of determining that at least one of the first execution machines is connected to at least one second execution machine of the terminal device includes: querying a registry on each of the at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; Determine, based on the at least one query result, the at least one second execution machine connected to the terminal device in the at least one first execution machine, wherein the query result includes version information about the terminal device; Wherein, the method further comprises: In response to a terminal device being disconnected from the execution machine, version information of the terminal device that is disconnected from the execution machine is deleted from the registration table.

8. A program testing device, comprising: A first execution machine module is used to determine at least one first execution machine that is in communication connection with the main control device; A second execution machine determination module is used to determine at least one second execution machine connected to a terminal device among the at least one first execution machine; Wherein, the determining of the second execution machine module includes: A query submodule, configured to query a registry on each of the at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; a second execution machine determination submodule, configured to determine, based on the at least one query result, the at least one second execution machine connected to the terminal device in the at least one first execution machine, wherein the query result includes version information about the terminal device; Wherein, when a terminal device is connected to the execution machine, version information about the terminal device is recorded in the registration table; when the terminal device is disconnected from the execution machine, the execution machine deletes the version information of the terminal device that is disconnected from the execution machine in the registration table in response to the disconnection of the terminal device from the execution machine; and The test script sending module is used to send the test script to each of the at least one second execution machine, so that each execution machine tests the application running on the terminal device connected to itself by running the received test script.

9. The device according to claim 8, wherein: The determining of the second execution submodule comprises: for each query result, In response to the current query result indicating that there is version information about the terminal device in the registration table, it is determined that a first execution machine corresponding to the current query result is connected to the terminal device, and the first execution machine is used as a second execution machine.

10. The device according to any one of claims 8 to 9, wherein: The sending test script module includes one of the following: A script sending submodule, used for sending the entire test script to each execution machine of the at least one second execution machine respectively; The script distribution submodule is used to first divide the entire test script into multiple sub-scripts, and then distribute the multiple sub-scripts to corresponding execution machines in the at least one second execution machine according to preset rules.

11. The device according to claim 10, wherein: The script distribution submodule includes at least one of the following: A first distribution unit, when the number of sub-scripts is less than the number of second execution machines, randomly sends each sub-script of the plurality of sub-scripts to one of the at least one second execution machines, so that different sub-scripts are run on different second execution machines; The second distribution unit evenly distributes the plurality of sub-scripts to each second execution machine in the at least one second execution machine when the number of sub-scripts is greater than or equal to the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines.

12. The device according to claim 8, wherein: The application program includes a program for implementing a UI interface.

13. The apparatus according to claim 8, further comprising: A result display unit is used for each execution machine of the at least one second execution machine, In response to the current execution machine successfully completing the current program test, the test result returned by the current execution machine is obtained and displayed.

14. A processing device for an execution machine, comprising: Generate registry module, used to generate registry; A storage module, used for storing the registration table on an execution machine; as well as A first response module is used for recording version information about the terminal device in the registration table in response to a terminal device being connected to the execution machine, so that the main control device having a communication connection with the execution machine can determine whether the terminal device is connected to the execution machine based on the information recorded in the registration table; The main control device is used to determine at least one second execution machine connected to the terminal device in at least one first execution machine; The step of determining that at least one of the first execution machines is connected to at least one second execution machine of the terminal device includes: querying a registry on each of the at least one first execution machine to obtain at least one corresponding query result, wherein each query result corresponds to a first execution machine; Determine, based on the at least one query result, the at least one second execution machine connected to the terminal device in the at least one first execution machine, wherein the query result includes version information about the terminal device; Wherein, the device further comprises: The second response module is used for deleting the version information of the terminal device which is disconnected from the execution machine in the registration table in response to the terminal device being disconnected from the execution machine.

15. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7. 16 . A computer-readable storage medium storing computer-executable instructions, wherein the instructions are used to implement the method according to claim 1 when executed.

Citation Information

Patent Citations

  • Application program testing method, device and system, electronic equipment and storage medium

    CN110032507A

  • Performance test method and device for Web application

    CN111752828A