CN110032507B - Application program testing method, device and system, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN110032507B
CN110032507B CN201811592029.8A CN201811592029A CN110032507B CN 110032507 B CN110032507 B CN 110032507B CN 201811592029 A CN201811592029 A CN 201811592029A CN 110032507 B CN110032507 B CN 110032507B
Authority
CN
China
Prior art keywords
equipment
server
test
terminal
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811592029.8A
Other languages
Chinese (zh)
Other versions
CN110032507A (en
Inventor
刘梅
郭小溪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201811592029.8A priority Critical patent/CN110032507B/en
Publication of CN110032507A publication Critical patent/CN110032507A/en
Application granted granted Critical
Publication of CN110032507B publication Critical patent/CN110032507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the specification provides an application program testing method, which includes the steps of monitoring first user operation executed by a user on an application program to be tested through first terminal equipment, generating a testing script based on the first user operation, sending the testing script to a server, sending the testing script to one or more second terminal equipment which is in an idle state at present and is in communication connection with the server through equipment information registration in advance, and testing the application program to be tested. The scheme greatly facilitates the recording of the test script by the user and is beneficial to simplifying the user operation.

Description

Application program testing method, device and system, electronic equipment and storage medium
Technical Field
The embodiment of the specification relates to the technical field of software, in particular to an application program testing method, device and system, electronic equipment and a storage medium.
Background
Cloud testing refers to the steps of using a series of methods and tools to run an application program in advance before the application program is pushed to a user in a large scale, simulating a real production environment, monitoring the running condition, and finding possible problems of function, safety, compatibility and the like so as to ensure that the application program used by the end user is as stable and reliable as possible. In the current cloud platform solution on the market, programmers compile scripts on an automation framework, and synchronize the scripts to a server after debugging is completed, so that operation by users is inconvenient.
Disclosure of Invention
The embodiment of the specification provides an application program testing method, device and system, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present specification provides an application program testing method, which is applied to a first terminal device, and includes: detecting whether a user triggers a first preset instruction or not; when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on an application program to be tested through the first terminal equipment, and generating a test script based on the first user operation; and sending the test script to a server so that the server sends the test script to one or more second terminal devices in an idle state for execution, wherein the second terminal devices are terminal devices which establish communication connection with the server by registering device information in the server in advance.
In a second aspect, an embodiment of the present specification provides an application program testing method, which is applied to a second terminal device, and includes: sending a registration request to a server, wherein the registration request comprises equipment information of second terminal equipment, so that the server stores the equipment information in a preset equipment information base; when registration success confirmation information fed back by the server based on the registration request is received, establishing communication connection between the second terminal device and the server; and when receiving a test script corresponding to the application program to be tested and issued by the server, executing the test script.
In a third aspect, an embodiment of the present specification provides an application program testing method, which is applied to a server, and includes: when a test script sent by first terminal equipment is received, determining one or more second terminal equipment currently in an idle state based on the test script, wherein the second terminal equipment is terminal equipment which is used for establishing communication connection with the server by sending a registration request to the server in advance; and sending the test script to the one or more second terminal devices which are in the idle state currently, so that the second terminal devices execute the test script.
In a fourth aspect, an embodiment of the present specification provides an application testing apparatus, which is applied to a first terminal device, and includes: the first detection module is used for detecting whether a user triggers a first preset instruction or not; the script generation module is used for monitoring a first user operation executed by the user on the application program to be tested through the first terminal device when the user is detected to trigger a first preset instruction, and generating a test script based on the first user operation; the first script sending module is configured to send the test script to a server, so that the server sends the test script to one or more second terminal devices currently in an idle state for execution, where the second terminal devices are terminal devices that establish communication connection with the server by registering device information in the server in advance.
In a fifth aspect, an embodiment of the present specification provides an application testing apparatus, which is applied to a second terminal device, and includes: the second registration module is used for sending a registration request to the server, wherein the registration request comprises the equipment information of the second terminal equipment, so that the server stores the equipment information in a preset equipment information base; the first connection module is used for establishing communication connection between the second terminal device and the server when receiving registration success confirmation information fed back by the server based on the registration request; and the execution module is used for executing the test script when receiving the test script which is sent by the server and corresponds to the application program to be tested.
In a sixth aspect, an embodiment of the present specification provides an application program testing apparatus, which is applied to a server, and includes: the script receiving module is used for determining one or more second terminal devices which are currently in an idle state based on a test script when the test script sent by a first terminal device is received, wherein the second terminal devices are terminal devices which are used for establishing communication connection with the server by sending a registration request to the server in advance; and the second script sending module is used for sending the test script to the one or more second terminal devices which are in the idle state currently so as to enable the second terminal devices to execute the test script.
In a seventh aspect, an embodiment of the present specification provides a cloud test system, including: the system comprises a first terminal device, a server and a second terminal device. The first terminal device is used for detecting whether a user triggers a first preset instruction or not; when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on an application program to be tested through the first terminal equipment, and generating a test script based on the first user operation; and sending the test script to a server. The server is used for determining one or more second terminal devices which are in an idle state currently based on the test script; sending the test script to the one or more second terminal devices which are in the idle state currently; the second terminal device is a terminal device which is used for establishing communication connection with the server by sending a registration request to the server in advance. And the second terminal equipment is used for executing the test script when receiving the test script corresponding to the application program to be tested.
In an eighth aspect, an embodiment of the present specification provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the application testing method provided in the first aspect, the application testing method provided in the second aspect, or the application testing method provided in the third aspect when executing the program.
In a ninth aspect, the present specification provides a computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the application testing method provided in the first aspect, the application testing method provided in the second aspect, or the application testing method provided in the third aspect.
The embodiment of the specification has the following beneficial effects:
in the application program testing method provided in the embodiment of the present specification, when it is detected that a user triggers a first preset instruction, a first user operation performed on an application program to be tested by the user through a first terminal device is monitored, the first user operation performed by the user is all converted into a test script, so that recording of the test script is realized, the test script is sent to a server, and the server sends the test script to one or more second terminal devices currently in an idle state, so that the second terminal devices play back the test script, and the test of the application program to be tested is realized. The test script is directly recorded by the scheme, so that the user operation is simplified. In addition, the second terminal device registers the device information to the server to realize communication connection with the server, and compared with a mode of connection through a data line, the device management is more flexible, and the utilization rate of resources is improved.
Drawings
FIG. 1 is a schematic diagram of an operating environment suitable for use with embodiments of the present disclosure;
FIG. 2 is a flowchart of a first testing process of an application testing method provided in the first aspect of the embodiments of the present specification;
FIG. 3 is a flowchart of a second testing process of the application testing method provided in the first aspect of the embodiments of the present specification;
fig. 4 is a timing diagram of a Socket communication process provided in the first aspect of the embodiment of the present specification;
FIG. 5 is a flowchart of a testing process of an application testing method provided in the second aspect of the embodiments of the present specification;
FIG. 6 is a flowchart illustrating another testing process of the application testing method according to the second aspect of the embodiment of the present disclosure;
FIG. 7 is a flowchart of an application testing method provided in the third aspect of the embodiments of the present description;
fig. 8 is a schematic structural diagram of an application testing apparatus provided in the fourth aspect of the present specification;
FIG. 9 is a schematic structural diagram of an application testing apparatus provided in a fifth aspect of the embodiments of the present disclosure;
fig. 10 is a schematic structural diagram of an application test apparatus provided in a sixth aspect of the present specification;
fig. 11 is a schematic structural diagram of a cloud test system provided in a seventh aspect of the embodiment of the present specification;
fig. 12 is a schematic structural diagram of an electronic device provided in an eighth aspect of the embodiments of the present description.
Detailed Description
In order to better understand the technical solutions, the technical solutions of the embodiments of the present specification are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features of the embodiments and embodiments of the present specification are detailed descriptions of the technical solutions of the embodiments of the present specification, and are not limitations of the technical solutions of the present specification, and the technical features of the embodiments and embodiments of the present specification may be combined with each other without conflict.
Please refer to fig. 1, which is a schematic diagram of an operating environment suitable for the embodiment of the present disclosure. As shown in fig. 1, one or more terminal devices 100 (only four shown in fig. 1) may be connected via a network 200 to one or more servers 300 (only one shown in fig. 1) for data communication or interaction. The terminal device 100 may be a Personal Computer (PC), a notebook Computer, a tablet Computer, a smart phone, an electronic reader, a vehicle-mounted device, a network television, a wearable device, and other smart devices having a network function.
In the embodiment of the present specification, the first terminal device that records and submits the test script corresponding to the application program to be tested, and the second terminal device that runs the test script to test the application program to be tested may be any type of terminal device, and may be installed with a web browser or an application client. In the embodiment of the invention, the first terminal equipment, the second terminal equipment and the server can be directly connected through the communication network. The first terminal device, the second terminal device and the server can establish wireless remote communication connection in a Wi-Fi (wireless fidelity) network, a 2G/3G/4G/5G network or a local area network.
In the embodiments of the present specification, the first terminal device and the second terminal device may preferably be mobile terminals, such as smart phones.
In the application program testing method, the application program testing device, the electronic device, and the readable storage medium provided in the embodiments of the present specification, when detecting that a user triggers a first preset instruction, a first terminal device monitors a first user operation performed by the user on an application program to be tested through the first terminal device, generates a test script based on the first user operation, and sends the test script to a server; and the server sends the test script to one or more second terminal devices in an idle state at present, so that the second terminal devices play back the test script to realize the test of the application program to be tested. The second terminal device is a terminal device which establishes communication connection with the server by registering device information in the server in advance. Therefore, the user can record the test script conveniently, the user operation is simplified, and compared with a mode that the server is connected with the test equipment through a data line, the equipment management is more flexible, and the utilization rate of resources is improved. The present invention will be described in detail with reference to specific examples.
In a first aspect, an embodiment of the present disclosure provides an application testing method, which is an application testing method executed by a first terminal device. The application program testing method provided by the embodiment of the specification comprises a first testing process. Referring to fig. 2, the first testing process may include at least steps S201 to S204.
Step S201, detecting whether the user triggers a first preset instruction.
The first test process is a process that a user records a test script corresponding to the application program to be tested, the test script is uploaded to the server, the server issues the test script to the second terminal equipment in an idle state at present, and the second terminal equipment plays back the test script, so that the application program to be tested is tested.
In an embodiment of the present specification, the first preset instruction is used to start a first test process. For example, the user may trigger the first preset instruction by triggering a button for starting a script recording function.
Step S202, when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on the application program to be tested, and generating a test script based on the first user operation.
And when detecting that the user triggers a first preset instruction, starting a first test process and starting a script recording function. The user can open the application program to be tested through the first terminal device, and corresponding first user operation is executed aiming at the service module to be tested. Monitoring a first user operation executed on the first terminal device, generating a test script based on the first user operation, and storing the test script to the local. The service module to be tested may be selected according to actual needs, for example, may be a login module of an application program to be tested.
For example, when the first terminal device is a smart phone, taking the smart phone with an android system as an example, the first terminal device may monitor the operation of the first user by using an auxiliary function (accessitivyservice), where the accessitivyservice is a service that runs in a background of the smart phone and can monitor an event sent by the system.
Specifically, the process of generating the test script based on the first user operation may adopt an algorithm of converting the operation into json, and specifically may be: and sequentially recording characters, coordinates, sizes, structural information, operation types (such as clicking, sliding, inputting and the like) and parameters of the control triggered by the first user operation to construct json data, and using the constructed json data as a test script. The structural information refers to an Xpath tree structure of the node and the character, coordinate and size information of the child node which are constructed based on the page structure. Correspondingly, the test script can be played back by adopting an algorithm for playing back according to json, specifically, matching can be performed on the current page structure based on the characters, coordinates, sizes and structural information transmitted by json, a control with the highest matching degree is searched, and then related operations are executed based on the operation types and parameters transmitted by json, so that the test script can be played back.
Of course, in other embodiments of the present disclosure, the generation of the test script based on the first user operation may be implemented in other ways, which is not limited herein.
It should be noted that, before starting the script recording function, the user may download and install the application program to be tested in the first terminal device in advance; or, the user may also store the application program to be tested in a designated location such as a server or other cloud storage platform in advance, download and install the application program to be tested through a storage path of the application program to be tested after starting the script recording function, open the application program to be tested, and execute corresponding first user operation for the functional module to be tested, so that the downloading and installing processes of the application program to be tested can be recorded as the script.
As an optional implementation manner, in addition to recording the test script, feature information corresponding to the recorded test script needs to be acquired, and after the script is recorded, the recorded test script and the feature information corresponding to the test script are uploaded to the server together, so that the server manages the received test script. Specifically, the feature information may include, but is not limited to, a name of an application under test corresponding to the test script, a name of the service module, and a name of the test script. The feature information corresponding to the recorded test script may be input by the user before the recording starts or after the recording is completed.
Step S203, sending the test script to a server, so that the server sends the test script to one or more second terminal devices currently in an idle state for execution, where the second terminal devices are terminal devices that establish a communication connection with the server by registering device information in the server in advance.
In this embodiment, the server may store the received test script and manage the test script. Specifically, the test script may be managed according to feature information corresponding to the test script, and the test task may be created based on the received test script. The test task may include test requirement information and one or more test scripts. The test requirement information may include test items and test time. The model and the number of the target test device can be specifically determined according to the test items. For example, the test items may include compatibility tests or regression tests, and the like. The test time is a time for controlling the target test apparatus to execute the test script.
And after the test task is determined, acquiring the second terminal equipment in the idle state at present, and selecting one or more second terminal equipment from the second terminal equipment in the idle state at present based on the test requirement information. In a specific application scenario, a user can check test scripts related to the user through registering or logging in a front-end cloud test platform of a server, and create a test task on the cloud test platform based on the test scripts, so that one or more second terminal devices are selected from second terminal devices which are displayed by the cloud test platform and are currently in an idle state.
Of course, in other application scenarios in the embodiments of the present specification, the feature information may further include the test requirement information, and the server may create a test task based on the received test script and the feature information corresponding to the test script, and further select one or more second terminal devices from the second terminal devices currently in the idle state according to the test items included in the corresponding test requirement information and the preset matching rule corresponding to the test items. The preset matching rule may be set according to actual needs, for example, a brand of a mobile phone, an operating system version, a resolution and the like that the selected second terminal device needs to cover may be set in advance for a compatibility test of the mobile phone application software.
Further, the test script included in the test task is sent to the determined one or more second terminal devices currently in the idle state. And the second terminal equipment plays back the received test script to realize the test of the application program to be tested and sends the running result and the log related data to the server.
It will be appreciated that before the test script is sent to the server via the first terminal device, a communication connection between the first terminal device and the server needs to be established. Therefore, the application program testing method provided by the embodiment of the specification further comprises a communication connection step. Specifically, the communication connection step may include: a first terminal device initiates a registration request to the server, wherein the registration request comprises device information of the first terminal device, so that the server stores the device information of the first terminal device in a preset device information base; after receiving the registration request, the server stores the equipment information of the first terminal equipment in a preset equipment information base after passing the verification and feeds back registration success confirmation information to the first terminal equipment; and when the first terminal equipment receives the successful registration confirmation information, establishing communication connection between the first terminal equipment and the server, and displaying the successful registration confirmation information to the user.
In this embodiment, the device information may include an IP address. Optionally, the device information may further include, but is not limited to, model configuration information, for example, the model configuration information may include a brand, a resolution, a memory, and a version of an operating system. Specifically, the embodiment of verifying the registration request may be set according to actual needs, for example, whether the device information in the registration request satisfies a preset registration condition may be verified.
Similarly, the process that the second terminal device establishes the communication connection with the server by registering the device information in the server in advance may specifically include: the second terminal equipment sends a registration request to the server, wherein the registration request comprises equipment information of the second terminal equipment; the server verifies the registration request, acquires the equipment information in the registration request after the verification is passed, adds the equipment information into an equipment information base, and successfully registers the equipment information to the second terminal equipment to confirm the information; and the second terminal equipment establishes communication connection with the server when receiving the registration success confirmation information and displays the registration success confirmation information to the user. Therefore, a user corresponding to the second terminal equipment can establish communication connection with the server only by registering the equipment information of the second terminal equipment to the server through the wireless network when the second terminal equipment is idle, so that the second terminal equipment can be used for testing the application program to be tested and can be used for other purposes in non-cloud testing time, and the equipment availability is greatly improved.
Optionally, in this embodiment of the present specification, the registration request may include, but is not limited to, a user name and a password in addition to the device information, so that a subsequent login operation may be performed through the user name and the password to establish a communication connection with the server.
It is understood that after the communication connection is established between the second terminal device and the server, the server can manage the second terminal device with which the connection is established. At this time, the server may monitor the current state of the second terminal device, and update the preset state information table according to the monitored current state of the second terminal device. And the state information table stores state information corresponding to the second terminal equipment registered to the server. The current state of the second terminal equipment is an idle state or a busy state, and only the second terminal equipment in the idle state can be used for executing the test task.
For example, when the second terminal device is a smart phone, taking the smart phone with an android system as an example, it may be monitored by using the accessitivyserve whether the second user performs a user operation on the second terminal device, such as clicking an operation interface, if so, it indicates that the second terminal device is in a busy state, and if not, it indicates that the second terminal device is in an idle state.
Optionally, the application program testing method provided in the embodiment of the present specification may further include a second testing process in addition to the first testing process, so as to achieve an effect of one-machine multi-control, and a user can conveniently implement testing on the application program to be tested by performing real-time control on the second terminal device. The user can select whether to adopt the first test process or the second test process according to requirements. Specifically, in the second testing process, after the communication connection is established between the first terminal device and the target testing device, the first terminal device controls the target testing device to execute a corresponding second user operation, so as to test the application program to be tested. As shown in fig. 3, the second test procedure may include at least steps S301 to S302:
step S301, detecting whether the user triggers a second preset instruction, and when the user triggers the second preset instruction, establishing a communication connection with a target test device, wherein the target test device comprises one or more second terminal devices which are currently in an idle state.
In an embodiment of the present specification, the second preset instruction is used to start a second test process. For example, the user may trigger the second preset instruction by triggering a button for initiating the second test procedure.
And when the user triggers a second preset instruction, the first terminal equipment enters a second test process. Specifically, the specific implementation process of establishing the communication connection with the target test device may include: acquiring equipment information of target test equipment; and sending a communication connection request to the target test equipment based on the equipment information of the target test equipment so as to establish communication connection with the target test equipment.
As an optional implementation manner, the specific process of acquiring the device information of the target test device may include: sending an equipment information acquisition request to a server; and receiving the device information of the target test device fed back by the server based on the device information acquisition request.
In the implementation process, there are various ways of sending the device information acquisition request to the server, and two of them are listed below for description, but of course, in the implementation process, the two cases are not limited to the following two cases, and in addition, in the case of no conflict, the two cases may be used in combination.
First, an available device list issued by the server may be obtained and displayed, where the available device list includes identification information of a plurality of second terminal devices currently in an idle state. At this time, the user may select one or more second terminal devices from the available device list according to the test requirements. Then, the target test device is determined from the available device list based on a trigger operation of the user on one or more second terminal devices in the available device list. Then, generating an equipment information acquisition request based on the identification information of the target test equipment; and sending the equipment information acquisition request to the server so that the server can search the equipment information of the target test equipment in the equipment information base based on the identification information of the target test equipment and feed back the equipment information of the target test equipment to the first terminal equipment.
In the embodiment of the present specification, the identification information is used to uniquely identify the terminal device that registers the device information in the server, and is specifically set according to actual needs, where the identification information of different terminal devices is different. For example, the identification information may be a name defined by the server for the terminal device based on model configuration information, such as a brand, an operating system, a memory, and a resolution, of the terminal device registered to the server.
Second, the server may group in advance second terminal devices that are registered with the server and currently in an idle state, and generate a group list. Each packet in the packet list includes identification information of one or more second terminal devices currently in an idle state. The specific grouping mode may be set according to actual needs, for example, the grouping may be performed randomly, or the grouping may be performed according to the current test requirements. When the user triggers the second preset instruction, the first terminal device may acquire and display the grouping list from the server, and at this time, the user may select one grouping from the grouping list as a target grouping as needed. Based on a target group selected by the user from the group list, a device information acquisition request is generated and sent to the server. At this time, the second terminal device included in the target packet is the target test device. And the server feeds back the device information of the second terminal device included in the target group to the first terminal device.
Of course, in other embodiments of this specification, the device information of the target test device may also be obtained in other manners, for example, a user may directly add one or more pieces of device information in the first terminal device, and use the second terminal device corresponding to the device information as the target test device.
For example, when the device information of the target test device is acquired, the first terminal device may establish a communication connection with the target test device through a Socket communication protocol. Of course, in other embodiments of the present disclosure, the first terminal device may also use other communication protocols to establish a communication connection with the target testing device.
It is understood that, when the target test device includes a plurality of second terminal devices, the first terminal device needs to send a communication connection request to each of the second terminal devices in the target test device, so as to establish a communication connection with each of the second terminal devices in the target test device.
Step S302, monitoring a second user operation executed by the user on the application program to be tested, and controlling the target test equipment to execute the same operation as the second user operation on the application program to be tested when the second user operation is monitored so as to test the application program to be tested in real time.
For example, when the first terminal device is a smart phone, taking the smart phone with an android system as an example, the accessitivetyserve may be used to monitor a second user operation performed by the user on the application program to be tested through the first terminal device.
And when the target testing equipment finishes the operation, the user executes the next operation on the application program to be tested. For example, when it is monitored that a user downloads an application program to be tested from a specified storage position and installs the downloaded application program to be tested in the first terminal device, the target test device is controlled to download the application program to be tested from the specified storage position and install the downloaded application program to be tested in the target test device; and when the fact that the user triggers the login button of the application program to be tested is monitored, controlling the target test equipment to execute the operation of triggering the login button of the application program to be tested. For example, high-permission operation in a non-Root environment may be implemented by using ADB (Android Debug Bridge), and the target test device is controlled to perform the same operation as the first terminal device.
Specifically, the above process of controlling the target test apparatus to perform the same operation as the second user operation on the application program under test may include: for each second user operation that is heard, performing the steps of: converting the second user operation into a real-time instruction, and sending the real-time instruction to the target testing equipment so that the target testing equipment executes the real-time instruction; and receiving the execution result of the real-time instruction fed back by the target test equipment. The execution result may be complete or incomplete, and for each second terminal device in the target test device, when the real-time instruction is completed, the execution result of the real-time instruction is complete, and when the real-time instruction is not completed, the execution result of the real-time instruction is incomplete.
As an optional implementation, the second testing process may further include: step S303, when detecting a third preset instruction triggered by the user, sending an end instruction to the target testing device to end the test.
The above step S303 is executed after the above step S302, i.e., when the second test procedure needs to be ended. After the test is finished, the target testing device may be controlled to execute an initialization operation, that is, the target testing device may be restored to a state before the test task is executed, for example, the initialization operation may include uninstalling an application installed during the test task and/or deleting related log data generated during the test task.
In a specific application scenario, when a user executes a second test process through a first terminal device, the first terminal device and each second terminal device in a target test device may establish Socket communication connection. As shown in fig. 4, the Socket communication process may specifically include: the first terminal equipment sends a FIND request to the second terminal equipment to apply for establishing connection; the second terminal device returns CONNECT to the host to indicate that connection establishment is confirmed; the first terminal equipment sends ASSIGN setting slave role to the second terminal equipment; the first terminal equipment sends an READIME _ COMMAND message to the second terminal equipment to inform the second terminal equipment to carry out real-time operation, and the second terminal equipment sends the READIME _ RESULT message to the first terminal equipment and returns an execution RESULT; after receiving the READIME _ RESULT message, the first terminal device continues to send the next READIME _ COMMAND message to the second terminal device, and so on until the first terminal device sends the READIME _ FINISH message to the second terminal device, and notifies the second terminal device of finishing the real-time operation.
The application program testing method provided by the embodiment of the specification is greatly convenient for a user to record the testing script and beneficial to simplifying the user operation. In addition, the second terminal device registers the device information to the server to realize communication connection with the server, and compared with a mode of connection through a data line, the device management is more flexible, and the utilization rate of resources is improved.
In a second aspect, an embodiment of the present disclosure provides an application testing method, and this embodiment is an application testing method executed by a second terminal device. Referring to fig. 5, the application testing method provided in the embodiments of the present disclosure at least includes the following steps S501 to S503.
Step S501, sending a registration request to a server, where the registration request includes device information of a second terminal device, so that the server stores the device information in a preset device information base.
Step S502, when receiving the registration success confirmation information fed back by the server based on the registration request, establishing a communication connection between the second terminal device and the server.
It is understood that after the communication connection between the second terminal device and the server is established, the server needs to be able to obtain the current state of the second terminal device in real time so as to distribute the test task to the second terminal device. Therefore, the application program testing method provided by the embodiments of the present specification further includes: monitoring the current state of the second terminal equipment, wherein the current state is an idle state or a busy state; and sending the current state to the server so that the server updates a preset state information table according to the current state, wherein the state information table stores state information corresponding to second terminal equipment registered to the server. The specific implementation process may refer to the corresponding description in the first aspect, and is not described herein again.
Step S503, when receiving the test script corresponding to the application program to be tested and issued by the server, executing the test script.
Specifically, the specific implementation process of steps S501 to S503 may refer to the corresponding description in the first aspect, and is not described herein again.
It is understood that, in the step S503, the second terminal device is used to execute the first test procedure described in the first aspect. After the second terminal device executes the test script, the running result and the related log data corresponding to the test script are obtained, and the running result and the log data are sent to the server, so that the server can display the test result to a user conveniently.
In the embodiment of the specification, the server is in communication connection with the second terminal device for executing the test script through a wireless network, and a user corresponding to the second terminal device can establish communication connection with the server only by registering device information of the second terminal device to the server through the wireless network when the second terminal device is idle, so that the user is controlled by the server to test the application program to be tested, the second terminal device can be used for other purposes in non-cloud testing time, and the device availability is greatly improved.
Optionally, the second terminal device registered to the server may be further configured to perform the second testing procedure described in the first aspect. As shown in fig. 6, the application program testing method provided in the embodiment of the present specification may further include the following steps S601 to S602.
Step S601, when a communication connection request sent by a first terminal device is received, establishing communication connection with the first terminal device based on the communication connection request;
step S602, controlling the second terminal device to execute the same operation as the second user operation monitored by the first terminal device on the application program to be tested, so as to test the application program to be tested in real time.
Specifically, the process of controlling the second terminal device to perform the same operation on the application program to be tested as the second user operation monitored by the first terminal device may include: when a real-time instruction sent by the first terminal equipment is received, controlling the second terminal equipment to execute the real-time instruction and obtaining an execution result of the real-time instruction; and returning the execution result to the first terminal equipment. The specific implementation process may refer to the related description of the first aspect, and is not described herein again.
In order to facilitate the user to obtain the test result of the second test process, optionally, after the controlling the second terminal device to execute the same operation as the operation of the second user monitored by the first terminal device on the application program to be tested, the method further includes: and generating a test result, and sending the test result to the server, so that the server displays the test result to the user. The test result may be determined according to a specific test requirement, for example, the test result may include an interface screenshot, and the screenshot is performed and stored on the operation interface every time the second terminal device performs one operation following the first terminal device, so that the execution condition of each operation performed by the second terminal device following the first terminal device may be obtained.
As an alternative implementation, on the basis of the application program testing method shown in fig. 6, the method may further include: step S603, when receiving the end instruction sent by the first terminal device, ending the test.
Optionally, according to the needs of the actual application scenario, one second terminal device may also be set as a master controller, and the user realizes the test of the application program to be tested in a manner that the slave controller controls the slave by acquiring the device information of the slave to be controlled from the server. At this time, the application program testing method provided in the embodiments of the present specification may further include: when a fourth preset instruction triggered by a user is detected, setting second terminal equipment as a master control machine, and establishing communication connection between the master control machine and a slave machine; and monitoring a third user operation executed by the user on the application program to be tested, and controlling the slave to execute the same operation as the third user operation on the application program to be tested when the third user operation is monitored so as to test the application program to be tested in real time. The slave machine comprises one or more other second terminal devices which register the device information to the server in advance and are in idle states currently. It is understood that the other second terminal device does not include the second terminal device set as the master. Further, when a fifth preset instruction triggered by the user is detected, an ending instruction is sent to the slave machine to end the test.
Specifically, establishing a communication connection between the master controller and the slave may include: sending an equipment information acquisition request to a server so that the server issues equipment information of the slave machine based on the equipment information acquisition request; and receiving the equipment information of the slave machine sent by the server, and sending a communication connection request to the slave machine based on the equipment information of the slave machine so as to establish communication connection with the slave machine.
It should be noted that, the specific implementation process of the second terminal device as the master controller and the implementation process of the user controlling the slave device through the master controller to implement the test on the application program to be tested is similar to the implementation process of the user controlling the target test device through the first terminal device, and reference may be specifically made to the corresponding description in the first aspect, and details are not repeated here.
In the embodiment of the present description, no matter in a manner that a user controls a target test device through a first terminal device, or in a manner that a user sets a second terminal device as a master controller, a test on an application program to be tested is realized in a manner that the master controller controls a slave, a test master controller may not be a designated server any more, and a disaster tolerance capability of device management is improved.
In a third aspect, an embodiment of the present specification provides an application program testing method, and this embodiment is an application program testing method executed by a server. Referring to fig. 7, the application testing method provided in the embodiments of the present disclosure at least includes the following steps S701 to S702.
Step S701, when a test script sent by a first terminal device is received, one or more second terminal devices in an idle state at present are determined based on the test script, wherein the second terminal devices are terminal devices which are in communication connection with a server in advance by sending a registration request to the server;
step S702, sending the test script to the one or more second terminal devices currently in the idle state, so that the second terminal devices execute the test script.
Specifically, the process in which the second terminal device establishes a communication connection with the server by registering device information in the server in advance may specifically include: receiving a registration request sent by second terminal equipment, wherein the registration request comprises equipment information of the second terminal equipment; and verifying the registration request, storing the equipment information in a preset equipment information library when the verification is passed, and feeding back registration success confirmation information to the second terminal equipment so as to establish communication connection between the second terminal equipment and the server.
It is understood that after the communication connection is established between the second terminal device and the server, the server can manage the second terminal device with which the connection is established. At this time, the server may receive the current state fed back by the second terminal device, where the current state is an idle state or a busy state, and update the preset state information table according to the current state of the second terminal device. And the state information table stores state information corresponding to the second terminal equipment registered to the server. It should be noted that only the second terminal device in the idle state can be used to perform the test task. At this time, the server may determine one or more second terminal devices currently in an idle state according to the state information table.
As an alternative embodiment, the server may generate the list of available devices based on the state information table. The available device list comprises a plurality of second terminal devices currently in an idle state. It should be noted that the available device list may be generated in real time when the request sent by the first terminal device is received, and has instantaneity.
Similarly, before the first terminal device sends the test script to the server, the communication connection between the first terminal device and the server needs to be established. Therefore, the application program testing method provided by the embodiments of the present specification further includes: receiving a registration request sent by first terminal equipment, wherein the registration request comprises equipment information of the first terminal equipment; and verifying the registration request, storing the equipment information in a preset equipment information library when the verification is passed, and feeding back registration success confirmation information to the first terminal equipment so as to establish communication connection between the first terminal equipment and the server.
In this embodiment, the device information may include an IP address. Optionally, the device information may further include, but is not limited to, model configuration information, for example, the model configuration information may include a brand, a resolution, a memory, and a version of an operating system.
Optionally, the user may execute the second test procedure according to the first aspect through the first terminal device. When the user executes the second test procedure through the first terminal device, the application program test method provided in the embodiment of the present specification further includes: and when receiving an equipment information acquisition request sent by the first terminal equipment, feeding back equipment information of the target test equipment to the first terminal equipment based on the equipment information acquisition request. The specific implementation process may refer to the corresponding description in the first aspect, and is not described herein again.
Optionally, the user may set a second terminal device as the master controller according to the actual application scenario requirement. At this time, the second terminal device serving as the master requests the server for device information of the slave. In this case, the application program testing method provided in the embodiment of the present specification further includes: and when receiving a device information acquisition request sent by the second terminal device, feeding back device information of the slave to the second terminal device based on the device information acquisition request. The slave machine comprises one or more other second terminal devices which register the device information to the server in advance and are in idle states currently.
The application program testing method provided by the embodiment of the specification is greatly convenient for a user to record the testing script and beneficial to simplifying the user operation. In addition, the second terminal device registers the device information to the server to realize communication connection with the server, and compared with a mode of connection through a data line, the device management is more flexible, and the utilization rate of resources is improved.
In a fourth aspect, based on the same inventive concept as the application program testing method provided in the first aspect, an embodiment of the present specification further provides an application program testing apparatus, where the apparatus provided in this embodiment is operable in a first terminal device. Referring to fig. 8, the application testing apparatus 81 may include:
the first detection module 811 is configured to detect whether a user triggers a first preset instruction;
a script generating module 812, configured to, when it is detected that the user triggers a first preset instruction, monitor a first user operation performed on an application program to be tested by the user through the first terminal device, and generate a test script based on the first user operation;
a first script sending module 813, configured to send the test script to a server, so that the server sends the test script to one or more second terminal devices currently in an idle state for execution, where the second terminal devices are terminal devices that establish a communication connection with the server in advance by registering device information in the server.
As an optional implementation, the application testing apparatus 81 further includes:
a first registration module, configured to initiate a registration request to the server, where the registration request includes device information of the first terminal device, so that the server stores the device information in a preset device information base; and when receiving registration success confirmation information fed back by the server based on the registration request, establishing communication connection between the first terminal equipment and the server.
As an optional implementation, the application testing apparatus 81 further includes:
a second detecting module 814, configured to detect whether the user triggers a second preset instruction, and when the user triggers the second preset instruction, establish a communication connection with a target test device, where the target test device includes one or more second terminal devices currently in an idle state;
the first control module 815 is configured to monitor a second user operation performed by the user on the application program to be tested, and when the second user operation is monitored, control the target test device to perform the same operation as the second user operation on the application program to be tested, so as to test the application program to be tested in real time.
As an alternative embodiment, the second detection module 814 includes: an obtaining submodule 8141, configured to obtain device information of the target test device; the connection sub-module 8142 is configured to send a communication connection request to the target test device based on the device information of the target test device, so as to establish a communication connection with the target test device.
As an optional implementation, the obtaining sub-module 8141 is configured to: sending an equipment information acquisition request to the server; and receiving the equipment information of the target test equipment fed back by the server based on the equipment information acquisition request.
As an optional implementation, the obtaining sub-module 8141 is configured to: acquiring and displaying an available equipment list issued by the server, wherein the available equipment list comprises identification information of a plurality of second terminal equipments in an idle state; determining the target test equipment from the available equipment list based on the triggering operation of the user on one or more second terminal equipment in the available equipment list; and generating a device information acquisition request based on the identification information of the target test device and sending the device information acquisition request to the server.
As an optional implementation, the application testing apparatus 81 further includes: and the first end module is used for sending an end instruction to the target test equipment to end the test when detecting a third preset instruction triggered by the user.
As an optional implementation manner, the first control module 815 is specifically configured to: for each second user operation that is heard, performing the steps of: converting the second user operation into a real-time instruction, and sending the real-time instruction to the target testing equipment so that the target testing equipment executes the real-time instruction; and receiving the execution result of the real-time instruction fed back by the target test equipment.
It should be noted that, the application program testing apparatus 81 provided in the embodiment of the present specification, specific ways in which the respective units perform operations have been described in detail in the method embodiment provided in the first aspect, and will not be described in detail here.
In a fifth aspect, based on the same inventive concept as the application program testing method provided in the second aspect, an embodiment of the present specification further provides an application program testing apparatus, where the apparatus provided in this embodiment is operable in a second terminal device. Referring to fig. 9, the application testing device 82 may include:
a second registration module 821, configured to send a registration request to a server, where the registration request includes device information of a second terminal device, so that the server stores the device information in a preset device information base;
a first connection module 822, configured to establish a communication connection between the second terminal device and the server when receiving registration success confirmation information fed back by the server based on the registration request;
the execution module 823 is configured to execute the test script when receiving the test script corresponding to the application to be tested and sent by the server.
As an optional implementation, the application testing device 82 further includes:
a second connection module 824, configured to, when receiving a communication connection request sent by a first terminal device, establish a communication connection with the first terminal device based on the communication connection request;
the second control module 825 is configured to control the second terminal device to execute the same operation as the second user operation monitored by the first terminal device on the application program to be tested, so as to test the application program to be tested in real time.
As an optional implementation, the application testing device 82 further includes: and the second ending module is used for ending the test when receiving an ending instruction sent by the first terminal equipment.
As an optional implementation manner, the second control module 825 is specifically configured to: when a real-time instruction sent by the first terminal equipment is received, controlling the second terminal equipment to execute the real-time instruction and obtaining an execution result of the real-time instruction; and returning the execution result to the first terminal equipment.
As an optional implementation, the application testing device 82 further includes: and the test result generating module is used for generating a test result and sending the test result to the server so that the server can display the test result to the user.
As an optional implementation, the application testing device 82 further includes:
the state monitoring module is used for monitoring the current state of the second terminal equipment, and the current state is an idle state or a busy state;
and the state sending module is used for sending the current state to the server so that the server updates a preset state information table according to the current state, and the state information table stores state information corresponding to second terminal equipment registered to the server.
As an optional implementation, the application testing device 82 further includes:
the setting module is used for setting the second terminal equipment as a master control machine and establishing communication connection between the master control machine and a slave machine when a fourth preset instruction triggered by a user is detected, wherein the slave machine comprises one or more other second terminal equipment which registers equipment information to the server in advance and is in an idle state currently;
and the third control module is used for monitoring a third user operation executed by the user on the application program to be tested, and controlling the slave to execute the same operation as the third user operation on the application program to be tested when the third user operation is monitored so as to test the application program to be tested in real time.
As an optional implementation, the setting module is configured to: sending an equipment information acquisition request to the server so that the server issues equipment information of a slave machine based on the equipment information acquisition request; and receiving the equipment information of the slave machine sent by the server, and sending a communication connection request to the slave machine based on the equipment information of the slave machine so as to establish communication connection with the slave machine.
As an optional implementation, the application testing device 82 further includes: and the third ending module is used for sending an ending instruction to the slave machine to end the test when a fifth preset instruction triggered by the user is detected.
It should be noted that, the application test apparatus 82 provided in the embodiment of the present specification, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method provided in the second aspect, and will not be elaborated herein.
In a sixth aspect, based on the same inventive concept as the application program testing method provided in the third aspect, an embodiment of the present specification further provides an application program testing apparatus, where the apparatus provided in this embodiment is operable on a server. Referring to fig. 10, the application testing device 83 may include:
a script receiving module 831, configured to, when receiving a test script sent by a first terminal device, determine, based on the test script, one or more second terminal devices currently in an idle state, where the second terminal devices are terminal devices that have previously established a communication connection with the server by sending a registration request to the server;
a second script sending module 832, configured to send the test script to the one or more second terminal devices currently in an idle state, so that the second terminal devices execute the test script.
As an optional implementation, the application testing device 83 further includes:
a registration request receiving module 833, configured to receive a registration request sent by a second terminal device, where the registration request includes device information of the second terminal device;
a third registration module 834, configured to verify the registration request, store the device information in a preset device information library when the verification passes, and feed back registration success confirmation information to the second terminal device, so as to establish a communication connection between the second terminal device and the server.
As an optional implementation, the application testing device 83 further includes:
the state receiving module is used for receiving the current state fed back by the second terminal equipment, and the current state is an idle state or a busy state;
and the state updating module is used for updating a preset state information table according to the current state, and the state information table stores state information corresponding to second terminal equipment registered to the server.
As an optional implementation, the application testing device 83 further includes: and the list generating module is used for generating an available equipment list based on the state information table, wherein the available equipment list comprises a plurality of second terminal equipment which are currently in an idle state.
It should be noted that, the application program testing apparatus 83 provided in the embodiment of the present specification, specific ways in which the respective units perform operations have been described in detail in the method embodiment provided in the third aspect, and will not be described in detail here.
In a seventh aspect, based on the same inventive concept, as shown in fig. 11, an embodiment of this specification further provides a cloud test system 90, including: a server 91, a first terminal device 92 and one or more second terminal devices 93.
The first terminal device 92 is configured to detect whether a user triggers a first preset instruction; when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on an application program to be tested through the first terminal equipment, and generating a test script based on the first user operation; sending the test script to a server 91;
the server 91 is used for determining one or more second terminal devices 93 which are currently in an idle state based on the test script; sending the test script to the one or more second terminal devices 93 currently in an idle state; the second terminal device 93 is a terminal device that establishes a communication connection with the server 91 by sending a registration request to the server 91 in advance;
and the second terminal device 93 is configured to execute the test script when receiving the test script corresponding to the application program to be tested.
It should be noted that, in the cloud testing system 90 provided in this embodiment of the present disclosure, the first terminal device 92 is configured to execute the application testing method provided by the first aspect, the second terminal device 93 is configured to execute the application testing method provided by the second aspect, and the server 91 is configured to execute the application testing method provided by the third aspect, and specific implementation and generated technical effects are the same as those in the foregoing method embodiment, and for brief description, corresponding contents in the foregoing method embodiment may be referred to where this embodiment is not mentioned.
In an eighth aspect, based on the same inventive concept, the present invention further provides an electronic device, as shown in fig. 12, comprising a memory 904, one or more processors 902, and a computer program stored on the memory 904 and executable on the processors 902. The steps of the application testing method provided in the first aspect above or the application testing method provided in the second aspect above or the application testing method provided in the third aspect above are implemented when the computer program is executed by the processor 902.
Where in fig. 12 a bus architecture (represented by bus 900), bus 900 may include any number of interconnected buses and bridges, and bus 900 links together various circuits including one or more processors, represented by processor 902, and memory, represented by memory 904. The bus 900 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 905 provides an interface between the bus 900 and the receiver 901 and transmitter 903. The receiver 901 and the transmitter 903 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 902 is responsible for managing the bus 900 and general processing, and the memory 904 may be used for storing data used by the processor 902 in performing operations.
It will be appreciated that the configuration shown in fig. 12 is merely illustrative and that the electronic device described above may also include more or fewer components than shown in fig. 12 or have a different configuration than shown in fig. 12. The components shown in fig. 12 may be implemented in hardware, software, or a combination thereof.
In a ninth aspect, based on the same inventive concept as the application program testing method in the embodiment provided in the foregoing first aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, realizes the steps of the application program testing method provided in the foregoing first aspect.
Tenth aspect, based on the same inventive concept as the application program testing method in the embodiment provided in the foregoing second aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, realizes the steps of the application program testing method provided in the foregoing second aspect.
In an eleventh aspect, based on the same inventive concept as the application program testing method in the embodiment provided in the foregoing third aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the application program testing method provided in the foregoing third aspect.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, 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, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present specification have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all changes and modifications that fall within the scope of the specification.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present specification without departing from the spirit and scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims of the present specification and their equivalents, the specification is intended to include such modifications and variations.

Claims (45)

1. An application program testing method is applied to first terminal equipment and comprises the following steps:
detecting whether a user triggers a first preset instruction or not;
when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on an application program to be tested through the first terminal equipment, and generating a test script based on the first user operation;
and sending the test script to a server so that the server sends the test script to one or more second terminal devices in an idle state for execution, wherein the second terminal devices are terminal devices which establish communication connection with the server by registering device information in the server in advance.
2. The method of claim 1, before detecting whether the user triggers the first preset instruction, further comprising:
initiating a registration request to the server, wherein the registration request comprises the equipment information of the first terminal equipment, so that the server stores the equipment information in a preset equipment information base;
and when receiving registration success confirmation information fed back by the server based on the registration request, establishing communication connection between the first terminal equipment and the server.
3. The method of claim 1, further comprising:
detecting whether the user triggers a second preset instruction, and when the user triggers the second preset instruction, establishing communication connection with target test equipment, wherein the target test equipment comprises one or more second terminal equipment which is currently in an idle state;
monitoring a second user operation executed by the user on the application program to be tested, and controlling the target test equipment to execute the same operation as the second user operation on the application program to be tested when the second user operation is monitored so as to test the application program to be tested in real time.
4. The method of claim 3, the establishing a communication connection with a target test device, comprising:
acquiring equipment information of the target test equipment;
and sending a communication connection request to the target test equipment based on the equipment information of the target test equipment so as to establish communication connection with the target test equipment.
5. The method of claim 4, wherein the obtaining device information of the target test device comprises:
sending an equipment information acquisition request to the server;
and receiving the equipment information of the target test equipment fed back by the server based on the equipment information acquisition request.
6. The method of claim 5, the sending a device information acquisition request to the server, comprising:
acquiring and displaying an available equipment list issued by the server, wherein the available equipment list comprises identification information of a plurality of second terminal equipments in an idle state;
determining the target test equipment from the available equipment list based on the triggering operation of the user on one or more second terminal equipment in the available equipment list;
and generating a device information acquisition request based on the identification information of the target test device and sending the device information acquisition request to the server.
7. The method of claim 3, after the controlling the target test device to perform the same operation on the application under test as the second user operation, further comprising:
and when a third preset instruction triggered by the user is detected, sending an ending instruction to the target test equipment to end the test.
8. The method of claim 3, the controlling the target test device to perform the same operations on the application under test as the second user operation, comprising:
for each second user operation that is heard, performing the steps of:
converting the second user operation into a real-time instruction, and sending the real-time instruction to the target testing equipment so that the target testing equipment executes the real-time instruction;
and receiving the execution result of the real-time instruction fed back by the target test equipment.
9. An application program testing method is applied to second terminal equipment and comprises the following steps:
sending a registration request to a server, wherein the registration request comprises equipment information of second terminal equipment, so that the server stores the equipment information in a preset equipment information base;
when registration success confirmation information fed back by the server based on the registration request is received, establishing communication connection between the second terminal device and the server;
when a test script corresponding to an application program to be tested and issued by the server is received, executing the test script, wherein the test script comprises the following steps: and the second terminal equipment plays back the received test script to test the application program to be tested, wherein the test script is generated based on a first user operation executed on the application program to be tested by a user through the first terminal equipment.
10. The method of claim 9, further comprising:
when a communication connection request sent by a first terminal device is received, establishing communication connection with the first terminal device based on the communication connection request;
and controlling the second terminal equipment to execute the same operation as the second user operation monitored by the first terminal equipment on the application program to be tested so as to test the application program to be tested in real time.
11. The method according to claim 10, further comprising, after the controlling the second terminal device to perform the same operation on the application under test as the second user operation monitored by the first terminal device, the step of:
and when receiving an ending instruction sent by the first terminal equipment, ending the test.
12. The method according to claim 10, wherein the controlling the second terminal device to perform the same operation on the application under test as a second user operation monitored by the first terminal device comprises:
when a real-time instruction sent by the first terminal equipment is received, controlling the second terminal equipment to execute the real-time instruction and obtaining an execution result of the real-time instruction;
and returning the execution result to the first terminal equipment.
13. The method according to claim 10, further comprising, after the controlling the second terminal device to perform the same operation on the application under test as the second user operation monitored by the first terminal device, the step of:
and generating a test result, and sending the test result to the server, so that the server displays the test result to the user.
14. The method of claim 9, after establishing the communication connection between the second terminal device and the server, further comprising:
monitoring the current state of the second terminal equipment, wherein the current state is an idle state or a busy state;
and sending the current state to the server so that the server updates a preset state information table according to the current state, wherein the state information table stores state information corresponding to second terminal equipment registered to the server.
15. The method of claim 9, further comprising:
when a fourth preset instruction triggered by a user is detected, setting the second terminal equipment as a master control machine, and establishing communication connection between the master control machine and a slave machine, wherein the slave machine comprises one or more other second terminal equipment which registers equipment information to the server in advance and is in an idle state currently;
and monitoring a third user operation executed by the user on the application program to be tested, and controlling the slave to execute the same operation as the third user operation on the application program to be tested when the third user operation is monitored so as to test the application program to be tested in real time.
16. The method of claim 15, wherein the establishing a communication connection between the master controller and a slave computer comprises:
sending an equipment information acquisition request to the server so that the server issues equipment information of a slave machine based on the equipment information acquisition request;
and receiving the equipment information of the slave machine sent by the server, and sending a communication connection request to the slave machine based on the equipment information of the slave machine so as to establish communication connection with the slave machine.
17. The method of claim 15, after the controlling the slave to perform the same operation on the application under test as the third user operation, further comprising:
and when a fifth preset instruction triggered by the user is detected, sending an ending instruction to the slave machine to end the test.
18. An application program testing method is applied to a server and comprises the following steps:
when a test script sent by first terminal equipment is received, determining one or more second terminal equipment currently in an idle state based on the test script, wherein the second terminal equipment is terminal equipment which is used for establishing communication connection with the server by sending a registration request to the server in advance;
and sending the test script to the one or more second terminal devices which are in the idle state currently, so that the second terminal devices execute the test script.
19. The method of claim 18, wherein prior to determining one or more second terminal devices currently in an idle state, further comprising:
receiving a registration request sent by second terminal equipment, wherein the registration request comprises equipment information of the second terminal equipment;
and verifying the registration request, storing the equipment information in a preset equipment information library when the verification is passed, and feeding back registration success confirmation information to the second terminal equipment so as to establish communication connection between the second terminal equipment and the server.
20. The method of claim 18, further comprising:
receiving a current state fed back by a second terminal device, wherein the current state is an idle state or a busy state;
and updating a preset state information table according to the current state, wherein the state information table stores state information corresponding to second terminal equipment registered to the server.
21. The method of claim 20, further comprising:
and generating an available equipment list based on the state information table, wherein the available equipment list comprises a plurality of second terminal equipment which are in idle states currently.
22. An application program testing device applied to a first terminal device comprises:
the first detection module is used for detecting whether a user triggers a first preset instruction or not;
the script generation module is used for monitoring a first user operation executed by the user on the application program to be tested through the first terminal device when the user is detected to trigger a first preset instruction, and generating a test script based on the first user operation;
the first script sending module is configured to send the test script to a server, so that the server sends the test script to one or more second terminal devices currently in an idle state for execution, where the second terminal devices are terminal devices that establish communication connection with the server by registering device information in the server in advance.
23. The apparatus of claim 22, further comprising:
a first registration module, configured to initiate a registration request to the server, where the registration request includes device information of the first terminal device, so that the server stores the device information in a preset device information base; and when receiving registration success confirmation information fed back by the server based on the registration request, establishing communication connection between the first terminal equipment and the server.
24. The apparatus of claim 22, further comprising:
the second detection module is used for detecting whether the user triggers a second preset instruction or not, and when the user triggers the second preset instruction, the second detection module establishes communication connection with target test equipment, wherein the target test equipment comprises one or more second terminal equipment which is currently in an idle state;
the first control module is used for monitoring a second user operation executed by the user on the application program to be tested, and when the second user operation is monitored, the target test equipment is controlled to execute the same operation as the second user operation on the application program to be tested, so that the application program to be tested is tested in real time.
25. The apparatus of claim 24, the second detection module comprising:
the acquisition submodule is used for acquiring the equipment information of the target test equipment;
and the connection sub-module is used for sending a communication connection request to the target test equipment based on the equipment information of the target test equipment so as to establish communication connection with the target test equipment.
26. The apparatus of claim 25, the acquisition sub-module to:
sending an equipment information acquisition request to the server;
and receiving the equipment information of the target test equipment fed back by the server based on the equipment information acquisition request.
27. The apparatus of claim 26, the acquisition sub-module to:
acquiring and displaying an available equipment list issued by the server, wherein the available equipment list comprises identification information of a plurality of second terminal equipments in an idle state;
determining the target test equipment from the available equipment list based on the triggering operation of the user on one or more second terminal equipment in the available equipment list;
and generating a device information acquisition request based on the identification information of the target test device and sending the device information acquisition request to the server.
28. The apparatus of claim 24, further comprising:
and the first end module is used for sending an end instruction to the target test equipment to end the test when detecting a third preset instruction triggered by the user.
29. The apparatus of claim 24, the first control module to:
for each second user operation that is heard, performing the steps of:
converting the second user operation into a real-time instruction, and sending the real-time instruction to the target testing equipment so that the target testing equipment executes the real-time instruction;
and receiving the execution result of the real-time instruction fed back by the target test equipment.
30. An application program testing device applied to a second terminal device comprises:
the second registration module is used for sending a registration request to the server, wherein the registration request comprises the equipment information of the second terminal equipment, so that the server stores the equipment information in a preset equipment information base;
the first connection module is used for establishing communication connection between the second terminal device and the server when receiving registration success confirmation information fed back by the server based on the registration request;
the execution module is used for executing the test script when receiving the test script which is sent by the server and corresponds to the application program to be tested, and comprises the following steps: and the second terminal equipment plays back the received test script to test the application program to be tested, wherein the test script is generated based on a first user operation executed on the application program to be tested by a user through the first terminal equipment.
31. The apparatus of claim 30, further comprising:
the second connection module is used for establishing communication connection with the first terminal equipment based on the communication connection request when receiving the communication connection request sent by the first terminal equipment;
and the second control module is used for controlling the second terminal equipment to execute the same operation as the second user operation monitored by the first terminal equipment on the application program to be tested so as to test the application program to be tested in real time.
32. The apparatus of claim 31, further comprising:
and the second ending module is used for ending the test when receiving an ending instruction sent by the first terminal equipment.
33. The apparatus of claim 31, the second control module being specifically configured to:
when a real-time instruction sent by the first terminal equipment is received, controlling the second terminal equipment to execute the real-time instruction and obtaining an execution result of the real-time instruction;
and returning the execution result to the first terminal equipment.
34. The apparatus of claim 31, further comprising:
and the test result generating module is used for generating a test result and sending the test result to the server so that the server can display the test result to the user.
35. The apparatus of claim 30, further comprising:
the state monitoring module is used for monitoring the current state of the second terminal equipment, and the current state is an idle state or a busy state;
and the state sending module is used for sending the current state to the server so that the server updates a preset state information table according to the current state, and the state information table stores state information corresponding to second terminal equipment registered to the server.
36. The apparatus of claim 30, further comprising:
the setting module is used for setting the second terminal equipment as a master control machine and establishing communication connection between the master control machine and a slave machine when a fourth preset instruction triggered by a user is detected, wherein the slave machine comprises one or more other second terminal equipment which registers equipment information to the server in advance and is in an idle state currently;
and the third control module is used for monitoring a third user operation executed by the user on the application program to be tested, and controlling the slave to execute the same operation as the third user operation on the application program to be tested when the third user operation is monitored so as to test the application program to be tested in real time.
37. The apparatus of claim 36, the setup module to:
sending an equipment information acquisition request to the server so that the server issues equipment information of a slave machine based on the equipment information acquisition request;
and receiving the equipment information of the slave machine sent by the server, and sending a communication connection request to the slave machine based on the equipment information of the slave machine so as to establish communication connection with the slave machine.
38. The apparatus of claim 36, further comprising:
and the third ending module is used for sending an ending instruction to the slave machine to end the test when a fifth preset instruction triggered by the user is detected.
39. An application program testing device applied to a server comprises:
the script receiving module is used for determining one or more second terminal devices which are currently in an idle state based on a test script when the test script sent by a first terminal device is received, wherein the second terminal devices are terminal devices which are used for establishing communication connection with the server by sending a registration request to the server in advance;
and the second script sending module is used for sending the test script to the one or more second terminal devices which are in the idle state currently so as to enable the second terminal devices to execute the test script.
40. The apparatus of claim 39, further comprising:
a registration request receiving module, configured to receive a registration request sent by a second terminal device, where the registration request includes device information of the second terminal device;
and the third registration module is used for verifying the registration request, storing the equipment information in a preset equipment information library when the verification is passed, and feeding back registration success confirmation information to the second terminal equipment so as to establish communication connection between the second terminal equipment and the server.
41. The apparatus of claim 39, further comprising:
the state receiving module is used for receiving the current state fed back by the second terminal equipment, and the current state is an idle state or a busy state;
and the state updating module is used for updating a preset state information table according to the current state, and the state information table stores state information corresponding to second terminal equipment registered to the server.
42. The apparatus of claim 41, further comprising:
and the list generating module is used for generating an available equipment list based on the state information table, wherein the available equipment list comprises a plurality of second terminal equipment which are currently in an idle state.
43. A cloud testing system, comprising: a first terminal device, a server and a second terminal device,
the first terminal device is used for detecting whether a user triggers a first preset instruction or not; when detecting that the user triggers a first preset instruction, monitoring a first user operation executed by the user on an application program to be tested through the first terminal equipment, and generating a test script based on the first user operation; sending the test script to a server;
the server is used for determining one or more second terminal devices which are in an idle state currently based on the test script; sending the test script to the one or more second terminal devices which are in the idle state currently; the second terminal device is a terminal device which is used for establishing communication connection with the server by sending a registration request to the server in advance;
the second terminal device is configured to execute a test script corresponding to the application program to be tested when the test script is received, and includes: and replaying the received test script to test the application program to be tested.
44. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1-21 when executing the program.
45. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 21.
CN201811592029.8A 2018-12-25 2018-12-25 Application program testing method, device and system, electronic equipment and storage medium Active CN110032507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592029.8A CN110032507B (en) 2018-12-25 2018-12-25 Application program testing method, device and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592029.8A CN110032507B (en) 2018-12-25 2018-12-25 Application program testing method, device and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110032507A CN110032507A (en) 2019-07-19
CN110032507B true CN110032507B (en) 2022-04-05

Family

ID=67235396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592029.8A Active CN110032507B (en) 2018-12-25 2018-12-25 Application program testing method, device and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110032507B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230143343A1 (en) * 2021-11-09 2023-05-11 Flipkart Internet Private Limited Method and system for regular testing of datacenter hardware

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159019B (en) * 2019-12-18 2023-04-21 深圳赛安特技术服务有限公司 Application program testing method, testing control terminal and testing terminal
CN111159031B (en) * 2019-12-24 2023-11-24 珠海市小源科技有限公司 Method for automatically testing application mobile terminal, computer device and computer readable storage medium
CN111367812A (en) * 2020-03-12 2020-07-03 北京奇艺世纪科技有限公司 Test method, electronic device and readable storage medium
CN111400179B (en) * 2020-03-13 2022-11-18 苏宁云计算有限公司 Method and device for terminal application program interaction, computer equipment and storage medium
CN112860572B (en) * 2021-03-12 2024-03-22 杭州网易数之帆科技有限公司 Cloud testing method, device, system, medium and electronic equipment of mobile terminal
CN113672453A (en) * 2021-07-27 2021-11-19 北京达佳互联信息技术有限公司 Display page monitoring method and device, electronic equipment and storage medium
CN113781718A (en) * 2021-09-14 2021-12-10 中国银行股份有限公司 ATM (automatic teller machine) testing method and device, storage medium and electronic equipment
CN114205847B (en) * 2021-11-29 2024-01-19 上海庆科信息技术有限公司 Method, device, storage medium, equipment and system for testing terminal equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981951B (en) * 2012-11-01 2016-03-09 珠海金山网络游戏科技有限公司 Cloud test development platform and cloud test development method
CN104038381B (en) * 2013-03-07 2018-11-09 腾讯科技(深圳)有限公司 Cloud test method, system, client and the server of application
CN103237082B (en) * 2013-05-06 2016-07-27 百度在线网络技术(北京)有限公司 Cloud method of testing, system and cloud server
CN105095062B (en) * 2014-05-09 2019-05-17 腾讯科技(深圳)有限公司 Applied program testing method and system
US9529702B2 (en) * 2015-01-13 2016-12-27 Oracle International Corporation System to enable multi-tenancy testing of business data and validation logic on the cloud
CN105117289B (en) * 2015-09-30 2019-05-28 北京奇虎科技有限公司 Method for allocating tasks, apparatus and system based on cloud test platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230143343A1 (en) * 2021-11-09 2023-05-11 Flipkart Internet Private Limited Method and system for regular testing of datacenter hardware

Also Published As

Publication number Publication date
CN110032507A (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN110032507B (en) Application program testing method, device and system, electronic equipment and storage medium
CN109068179B (en) Multi-platform live broadcast method, computer device and computer readable storage medium
CN108563579B (en) White box testing method, device and system and storage medium
WO2013148265A2 (en) Method and system for testing of mobile web sites
US9170924B2 (en) Ecosystem certification of a partner product
CN106776323B (en) Application testing method and device
CN111611054A (en) Application deployment method and device
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN107181606B (en) Method and apparatus for controlling network nodes
CN110674023B (en) Interface testing method and device
CN110727575B (en) Information processing method, system, device and storage medium
CN114363225A (en) MTQQ protocol-based device debugging mode, system and storage medium
CN108540344B (en) Router upgrading test method and system
CN106875765B (en) Electronic classroom implementation method and device based on VDI
CN104917633A (en) Method and device simulating FOTA upgrade
Krainyk et al. Internet-of-Things Device Set Configuration for Connection to Wireless Local Area Network.
CN109976773B (en) Deployment method and device of game testing environment
CN104570967A (en) Android system based remote control method and system
CN107203471B (en) Joint debugging method, service platform and computer storage medium
CN111045919A (en) Method, device, background server, storage medium and system for debugging program
CN114461337A (en) Cloud simulation system and method, electronic equipment and storage medium
CN111082984A (en) Method and device for simulating login of network equipment to carry out command line interaction
JP2023504956A (en) Performance detection method, device, electronic device and computer readable medium
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN114095343A (en) Disaster recovery method, device, equipment and storage medium based on double-active system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant