Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon, the computer program product being for use by or in connection with an instruction execution system.
The embodiment of the disclosure provides a program testing method and a program testing device capable of applying the method. The method comprises the steps of determining at least one first execution machine which is in communication connection with a main control device, determining at least one second execution machine which is connected with a terminal device in the at least one first execution machine, and sending a test script to each execution machine in the at least one second execution machine, so that each execution machine tests an application program running on the terminal device connected with the execution machine by running the received test script.
Fig. 1 schematically illustrates a system architecture suitable for program testing methods and apparatus according to embodiments of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, the system architecture 100 includes terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide 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, and the like.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients and/or social platform software, to name a few.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the program testing method provided by the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the program testing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The program testing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the program testing system provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Or the program test method provided by the embodiment of the present disclosure may be executed by the terminal device 101, 102, or 103, or may be executed by another terminal device other than the terminal device 101, 102, or 103. Accordingly, the program testing apparatus provided by the embodiments of the present disclosure may also be provided in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a program test method according to an embodiment of the disclosure.
As shown in FIG. 2, the method includes operations S210-S230.
In operation S210, it is determined that at least one first execution machine has a communication connection with the master device.
In this operation, the master control device may add one or more first execution machines, and each time the addition is completed, the master control device may establish a corresponding communication connection with the first execution machine.
The master control device can check the connection condition of each first execution machine and the master control device. If the master device cannot see a certain first execution machine, the characterization master device fails to add the first execution machine. And if the master control equipment cannot check the connection condition of a certain first execution machine and the master control equipment, the first execution machine is characterized to be not successfully connected with the master control equipment, or the communication connection between the first execution machine and the master control equipment is interrupted.
If the addition of the first execution machine by the master device fails, the operation of adding the first execution machine by the master device may be repeatedly executed until the master device successfully adds the first execution machine.
In operation S220, it is determined that at least one second execution machine of the at least one first execution machine to which the terminal device is connected.
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.
Each first execution machine can display the connection state of the terminal equipment. If a first execution machine displays that the connected terminal equipment is successfully connected, the first execution machine can be determined to be one of the second execution machines.
The first execution machine which is in communication connection with the master control equipment can be a plurality of first execution machines. Correspondingly, the number of the first execution machines successfully connected with the terminal equipment can be multiple, and correspondingly, the number of the second execution machines can be multiple.
In operation S230, the test script is transmitted to each of the at least one second execution machine, so that each execution machine tests an application running on a terminal device connected to itself by running the received test script.
In this operation, the test script is transmitted to each of the plurality of second executors in operation S220. And after each second execution machine receives the test script, running the test script, and testing the application program running on the terminal equipment connected with the second execution machine.
For example, each second execution machine may test the functions of the application program running on the terminal device connected to itself, test the running condition of each function of the application program, and display the test result.
For example, each second executor may test a UI (User Interface) running on a browser of a terminal device connected to itself, test each functional button on the UI, test whether operation and interaction of each button meets expected requirements, and display a test result.
It can be understood that according to the program testing method provided by the embodiment of the present disclosure, at least one first execution machine having communication connection with the main control device is determined, at least one second execution machine connected with the terminal device in the at least one first execution machine is determined, and a test script is sent to each of the at least one second execution machine, so that each execution machine tests an application program running on the terminal device connected with itself by running the received test script.
According to the program testing method provided by the embodiment of the disclosure, the first execution machine is added through the main control equipment, connection is established between the main control equipment and the first execution machine, the second execution machine which is connected with the terminal equipment is confirmed, the main control equipment can dynamically discover the terminal equipment, and the connection state of the terminal equipment is checked in real time. If the connection between the terminal equipment and the second execution machine is interrupted, the running interruption of the script can be known in real time, and the failed script is run again in real time, so that the efficiency of program test is improved. And testing the application program running on the terminal equipment connected with the second execution machine through the second execution machine, generating a test report of the application program, and returning to the main control equipment for display.
Fig. 3 schematically illustrates a flow chart of a program test method according to another embodiment of the present disclosure.
As shown in FIG. 3, the method includes operations S210, S310-S320, and S230.
In operation S210, it is determined that at least one first execution machine has a communication connection with the master device.
The present operation is the same as operation S210 shown in fig. 2, and will not be described again.
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, where each query result corresponds to one first execution machine.
In the operation, the main control equipment inquires a registry on each first execution machine to obtain a corresponding inquiry result on each first execution machine so as to judge the connection condition of the terminal equipment and the first execution machine.
For example, when testing the UI running on the browser of the terminal device, the main control device may query the registry on each first execution machine to obtain a corresponding query result on each first execution machine, so as to determine the connection situation of the terminal device and the first execution machine.
In operation S320, at least one second actuator to which the terminal device is connected among the at least one first actuator is determined based on the at least one query result.
In this operation, based on the query result on each first execution machine obtained by the master control device in operation S310, it is determined whether each first execution machine is connected with a terminal device, and a plurality of second execution machines are determined.
In operation S230, the test script is transmitted to each of the at least one second execution machine, so that each execution machine tests an application running on a terminal device connected to itself by running the received test script.
The present operation is the same as operation S230 shown in fig. 2, and will not be described again.
According to the program testing method of the embodiment of the disclosure, the main control equipment queries the registry on each first execution machine to obtain the corresponding query result on each first execution machine, so as to judge the connection condition of the terminal equipment and the first execution machines, and based on the connection condition, a plurality of second execution machines are determined.
According to the program testing method of the embodiment of the disclosure, the main control equipment adds a plurality of first executors, judges whether the addition of the plurality of first executors is successful, if so, circularly traverses the registry on each first executor, checks the connection state of each terminal equipment and the executors, and determines a second executor, thereby binding the terminal equipment and the second executors.
For example, a plurality of first actuators may be added through jenkins. It should be appreciated that Jenkins is an open-source, continuous integration tool that provides a friendly operator interface, primarily for continuously, automatically building or testing items of software, detecting the execution of external tasks.
After the main control equipment binds the terminal equipment and the second execution machines, traversing all the second execution machines, judging whether each second execution machine is connected with the main control equipment, if so, traversing the registry of each second execution machine, judging whether the terminal equipment is connected with the second execution machine, and displaying the connection state of the terminal equipment.
According to the program testing method of the embodiment of the disclosure, the main control device checks the connection state of each terminal device and the execution machine by adding a plurality of first execution machines, determines the second execution machine, queries the registry on each second execution machine, can dynamically find out the terminal device, and can check the connection state of each terminal device and the execution machine in real time, so that whether the program test of the terminal device is interrupted or not can be judged in real time.
Fig. 4 schematically illustrates a flow diagram of determining a second execution machine based on query results according to another embodiment of the present disclosure.
As shown in fig. 4, in operation S320, determining at least one second execution machine connected to a terminal device in at least one first execution machine based on at least one query result may include operations S321 to S323.
In operation S321, for each query result, version information about the terminal device in the registry is characterized in response to the current query result.
In operation S322, it is determined that a terminal device is connected to the first execution machine corresponding to the current query result for each query result.
In operation S323, the first execution machine is used as a second execution machine for each query result.
According to the program testing method of the embodiment of the disclosure, the registry on each first execution machine contains a lot of information. For example version information of the terminal device. For example browser version information run by the terminal device. The main control equipment can obtain version information related to the terminal equipment by inquiring a registry on each first execution machine, and judge the connection condition of the terminal equipment and the first execution machines in response to the version information related to the terminal equipment in the inquiry result.
It should be understood that, in the related art, before the program test, the configuration file needs to be manually modified so that the test script is adapted to the terminal device. According to the program testing method of the embodiment of the disclosure, the main control device obtains version information related to the terminal device by inquiring the registry on each first execution machine, and the operation of manually modifying the configuration file can be replaced by utilizing the version information. Therefore, during subsequent program testing of the terminal equipment, the configuration file in the test script does not need to be manually modified before each test, the connection is established between the main control equipment and the first execution machine, and the connection between the second execution machine and the terminal equipment is established, the main control equipment can dynamically discover the terminal equipment and check the connection state of the terminal equipment in real time, so that automatic program testing can be realized, the efficiency of program testing is improved, and the convenience of program testing is also improved.
For example, when testing the UI running on the browser of the terminal device, the main control device may query the registry on each first execution machine to obtain browser version information related to the running test UI of the terminal device, so as to determine the connection condition of the terminal device and the first execution machine.
According to the program testing method of the embodiment of the disclosure, the query result of the version information about the terminal device in the registry on each first execution machine obtained by the main control device can determine that each first execution machine connected with the terminal device is the second execution machine.
It can be understood that according to the program testing method of the embodiment of the present disclosure, the master control device may obtain version information related to the terminal device by querying a registry on each first execution machine, and in response to the version information related to the terminal device in the query result, may determine a connection condition between the terminal device and the first execution machine, and may determine that each first execution machine connected with the terminal device is a second execution machine.
According to the program testing method of the embodiment of the disclosure, based on version information about the terminal equipment in the registry on each first execution machine, whether the terminal equipment is connected with the execution machine can be judged, so that whether program testing on the terminal equipment is interrupted is judged.
According to the program testing method, the test script is sent to each of the at least one second execution machine, and the method comprises the steps of sending the whole test script to each of the at least one second execution machine respectively, dividing the whole test script into a plurality of sub-scripts, and distributing the plurality of sub-scripts to corresponding execution machines of the at least one second execution machine according to preset rules.
According to the program testing method disclosed by the embodiment of the disclosure, the main control equipment can respectively send the whole test script to each of the plurality of second execution machines.
According to the program testing method of the embodiment of the disclosure, the main control device may divide the entire test script into a plurality of sub-scripts, and then distribute the plurality of sub-scripts to corresponding execution machines in the plurality of second execution machines according to a preset rule.
According to the program testing method of the embodiment of the disclosure, the main control device may send the whole test script to each execution machine, or divide the whole test script into a plurality of sub-scripts, and then distribute the plurality of sub-scripts to corresponding execution machines in a plurality of second execution machines according to a preset rule, where the execution machines may run the whole script, or may run the sub-scripts, so that the running condition of the script may be known in detail.
Fig. 5 schematically illustrates a flow chart of a program test method according to another embodiment of the present disclosure.
As shown in FIG. 5, the method includes operations S210-S220, S510-S560.
In operation S210, it is determined that at least one first execution machine has a communication connection with the master device.
The present operation is the same as operation S210 shown in fig. 2, and will not be described again.
In operation S220, it is determined that at least one second execution machine of the at least one first execution machine to which the terminal device is connected.
This operation is the same as operation S220 shown in fig. 2, and will not be described again here.
In operation S510, the entire test script is divided into a plurality of sub-scripts.
In the operation, the whole test script is divided into a plurality of sub-scripts, for example, the scripts can be divided according to the tab or the drawer, so that the automatic program test of the terminal equipment can be conveniently carried out later.
In operation S520, it is determined whether the number of sub-scripts is less than the number of second executors, and if so, a subsequent operation S540 is performed. If not, a subsequent operation S530 is performed.
In this operation, it is determined whether the number of the plurality of sub-scripts obtained in operation S510 is smaller than the second execution machine number.
In operation S530, it is determined whether the number of sub-scripts is equal to or greater than the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines, and if so, the subsequent operation S550 is performed.
In this operation, if the number of the plurality of sub-scripts obtained in operation S510 is not smaller 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 equal to or greater than 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.
In operation S540, in the case that the number of the sub-scripts is smaller than the number of the second execution machines, each of the plurality of sub-scripts is randomly transmitted to one of the at least one second execution machine, so that different sub-scripts are run on different second execution machines.
In this operation, in the case where the number of the plurality of sub-scripts obtained in operation S510 is smaller than the number of the second execution machines, each of the plurality of sub-scripts is randomly transmitted to one of the at least one second execution machine, so that the different second execution machines run the different sub-scripts, and some of the second execution machines may not run the scripts.
In operation S550, in the case that the number of the sub-scripts is equal to or greater than 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, the plurality of sub-scripts are equally distributed to each of the at least one second execution machine.
In this operation, when 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, the plurality of sub-scripts are distributed to each of the at least one second execution machine in an average manner, so that different second execution machines operate different sub-scripts, and the number of scripts operated by each second execution machine is the same.
In operation S560, each of the executors tests an application running on a terminal device connected to itself by running the received test script.
According to the program testing method of the embodiment of the disclosure, according to the number of the sub-scripts and the number of the second execution machines, the scripts are distributed, so that a plurality of the second execution machines execute different sub-scripts concurrently. Once the connection between the terminal equipment and the corresponding second execution machine is disconnected, the execution of the sub-script is stopped, and the knowledge of which terminal equipment tests which sub-script succeeds and which terminal equipment tests which sub-script fails can be obtained.
It should be understood that in the related art, in the program test, the entire script is executed concurrently on a plurality of execution machines, and once a certain terminal device is disconnected from the execution machine, the test of the terminal device is stopped, but the entire program test is not stopped yet, thereby causing a waste of time.
According to the program testing method of the embodiment of the disclosure, when the connection between a certain terminal device and a corresponding second execution machine is disconnected, the second execution machine stops executing the sub-script. Since the whole script is divided into a plurality of 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 failed to test which sub-scripts. The failed sub-script can be retested later instead of retesting the whole script, thereby saving the program test time and improving the program test efficiency.
According to the program testing method of the embodiment of the present disclosure, the application program may include a program implementing a UI interface.
For example, the program testing method of the embodiment of the present disclosure may test the functions of UI interfaces on different browsers of the terminal device. The second execution machine may run the script through Airtest.
Airtest is a cross-platform user interface automation test framework. Airtest use image recognition techniques to locate elements of the user interface. Airtest can easily run scripts on a large cluster of devices.
At present Airtest mainly supports concurrent execution of android equipment, and for PC equipment, a common automation script developer needs to perform complex configuration when developing scripts.
According to the program testing method of the embodiment of the disclosure, the main control equipment obtains the version information related to the terminal equipment by inquiring the registry on each first execution machine, and the configuration file in the test script is not required to be manually modified before each test by utilizing the version information, so that automatic program testing can be realized, the efficiency of program testing is further improved, and the convenience of program testing is also improved.
Airtest multiple scripts are not efficient to execute concurrently. According to the program testing method of the embodiment of the disclosure, the whole script is divided into a plurality of sub-scripts, and even if the connection between the terminal equipment and the corresponding second execution machine is disconnected, it is possible to know which terminal equipment fails to test which sub-scripts. The failed sub-script can be rerun in the follow-up process instead of retesting the whole script, so that the program test time is saved and the program test efficiency is improved.
Fig. 6 schematically illustrates a flow chart of a program test method according to a further embodiment of the present disclosure.
As shown in FIG. 6, the method includes operations S210-S230, S610.
In operation S210, it is determined that at least one first execution machine has a communication connection with the master device.
The present operation is the same as operation S210 shown in fig. 2, and will not be described again.
In operation S220, it is determined that at least one second execution machine of the at least one first execution machine to which the terminal device is connected.
This operation is the same as operation S220 shown in fig. 2, and will not be described again here.
In operation S230, the test script is transmitted to each of the at least one second execution machine, so that each execution machine tests an application running on a terminal device connected to itself by running the received test script.
The present operation is the same as operation S230 shown in fig. 2, and will not be described again.
In operation S610, for each of the at least one second execution machine, in response to the current execution machine successfully completing the program test, a test result returned by the current execution machine is obtained and displayed.
In the operation, for each of the plurality of second execution machines, the main control device responds to the current execution machine to successfully complete the program test, and obtains and displays the test result returned by the current execution machine.
For example, the master device may add a plurality of first execution machines through jenkins, confirm a second execution machine, and perform program testing on the second execution machine through Airtest. When program testing is performed through jenkins, tasks need to be created.
And creating main tasks according to the divided multiple sub-scripts, wherein each main task represents the final running condition of the corresponding sub-script. Creating subtasks corresponding to the main tasks according to the processing flows of distribution, operation and the like of each subtscript in the operation process of each subtscript, wherein each subtask characterizes the operation condition of the corresponding subtscript processing flow.
When the execution machine performs program test, the execution machine can acquire the task state as the main task in execution in real time, traverse a plurality of sub-tasks under the main task, and judge whether each sub-task fails. Once a failed subtask exists, the task state of the main task corresponding to the subtask is set as failed. And if the task state of the subtask under the main task is in execution, setting the task state of the main task corresponding to the subtask as in execution. And storing the execution conditions of all the main tasks when the task states of all the main tasks are completed and are successful.
After the current execution machine successfully completes the program test, the main control equipment acquires and displays the execution conditions of all main tasks, namely the final program test result.
Fig. 7 schematically illustrates a flow chart of a processing method for executing a machine according to an embodiment of the disclosure.
As shown in FIG. 7, the method includes operations S710-S730.
In operation S710, a registry is generated.
In operation S720, the registry is stored on the execution machine.
In response to the connection of the terminal device to the execution machine, version information about the terminal device is recorded in the registry so that the master 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 in operation S730.
According to the program testing method of the embodiment of the disclosure, when the terminal equipment is connected with the execution machine, the execution opportunity generates a registry and stores the registry on the execution machine. The registry contains version information about the terminal device, from which it can be determined whether the terminal device is connected to the execution machine.
According to the program testing method of the embodiment of the disclosure, when the terminal equipment is disconnected from the execution machine, the execution machine responds to the disconnection of the terminal equipment from the execution machine, and the version information of the terminal equipment disconnected from the execution machine at this time is deleted in the registry.
According to the program testing method disclosed by the embodiment of the disclosure, the execution machine can check the connection condition of the terminal equipment and the execution machine in real time based on the version information related to the terminal equipment in the registry on the execution machine, so as to judge the testing condition of the program test.
Fig. 8 schematically illustrates a block diagram of a program testing apparatus according to an embodiment of the present disclosure.
As shown in FIG. 8, the application program testing apparatus 800 includes a determine first executor module 810, a determine second executor module 820, and a send test script module 830. The program testing device may perform the method described above with reference to the method embodiment, and will not be described here again.
Specifically, the determine first execution machine module 810 may be used to determine at least one first execution machine that has a communication connection with the master device.
The determine second execution machine module 820 may be configured to determine at least one second execution machine of the at least one first execution machine to which the terminal device is connected.
The send test script module 830 may be configured to send a test script to each of the at least one second execution machine, so that each execution machine tests an application running on a terminal device connected to itself by running the received test script.
Fig. 9 schematically illustrates a block diagram of determining a second executor module according to an embodiment of the disclosure.
As shown in FIG. 9, determining the second execution machine module 820 includes querying the sub-module 821 and determining the second execution machine sub-module 822.
Specifically, the query sub-module 821 may be configured to query a registry on each of the at least one first execution machine to obtain at least one corresponding query result, where each query result corresponds to one first execution machine.
The determine second execution machine sub-module 822 may be configured to determine, based on at least one query result, at least one second execution machine of the at least one first execution machine to which the terminal device is connected.
The determine second execution machine sub-module 822 may, for each query result, characterize version information about the terminal device in the registry in response to the current query result, determine 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.
FIG. 10 schematically illustrates a block diagram of a send test script module, according to an embodiment of the disclosure.
As shown in FIG. 10, the send test script module 830 may include a script send sub-module 831.
Specifically, the script sending submodule 831 is configured to send the entire test script to each of the at least one second execution machine.
FIG. 11 schematically illustrates a block diagram of another send test script module, according to an embodiment of the disclosure.
As shown in FIG. 11, the send test script module 830 may include a script distribution sub-module 832.
Specifically, the script distribution sub-module 832 is configured to divide the entire test script into a plurality of sub-scripts, and then distribute the plurality of sub-scripts to corresponding execution machines in the at least one second execution machine according to a preset rule.
Fig. 12 schematically illustrates a block diagram of a script distribution sub-module according to an embodiment of the present disclosure.
As shown in fig. 12, the script distribution sub-module 832 may include a first distribution unit 8321 and a second distribution unit 8322.
Specifically, the first distributing unit 8321 randomly sends each of the plurality of sub-scripts to one of the at least one second executor to enable different sub-scripts to run on different second executors when the number of the sub-scripts is smaller than the number of the second executors.
The second distributing unit 8322 distributes the plurality of sub-scripts to each of the at least one second execution machine on average, when the number of sub-scripts is equal to or greater than the number of second execution machines and the number of sub-scripts is an integer multiple of the number of second execution machines.
According to the program testing device of the embodiment of the present disclosure, the application program may include a program implementing a UI interface.
Fig. 13 schematically illustrates a block diagram of a program testing apparatus according to another embodiment of the present disclosure.
The application program testing apparatus 800 includes a determining first executor module 810, a determining second executor module 820, a transmitting test script module 830, and a presentation result unit 840.
Specifically, a first executor module 810 is determined, a second executor module 820 is determined, and a send test script module 830 is determined
And the display result unit 840 is configured to, for each of the at least one second execution machine, respond to the current execution machine to successfully complete the program test, and obtain and display a test result returned by the current execution machine.
Fig. 14 schematically illustrates a block diagram of a handler testing apparatus for an execution machine according to an embodiment of the present disclosure.
The application program testing device 900 includes a registry generation module 910, a storage module 920, and a first response module 930.
Specifically, a generate registry module 910 for generating a registry;
a storage module 920 for storing the registry on the execution machine, and
A first response module 930, configured to record version information about the terminal device in a registry in response to the connection of the terminal device to the execution machine, so that the master 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.
Fig. 15 schematically illustrates a block diagram of a processing device for an execution machine according to another embodiment of the present disclosure.
The application program testing device 800 comprises a generation registry module 910, a storage module 920, a first response module 930, and a second response module 940.
Specifically, the second response module 940 is configured to delete, in the registry, version information of the terminal device disconnected from the execution at this time in response to disconnection of the terminal device from the execution.
It should be noted that, the embodiment mode of the device portion is similar to the embodiment mode of the method portion, and the achieved technical effects are similar, and are not described herein.
Any number of the modules, sub-modules and units, or at least some of the functionality of any number of the modules, sub-modules and units according to embodiments of the present disclosure, may be implemented in one module. Any one or more of the modules, units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, units according to embodiments of the present disclosure may be implemented at least in part 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 in hardware or firmware in any other reasonable manner of integrating or packaging the circuits, or in any one of or in any suitable combination of three of software, hardware, and firmware. Or one or more of the modules, units according to embodiments of the present disclosure may be at least partially implemented as computer program modules which, when executed, may perform the corresponding functions.
For example, any of the determining first execution machine module 810, determining second execution machine module 820, and transmitting test script module 830 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Or at least some of the functionality of one or more of the modules may be combined with, and implemented in, at least some of the functionality of other modules. According to embodiments of the present disclosure, at least one of determining the first execution machine module 810, determining the second execution machine module 820, and sending test script module 830 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), programmable Logic Array (PLA), system-on-chip, system-on-substrate, system-on-package, application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Or at least one of the first execution machine module 810, the second execution machine module 820, and the send test script module 830 may be implemented at least in part as a computer program module that, when executed, performs the corresponding functions.
Fig. 16 schematically illustrates a block diagram of an electronic device adapted to implement the above-described method according to an embodiment of the present disclosure. The electronic device shown in fig. 16 is merely an example, and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 16, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that 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 section 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 an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1001 may also include on-board memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM1003, various programs and data required for the operation of the system 1000 are stored. The processor 1001, the ROM 1002, and the RAM1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the program may be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
According to embodiments of the present disclosure, system 1000 may also include an input/output (I/O) interface 1005, with input/output (I/O) interface 1005 also connected to bus 1004. The system 1000 may also include one or more of an input section 1006 including a keyboard, mouse, etc., an output section 1007 including a Cathode Ray Tube (CRT), liquid Crystal Display (LCD), etc., and speakers, 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, modem, etc., connected to the I/O interface 1005. The communication section 1009 performs communication processing via a network such as the internet. The 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, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1001. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Such as, but not limited to, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 1002 and/or RAM 1003 and/or one or more memories other than ROM 1002 and RAM 1003 described above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only 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 embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.