CN109873728B - Terminal testing method and device and storage medium - Google Patents

Terminal testing method and device and storage medium Download PDF

Info

Publication number
CN109873728B
CN109873728B CN201711249777.1A CN201711249777A CN109873728B CN 109873728 B CN109873728 B CN 109873728B CN 201711249777 A CN201711249777 A CN 201711249777A CN 109873728 B CN109873728 B CN 109873728B
Authority
CN
China
Prior art keywords
terminal
test
wireless connection
server
command
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
CN201711249777.1A
Other languages
Chinese (zh)
Other versions
CN109873728A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201711249777.1A priority Critical patent/CN109873728B/en
Publication of CN109873728A publication Critical patent/CN109873728A/en
Application granted granted Critical
Publication of CN109873728B publication Critical patent/CN109873728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a terminal testing method, a device and a storage medium; the embodiment of the invention adopts the steps of establishing a first wireless connection with a test terminal; establishing a second wireless connection with the tested terminal; receiving a test command sent by a test terminal based on first wireless connection; sending a test command to the tested terminal based on the second wireless connection; and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection. According to the scheme, the automatic test of the terminal can be realized based on wireless connection, the terminal is connected through the USB data line in a wireless mode, and the efficiency and the maintainability of the automatic test of the terminal are improved.

Description

Terminal testing method and device and storage medium
Technical Field
The invention relates to the technical field of automatic testing, in particular to a terminal testing method, a terminal testing device and a storage medium.
Background
Currently, in order to provide a high-quality terminal, it is generally required to perform an automatic test on the terminal, for example, an automatic test on a system or an installed application of the terminal.
The traditional terminal automation test, such as the Android system terminal automation test, comprises the following specific processes: when a carrier of an application to be tested, such as an Android mobile phone, is used, the carrier is connected to a PC through a USB cable, and then a command input by the PC end is transmitted to the mobile phone end through the USB for execution.
However, the conventional terminal automation test needs to be performed by connecting the terminal with a USB cable, which brings inconvenience to the automation test and reduces the efficiency of the terminal automation test. For example, a large amount of terminals such as mobile phones are generally required for performing tasks in automated testing, and the problems that the devices cannot be identified and disconnected, the number of USB sockets of a PC is insufficient, and the like easily occur when testing is performed through a USB cable connection terminal, so that automated testing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a terminal testing method, a terminal testing device and a storage medium, which can improve the efficiency of terminal automatic testing.
In a first aspect, an embodiment of the present invention provides a terminal testing method, which is applicable to a server, and includes:
establishing a first wireless connection with a test terminal;
establishing a second wireless connection with the tested terminal;
receiving a test command sent by the test terminal based on the first wireless connection;
sending the test command to the terminal under test based on the second wireless connection;
and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection.
In a second aspect, an embodiment of the present invention provides another terminal testing method, which is applicable to a terminal to be tested, and includes:
establishing a second wireless connection with the server;
receiving a test command forwarded by a server based on the second wireless connection;
executing corresponding test operation according to the test command to obtain a test result;
and returning the test result to the server based on the second wireless connection so that the server forwards the test result to the test terminal.
In a third aspect, an embodiment of the present invention further provides a terminal testing apparatus, which is applicable to a server, and includes:
the first connection unit is used for establishing first wireless connection with the test terminal;
the second connection unit is used for establishing second wireless connection with the tested terminal;
a command receiving unit, configured to receive a test command sent by the test terminal based on the first wireless connection;
the command forwarding unit is used for sending the test command to the tested terminal based on the second wireless connection;
and the result forwarding unit is used for receiving the test result returned by the tested terminal based on the second wireless connection and sending the test result to the test terminal based on the first wireless connection.
In a fourth aspect, an embodiment of the present invention further provides another terminal testing apparatus, which is applicable to a terminal to be tested, and includes:
a second connection establishing unit for establishing a second wireless connection with the server;
a receiving unit, configured to receive a test command forwarded by a server based on the second wireless connection;
the test unit is used for executing corresponding test operation according to the test command to obtain a test result;
and the result sending unit is used for returning the test result to the server based on the second wireless connection so that the server can forward the test result to the test terminal.
In a fifth aspect, the present invention further provides a storage medium, where the storage medium stores instructions, and the instructions, when executed by a processor, implement the steps of the method provided in any one of the embodiments of the present invention.
The embodiment of the invention adopts the steps of establishing a first wireless connection with a test terminal; establishing a second wireless connection with the tested terminal; receiving a test command sent by a test terminal based on first wireless connection; sending a test command to the tested terminal based on the second wireless connection; and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection. According to the scheme, the automatic test of the terminal can be realized based on wireless connection, the terminal is connected through the USB data line in a wireless mode, and the efficiency and the maintainability of the automatic test of the terminal are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic view of a scenario of a terminal test system according to an embodiment of the present invention;
fig. 1b is a schematic flowchart of a terminal testing method according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating an ack packet multiplexing process according to an embodiment of the present invention;
FIG. 3 is a flow chart of identifier mapping according to an embodiment of the present invention;
fig. 4a is another schematic flow chart of a terminal testing method according to an embodiment of the present invention;
FIG. 4b is a block diagram of an automated test system according to an embodiment of the present invention;
fig. 5a is a schematic view of another scenario of a terminal test system according to an embodiment of the present invention;
fig. 5b is a schematic flowchart of a terminal testing method according to an embodiment of the present invention;
FIG. 5c is a schematic diagram of another embodiment of an automated test system;
FIG. 6a is a schematic diagram of a first structure of a terminal testing apparatus according to an embodiment of the present invention;
FIG. 6b is a schematic diagram of a second structure of a terminal testing device according to an embodiment of the present invention;
FIG. 6c is a schematic diagram of a third structure of a terminal testing device according to an embodiment of the present invention;
FIG. 6d is a schematic diagram of a fourth structure of the terminal testing device according to the embodiment of the present invention;
fig. 7a is a schematic structural diagram of a fifth exemplary embodiment of a terminal testing device;
fig. 7b is a schematic structural diagram of a sixth exemplary embodiment of a terminal testing device;
FIG. 8a is a schematic diagram of a seventh structure of a terminal testing device according to an embodiment of the present invention;
FIG. 8b is a schematic diagram of an eighth structure of the terminal testing device according to the embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a terminal test system, which comprises any one of the terminal test device suitable for a server, the terminal test terminal suitable for the test terminal and the terminal test method of the terminal to be tested, wherein the terminal can be a mobile phone, a tablet computer and other equipment.
Referring to fig. 1a, an embodiment of the present invention provides a terminal testing system, including: terminal 10, server 20, terminal 40; the terminal 10 and the server 20 are connected via a network 30, and the terminal 40 and the server 20 are connected via a network 50. The network 30 and the network 50 include network entities such as routers and gateways, which are not illustrated in the figure. The terminals 10, 40 may interact with the server 20 via a wireless network, for example, may download applications (e.g., an automated testing application) and/or application update packages and/or application-related data information or service information from the server 20. The terminal 10 may be a test terminal such as a laptop, a tablet, etc., and the terminal 40 may be a device such as a mobile phone, etc., as a tested terminal.
Based on the system shown in fig. 1a, taking the automated testing of the terminal 40 as an example, the server 20 establishes a first wireless connection with the testing terminal 10; establishing a second wireless connection with the terminal under test 40; receiving a test command sent by a test terminal based on first wireless connection; the server 20 receives the test command transmitted by the terminal 10 based on the first wireless connection; sending a test command to the terminal 40 based on the second wireless connection; the test result returned by the terminal 40 is received based on the second wireless connection and the test result is sent to the terminal 10 based on the first wireless connection.
The above example of fig. 1a is only an example of a system architecture for implementing the embodiment of the present invention, and the embodiment of the present invention is not limited to the system architecture shown in fig. 1a, and various embodiments of the present invention are proposed based on the system architecture.
In an embodiment, there is provided a terminal testing method, which is applicable to a server and can be executed by a processor of the server, as shown in fig. 1b, and the specific flow of the terminal testing method is as follows:
101. a first wireless connection is established with the test terminal.
The test terminal may be a terminal for testing, and may include a PC and other devices, for example.
Specifically, a connection request may be actively initiated by the test terminal to the server to establish the wireless connection. For example, the server may receive a first wireless connection request sent by the test terminal, and establish a first wireless connection with the test terminal according to the first connection request.
The wireless connection may be a wireless connection conforming to a network communication Protocol, for example, in order to improve reliability of data Transmission, the wireless connection may be a wireless connection conforming to a Transmission Control Protocol (TCP), which is called a TCP connection.
In some embodiments, when the wireless connection is a TCP connection, the connection may be established through a three-way handshake, specifically, the connection establishment procedure includes:
the terminal SENDs a wireless connection request (such as a SYN connection request) to the server and enters a sending state, such as a SYN _ SEND state;
the server returns response information of the wireless connection request (e.g., a SYN (SEQ) ACK (ACK +1) message), and enters a receiving state, e.g., a SYN _ RECV state;
the terminal responds a confirmation message to the server after receiving the response message, and enters a connection establishment state, namely an Established state.
102. And establishing a second wireless connection with the tested terminal.
The terminal to be tested is a terminal to be tested and can include a mobile phone, a tablet and other devices.
Specifically, a connection request may be actively initiated by the terminal under test to the server to establish the wireless connection. For example, the server receives a second wireless connection request sent by the terminal to be tested, and establishes a second wireless connection with the test terminal according to the second connection request.
Similarly, the second wireless connection may also be a wireless connection conforming to a network communication Protocol, for example, in order to improve reliability of data Transmission, the second wireless connection may be a wireless connection conforming to a TCP (Transmission Control Protocol), which is called a TCP connection.
In the embodiment of the present application, the test terminal and the terminal to be tested may be located in the same network, for example, may be located in the same local area network. Of course, the test terminal and the terminal under test may also be located in different networks, for example, the test terminal and the terminal under test are respectively located in two different local area networks.
The sequence of step 101 and step 102 is not limited by the sequence number, and the sequence between the two may be multiple, for example, executed simultaneously, or executed 102 before 101.
The server may be a server deployed on a public network, and the server may have a public network ip.
103. And receiving a test command sent by the test terminal based on the first wireless connection.
After the server establishes wireless connections at the test terminal and the tested terminal respectively, the test terminal can send a test command to the server based on the first wireless connection.
The test command may be a command conforming to an automated test protocol, which may be set according to actual requirements, for example, the test command may be determined based on a system of the terminal under test, for example, when the terminal under test is a terminal of an Android system, an automated test command conforming to an Adb (Android Debug Bridge) protocol is adopted, which is called an Adb command.
Wherein, the test command may include: unlock screen command, take picture command, browser test command, etc.
In some embodiments, after the test terminal establishes the wireless connection with the server and the terminal under test establishes the wireless connection with the server, the test terminal needs to establish a connection with the terminal under test. Specifically, the test terminal may send a terminal connection request to the server based on the first wireless connection, for example, a CNXN request packet may be sent under an Adb protocol, the server may forward the terminal connection request to the terminal to be tested through the second wireless connection, the terminal to be tested may return confirmation information of the terminal connection request, for example, the CNXN confirmation packet, the server forwards the confirmation information, for example, the CNXN confirmation packet, to the test terminal, and at this time, the test terminal and the terminal to be tested establish a connection.
In the process of establishing the connection between the test terminal and the terminal to be tested, for the server, after the first wireless connection and the second wireless connection are established and before the test command is received, the following steps may be further performed, that is, the terminal test method may further include the steps of:
receiving a terminal connection request sent by a test terminal based on first wireless connection;
sending a terminal connection request to the tested terminal based on the second wireless connection;
receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection;
and sending confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection.
In the terminal testing method, one or more testing terminals can be adopted. Namely, the terminal test method can be suitable for a scenario in which one test terminal tests one tested terminal, and can also be suitable for a scenario in which a plurality of test terminals test the same tested terminal.
In practical application, if a plurality of test terminals test the same tested terminal, only one link can be established by the self-test service of one tested terminal, that is, only one connection can be established between one tested terminal and one test terminal. If there are other test terminals, such as a terminal connection request sent by the second test terminal, such as a CNXN request packet, the other test terminals, such as the second test terminal, will not be able to obtain the connection confirmation information of the terminal under test, such as a CNXN confirmation packet; and other test terminals cannot realize automatic test of the tested terminal.
In order to realize that a plurality of test terminals can automatically test the same tested terminal, the embodiment of the invention can adopt a confirmation information multiplexing mode, specifically, a server stores the confirmation information of the terminal connection request returned by the tested terminal, and when other test terminals need to establish connection with the tested terminal which has established connection, the server returns the stored confirmation information to other test terminals, so that the effect of establishing connection between a plurality of test terminals and the same tested terminal in parallel is realized. That is, before the step of "sending a terminal connection request to the terminal under test based on the second wireless connection", the test method may further include:
determining whether the server stores confirmation information of the terminal connection request;
if not, executing a step of sending a terminal connection request to the tested terminal based on the second wireless connection;
in this case, the step "sending the confirmation information returned by the terminal under test to the test terminal based on the first wireless connection" may include:
and storing the confirmation information returned by the tested terminal, and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection. And storing the confirmation information returned by the tested terminal so as to facilitate the multiplexing of the subsequent confirmation information.
In the embodiment of the invention, the determination of whether the server stores the confirmation information is to confirm whether the tested terminal is connected with other testing terminals, if so, the connection with other testing terminals is indicated, and if not, the connection with other testing terminals is not established on the surface, and at the moment, the terminal connection is transferred to the tested terminal so as to realize the connection between the current testing terminal and the tested terminal.
In addition, before receiving the test command, the method of the embodiment of the application may further include:
when the server is determined to store the confirmation information of the terminal connection request, reading the stored confirmation information of the terminal connection request;
sending the read confirmation information to the test terminal based on the first wireless connection.
That is, when the tested terminal has established connection with other test terminals, the connection between the plurality of test terminals and the tested terminal can be established simultaneously by determining information multiplexing.
Referring to fig. 2, the process of the server for establishing a connection between a plurality of test terminals and a terminal to be tested at the same time includes:
201. and receiving a terminal connection request sent by the test terminal based on the first wireless connection.
Taking the automated test protocol as the Adb protocol as an example, the test terminal may send a CNXN request packet to the server based on the first wireless connection, so as to establish a connection with the terminal under test.
202. And determining whether the server stores confirmation information of the terminal connection request, if not, executing step 203, and if so, executing step 205.
The server determines whether a CNXN acknowledgement packet of the CNXN request packet is stored in the memory, if not, step 203 is executed, and if yes, step 205 is executed.
203. And sending a terminal connection request to the tested terminal based on the second wireless connection.
When the confirmation packet is not stored in the server memory, the server may forward the CNXN request packet to the terminal under test.
204. And receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection, and storing the confirmation information.
When receiving the CNXN acknowledgment packet of the CNXN request packet sent by the terminal under test, the server may store the CNXN acknowledgment packet in the memory.
205. And reading the stored confirmation information of the terminal connection request, and sending the read confirmation information to the test terminal based on the first wireless connection.
The server may read the CNXN acknowledgement packet from the memory and then forward it to the test terminal, thus establishing a connection between the test terminal and the terminal under test.
104. And sending a test command to the tested terminal based on the second wireless connection.
After receiving the test command sent by the test terminal, the server can forward the test command to the test terminal through the second wireless connection.
When the test terminal and the tested terminal are located in the same network, the server can forward the test command to the test terminal located in the same network with the test terminal through a second wireless connection in the network.
When the test terminal and the tested terminal are located in different networks, the server can forward the command to the test terminals of other network terminals, and remote automatic test is realized.
Therefore, the testing method provided by the embodiment of the invention does not need to limit the testing terminal and the tested terminal to be in the same network, and the method can be suitable for scenes of automatic testing of remote terminals and automatic testing of local terminals.
105. And receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection.
And after receiving the test command, the tested terminal executes corresponding test operation according to the test command to obtain a corresponding test result, and then returns the test result to the server based on the second wireless connection. And the server forwards the test result to the test terminal through the first wireless connection after receiving the test result.
For example, after the terminal to be tested receives the unlocking command, the terminal to be tested can unlock the screen, and send the screen unlocking result to the server through the second wireless connection, and the server forwards the screen unlocking result to the test terminal through the first wireless connection.
When a plurality of test terminals test the same tested terminal, the server needs to know which test terminal the test result is sent to when receiving the test result returned by the tested terminal, thereby being convenient for effectively managing the test and improving the accuracy of the automatic test. The embodiment of the invention can add the information sender identification in the test command, so that the server can know the target test terminal required to be sent by the test result of the test command. That is, the test command carries an information sender identification.
The information sender identifier is used to identify the information sender, for example, to identify the command sender. The identifier of the information sender may be set according to actual requirements, for example, when an automation test is performed based on the Adb protocol, the identifier of the information sender may be a local-id (local-id), and the local-id identifies the sender.
At this time, the test command and the test result both carry the information sending identifier. The server can receive a test command sent by the test terminal based on the first wireless connection, the test command carries an information sender identification, then the test command carrying the information sender identification is forwarded to the tested terminal based on the second wireless connection, the tested terminal returns a test result carrying the information sender identification to the server, the server determines a target test terminal to be sent according to the information sender identification, and then the test result is sent to the target test terminal.
Further, when a plurality of test terminals send information such as a test command to a tested terminal, the sender identifiers carried by the information, such as local-id, may be the same, which may cause the server to be unable to know to which test terminal to forward the test result, which may cause confusion of automated testing and inaccurate test result.
In order to ensure the accuracy of forwarding the test result, the embodiment of the present invention needs to keep that the identifiers of the information sending parties in the information sent by each test terminal are different. The embodiment of the invention can replace the identifier of the information sender in the information with the unique preset identifier after receiving the information sent by the test terminal, the test result returned by the tested terminal also carries the preset identifier, and the server can determine the test terminal to be sent according to the preset identifier in the test result so as to ensure that the server forwards the test result to the correct test terminal. That is, the step "sending the test command to the terminal under test based on the second wireless connection" may include:
replacing an information sender identification carried by the test command with a unique preset identification, wherein the preset identification corresponds to the tested terminal;
sending a test command after the identifier replacement to the tested terminal based on the second wireless connection;
at this time, the step of "transmitting the test result to the test terminal based on the first wireless connection" may include:
determining a target test terminal to be sent according to a preset identifier;
replacing the preset identification carried by the test result with an identification of the information sender;
and sending the replaced test result to the target test terminal based on the first wireless connection.
In some embodiments, the identifier of the information sender may be mapped to a unique preset identifier in a mapping manner; for example, the step of replacing the identifier of the sender of the information carried by the test command with a unique preset identifier may include:
acquiring an information sender identifier carried by a test command;
mapping the information sender identification to a unique preset identification, and establishing and storing a mapping relation among the information sender identification, the preset identification and the test terminal;
replacing an information sender identifier carried by the test command with a unique preset identifier;
at this time, the step "determining the target test terminal to be sent according to the preset identifier carried in the test result" may include:
and determining a target test terminal to be sent and a corresponding information sender identification according to the mapping relation and a preset identification carried by the test result.
For example, when the automation test is performed based on the Adb protocol, the local-id carried by the command can be mapped into a unique extra-id, then the extra-id is used for replacing the local-id in the test command, and finally the tested terminal is sent. The tested terminal returns a corresponding test result, the test result carries the extra-id, the server can determine the target test terminal which needs to be sent according to the extra-id carried by the test result, namely, the target test terminal which needs to be sent is determined, and then the extra-id in the test result is replaced by the local-id and sent to the corresponding test terminal.
For example, when an automation test is performed based on the Adb protocol, after the server receives a test command sent by the test terminal Client1, the server may map the local-id carried by the command into a unique extra-id, and establish and store a mapping relationship among the Client1, the local-id, and the extra-id, such as Client 1: { local-id, extra-id }. And then, replacing the local-id in the test command by using the extra-id, and finally sending the tested terminal. The tested terminal returns a corresponding test result, the test result carries an extra-id, and the server can obtain the mapping relation such as { Client 1: { local-id, extra-id } } determines a target test terminal such as Client1 which needs to be sent, i.e. determines which test terminal needs to be sent to, and then replaces the extra-id in the test result with the local-id and sends the local-id to the corresponding test terminal such as Client 1.
In some embodiments, after the connection between the test terminal and the terminal to be tested is established, preparation before communication is required to be performed, so as to improve communication quality and ensure reliability of the automated test. For example, after receiving the confirmation information of the terminal connection request, the test terminal may send a service start request to the terminal to be tested, and may formally send a test command to perform a test after receiving the response information returned by the terminal to be tested.
For example, when an automated test is performed based on the Adb protocol, the test terminal needs to send an OPEN packet to the terminal under test, and the automated test is started after receiving an OPEN acknowledgement packet returned by the terminal under test.
In consideration of a scenario where a plurality of test terminals perform tests on the same terminal under test, in order that the server can return response information of a service start request to an accurate test terminal, an information sender identifier, such as the local-id, may be added to the service start request, such as an OPEN packet, and the response information, such as an OPEN acknowledgement packet. After receiving the response information of the service starting request, such as the OPEN acknowledgement packet, the server may determine the test terminal that needs to be returned according to the information sender identifier in the response information.
For example, after the CNXN packet and the CNXN acknowledgement packet are received and sent, the test terminal may also send an OPEN packet with a local-id, which identifies the stream at the sending end, and forward the OPEN packet to the terminal to be tested via the server, and the server may know which stream is sent to according to the local-id, which test terminal is sent to, since the local-id is also included in the OPEN acknowledgement packet returned by the terminal to be tested after receiving the OPEN packet.
However, if there are multiple test terminals sending a service start request, such as an OPEN packet, to the tested terminal, the service start request, such as the OPEN packet, may carry the same information sender identifier (e.g., local-id), which may cause the server to be unable to know to which test terminal the response information returned by the tested terminal, such as an OPEN acknowledgement packet, is sent, resulting in a test failure or a test confusion.
Based on a similar forwarding mode to the test result and the command, in order to ensure the accuracy of forwarding the response information of the service starting request, the reliability of the automatic test is improved. The embodiment of the invention needs to keep that the information sender identifications in the information sent by each test terminal are different. The embodiment of the invention can replace the identifier of the information sender in the information with the unique preset identifier after receiving the information sent by the test terminal, the response information returned by the tested terminal also carries the preset identifier, and the server can determine the test terminal to be sent according to the preset identifier in the response information so as to ensure that the server forwards the response information to the correct test terminal.
That is, after sending the confirmation information to the test terminal and before receiving the test command, the terminal test method further includes:
receiving a service starting request sent by a test terminal based on first wireless connection, wherein the service starting request carries an information sender identifier;
replacing a sender identifier carried by the service starting request with a unique preset identifier, wherein the preset identifier corresponds to the tested terminal;
sending a service starting request after the identifier replacement to the tested terminal based on the second wireless connection;
receiving response information of a service starting request sent by the tested terminal based on the second wireless connection, wherein the response information carries a preset identifier;
determining a target test terminal to be sent according to a preset identifier carried by the response information;
and replacing the preset identification carried by the response information with an identification of the information sender, and sending the replaced response information to the target test terminal based on the first wireless connection.
In some embodiments, the identifier of the information sender may be mapped to a unique preset identifier in a mapping manner; for example, after receiving a service start request, the identifier of the information sender in the request may be mapped to a unique preset identifier, and a mapping relationship between the identifier of the information sender, the preset identifier, and the test terminal is established and stored; subsequently, after receiving the response information of the service starting request, the target test terminal to be sent and the corresponding identifier of the information sender can be determined based on the mapping relation, and then the preset identifier in the response information is replaced by the identifier of the information sender. Thus, response information of each request can be accurately forwarded to the test terminal.
For example, referring to FIG. 3, in an automated test based on the Adb protocol, the process of implementing the local-id mapping is as follows:
301. the test terminal Client1 sends an OPEN packet carrying the local-id to the server.
302. The server can map the local-id carried by the OPEN packet into a unique extra-id, and establish and store the mapping relation among the Client1, the local-id and the extra-id, such as the Client 1: { local-id, extra-id }.
303. And the server replaces the local-id in the OPEN packet by using the extra-id and sends the replaced OPEN packet to the tested terminal.
304. And the tested terminal carries out corresponding processing according to the received OPEN packet.
305. And the tested terminal returns an OPEN confirmation packet carrying extra-id to the server.
306. And the server determines a target test terminal Client1 which needs to be sent according to the extra-id and the mapping relation.
307. The server replaces the extra-id in the OPEN acknowledgement packet with the local-id.
308. The server sends the replaced OPEN acknowledgement packet to the test terminal Client 1.
The embodiment of the invention can realize that a plurality of test terminals can simultaneously communicate with one tested terminal by two modes of confirmation information multiplexing and identification mapping, thereby realizing that a plurality of test terminals can automatically test the same tested terminal.
As can be seen from the above, the embodiment of the present invention establishes the first wireless connection with the test terminal; establishing a second wireless connection with the tested terminal; receiving a test command sent by a test terminal based on first wireless connection; sending a test command to the tested terminal based on the second wireless connection; and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection. The scheme can realize the automatic test of the terminal based on the wireless connection, realize the data forwarding through the server, replace the USB data display, wirelessly adopt the USB data line to connect the terminal, get rid of various defects of the USB line connection (for example, the automatic test generally needs a large amount of mobile phones to execute tasks, easily lead to the equipment being unable to identify through the USB line connection, drop the line, lead to the problem that the USB socket number of the PC is insufficient and lead to the need of a large amount of PC support or lead to the line being complicated and difficult to manage and the like by other tools such as Hub support and excessive USB lines), and improve the efficiency and maintainability of the terminal automatic test.
In addition, the automatic test scheme provided by the embodiment of the invention does not need to limit the tested terminal and the test terminal to be in the same network, can realize the automatic test or debugging of the remote terminal, can meet the requirement of outdoor mobile automatic test, meanwhile, even when ip is changed due to WIFI switching or disconnection reconnection and other scenes, manual intervention is not needed (the existing wireless automatic test scheme needs to limit the test terminal and the tested terminal to be in the same local area network, the communication between the test terminal and the tested terminal is interrupted when the ip address of the tested terminal is changed every time, normal communication can be recovered only by executing a connection command again through manual intervention at the test terminal, the labor cost is increased, and complete automatic test cannot be realized), communication can be automatically reconnected and established, and therefore the effects of stronger usability and wider applicable scenes are achieved.
Furthermore, the automatic test scheme provided by the embodiment of the invention can realize that a plurality of test terminals simultaneously communicate with one tested terminal by two modes of confirmation information multiplexing and identification mapping, thereby realizing that the plurality of test terminals automatically test the same tested terminal and improving the accuracy of automatic test.
In one embodiment, the method described in the above embodiments is further detailed below.
The embodiment of the invention provides an automatic test system which comprises a test terminal, a tested terminal and a server, and referring to fig. 1a, the terminal is connected with the server through a network. The test terminal can be a PC, a tablet computer and the like, and the tested terminal can be a mobile phone and the like.
The test terminal and the tested terminal can be in the same network or in different networks. The server may be a server deployed on a public network.
The test method of the present invention will be further described based on the automated test system shown above.
As shown in fig. 4a and 4b, a terminal testing method may specifically include the following steps:
401. the test terminal establishes a first wireless connection with the server.
Specifically, a first wireless connection request is sent to a server; and the server establishes a first wireless connection with the test terminal according to the first wireless connection request.
The wireless connection may be a wireless connection conforming to a network communication Protocol, for example, in order to improve reliability of data Transmission, the wireless connection may be a wireless connection conforming to a Transmission Control Protocol (TCP), which is called a TCP connection.
In some embodiments, when the wireless connection is a TCP connection, the connection may be established through a three-way handshake, specifically, the connection establishment procedure includes:
the terminal SENDs a wireless connection request (such as a SYN connection request) to the server and enters a sending state, such as a SYN _ SEND state;
the server returns response information of the wireless connection request (e.g., a SYN (SEQ) ACK (ACK +1) message), and enters a receiving state, e.g., a SYN _ RECV state;
the terminal responds a confirmation message to the server after receiving the response message, and enters a connection establishment state, namely an Established state.
402. And the tested terminal establishes a second connection with the server.
Specifically, the tested terminal sends a second wireless connection request; and the server establishes a second wireless connection with the tested terminal according to the second wireless connection request.
The connection between the test terminal and the server and the connection between the terminal to be tested and the server may be established in various timing sequences, for example, steps 401 and 402 may be performed simultaneously or sequentially.
403. The test terminal sends a terminal connection request to the server based on the first wireless connection.
For example, when an Adb (Android Debug Bridge) protocol is used for an automated test, a test terminal such as a PC may send a CNXN request packet to a server.
404. And the server forwards the terminal connection request to the tested terminal based on the second wireless connection.
For example, the server may forward the CNXN request packet to a terminal to be tested, such as a mobile phone of the android system.
405. And the tested terminal returns the confirmation information of the corresponding terminal connection request to the server based on the second wireless connection.
For example, a mobile phone of a terminal to be tested, such as an android system, may return a CNXN acknowledgement packet to the server.
406. The server forwards the confirmation information to the test terminal based on the second wireless connection.
For example, the server may forward the CNXN acknowledgement packet to the test terminal, such as a PC, and when the test terminal PC receives the CNXN acknowledgement packet, the test terminal, such as a PC, facilitates the connection establishment of the tested terminal, such as an android system mobile phone.
407. And when the test terminal receives the confirmation information, the test terminal sends a service starting request to the server based on the first wireless connection.
For example, a test terminal such as a PC may send an OPEN packet to the server upon receiving a CNXN acknowledgement packet.
408. The server forwards the start service request to the terminal under test based on the second wireless connection.
For example, the server may forward the OPEN packet to a terminal to be tested, such as an android mobile phone.
409. And the tested terminal returns response information of the service starting request to the server.
For example, the tested terminal, such as an android mobile phone, may return an OPEN confirmation packet to the server.
410. The server forwards the response information to the test terminal based on the first wireless connection.
The server may forward the OPEN acknowledgement packet to a test terminal such as a PC.
411. And after receiving the response information, the test terminal acquires a test command to be sent.
A test terminal, such as a PC, may begin sending test commands when it receives an OPEN acknowledgement packet.
For example, referring to fig. 4b, the test terminal may obtain the test command input by the user through an Adb Client (android debug bridge Client).
Referring to fig. 4b, the test terminal may be installed with a Client process (i.e., a Client), which may include an Adb Client (an android debug bridge Client), an Adb Server (a Server of the android debug bridge Client). The tested terminal is provided with Adbd (Adb server)
The Adb server is used as a service end of an Adb client, and the Adbd is used as the service end of the Adb server.
(1) The Adb Server runs on a test terminal such as a PC terminal, and when Adb.exe is installed and Adb service is started, the Adb Server runs on the PC terminal all the time as a background process, monitors a local 5037 port and starts to receive an Adb command request of an Adb Client. The function of the system is as a medium for interacting with a mobile phone, a command sent by a user through an Adb Client is monitored, the command is forwarded out and finally received and processed by an Adbd service of a mobile phone end, and an Adbd return result is also sent to the Adb Client through an Adb Server.
(2) The Adb Client runs on a test terminal such as a PC terminal, a shell program used at ordinary times can be regarded as the Adb Client, a TCP connection is established with an Adb Server after one shell program is started, a user can then send a command to the Adb Server through a shell command window, a plurality of shell command windows can be started simultaneously, and the Adb clients and the Adb Server are started to communicate simultaneously.
(3) And the Adbd operates on a tested terminal such as an Android terminal, is a background service and is responsible for processing the received shell command and returning the result.
In some embodiments, the test terminal may pre-store a test command file, and at this time, the test terminal may read a corresponding test command from the test command file.
412. The test terminal sends the test command to the server based on the first wireless connection.
For example, a test terminal such as a PC sends an Adb command to a server.
413. The server forwards the test command to the terminal under test based on the second wireless connection.
For example, the server may forward the Adb command to a terminal under test, such as an android handset.
414. And the tested terminal executes corresponding test operation according to the test command to obtain a test result.
For example, the Adbd in the tested terminal, such as an android mobile phone, can perform corresponding test operations, such as unlocking a screen, opening an application, and the like, and then obtain a corresponding test result.
415. And the tested terminal sends the test result to the server based on the second wireless connection.
For example, the Adbd in the tested terminal, such as an android mobile phone, may send the test result to the server.
In some embodiments, the testing steps executed by the tested terminal side can be implemented by a background service in the QT4A helper application, where the background service is used to assist QT4A automated testing, and is applied to scenarios such as Android outdoor mobile automated testing, remote Android device debugging, and the like.
QT4A: QT4A is a set of Android UI automatic test framework, is currently responsible for development and operation by the group members, and is applied to Android automatic tests of SNG and other BG products.
QT4A assistant: the automatic test system is a part of a QT4A automatic test framework and is an Android apk, and the automatic test system can be installed in an Android mobile phone before QT4A automatic test. The execution step of the terminal to be tested in the test scheme of the embodiment of the invention can be realized by a background service in the QT4A helper.
416. The server forwards the test result to the test terminal based on the first wireless connection.
For example, the server may forward the test result to the test terminal PC on the basis of the TCP connection.
Referring to fig. 4b, Adb Server, Adb Client, and Adbd are communication roles involved in executing the Adb command, if there is a USB cable connecting the mobile phone and the PC, the user can directly execute the Adb command on the PC to obtain a return result, but the USB connection abandoning scheme of the present invention replaces the data forwarding scheme by the Server service: firstly, TCP connection is respectively established between a Server and an Android terminal as well as between the Server and a Client; and then, an Adb command executed by the Client is sent to the Server, the Adb command is forwarded to an Adbd process of the Android terminal after being packaged and processed by the Server, a processing result of the Adbd is also returned in the original path, the Adb command is sent to the Server and processed by the Server, the Adb command is forwarded to the Client after being processed, and the Client can obtain a command return result and complete a communication process.
As shown in fig. 4a and 4b, in the test scheme of the embodiment of the present invention, it is not necessary to limit the tested terminal, such as the Android phone terminal, and the test terminal, such as the PC used by the user, to be in the same local area network. As can be seen from fig. 4b, the communication between the terminal to be tested, such as the Android phone terminal, and the Server on the Server is realized by establishing a TCP connection. The Server is deployed on a Server with a public network ip, the Android end of the tested terminal is an internal network ip, and the public network ip cannot directly initiate a connection request to the internal network ip, so that the Android end actively initiates the connection request to the Server. Similarly, each Client running on the test terminal such as PC (fig. 4a takes 1 Client as an example, and multiple clients may actually be concurrent) communicates with the Server, and the Client actively initiates a connection request to the Server. Therefore, the Android end and the PC end do not need to be limited to be in the same local area network by utilizing the Server deployed on the public network ip Server for data forwarding.
As can be seen from the above, the test scheme provided in the embodiment of the present invention can implement an automatic test of a terminal based on a wireless connection, implement data forwarding through a server, replace USB data display, and wirelessly connect the terminal by using a USB data line, thereby getting rid of various defects of USB line connection (for example, the automatic test generally requires a large number of mobile phones to perform tasks, and the USB line connection easily causes an equipment failure to identify and drop lines, and the USB socket number of the PC is insufficient, which causes a large number of PC supports or requires other tools such as Hub support, and the USB lines are too many, which causes a complicated line and is difficult to manage), thereby improving efficiency and maintainability of the automatic test of the terminal.
In addition, the automatic test scheme provided by the embodiment of the invention does not need to limit the tested terminal and the test terminal to be in the same network, can realize the automatic test or debugging of the remote terminal, can meet the requirement of outdoor mobile automatic test, meanwhile, even when ip is changed due to WIFI switching or disconnection reconnection and other scenes, manual intervention is not needed (the existing wireless automatic test scheme needs to limit the test terminal and the tested terminal to be in the same local area network, the communication between the test terminal and the tested terminal is interrupted when the ip address of the tested terminal is changed every time, normal communication can be recovered only by executing a connection command again through manual intervention at the test terminal, the labor cost is increased, and complete automatic test cannot be realized), communication can be automatically reconnected and established, and therefore the effects of stronger usability and wider applicable scenes are achieved.
In one embodiment, the method described in the above embodiments is further detailed below.
The embodiment of the invention provides an automatic test system which comprises a plurality of test terminals 10, a tested terminal 40 and a server 20, and referring to fig. 5a, the terminals and the server are connected through a network. The test terminal can be a PC, a tablet computer and the like, and the tested terminal can be a mobile phone and the like.
The test terminal and the tested terminal can be in the same network or in different networks. The server may be a server deployed on a public network, and each test terminal may be in the same network or in different networks.
The test method of the present invention will be further described based on the automated test system shown above.
As shown in fig. 5b and 5c, a terminal testing method may specifically include the following steps:
501. the test terminal establishes a first wireless connection with the server.
Specifically, a first wireless connection request is sent to a server; and the server establishes a first wireless connection with the test terminal according to the first wireless connection request.
The wireless connection may be a wireless connection conforming to a network communication Protocol, for example, in order to improve reliability of data Transmission, the wireless connection may be a wireless connection conforming to a Transmission Control Protocol (TCP), which is called a TCP connection.
In some embodiments, when the wireless connection is a TCP connection, the connection may be established through a three-way handshake, specifically, the connection establishment procedure includes:
the terminal SENDs a wireless connection request (such as a SYN connection request) to the server and enters a sending state, such as a SYN _ SEND state;
the server returns response information of the wireless connection request (e.g., a SYN (SEQ) ACK (ACK +1) message), and enters a receiving state, e.g., a SYN _ RECV state;
the terminal responds a confirmation message to the server after receiving the response message, and enters a connection establishment state, namely an Established state.
502. And the tested terminal establishes a second connection with the server.
Specifically, the tested terminal sends a second wireless connection request; and the server establishes a second wireless connection with the tested terminal according to the second wireless connection request.
The connection between the test terminal and the server and the connection between the tested terminal and the server may be established in various timing sequences, for example, steps 501 and 502 may be performed simultaneously or sequentially.
The connection between the test terminal and the server and the connection between the tested terminal and the server may be established in various timing sequences, for example, simultaneously or sequentially.
503. The test terminal sends a terminal connection request to the server based on the first wireless connection.
For example, when an Adb (Android Debug Bridge) protocol is used for an automated test, a test terminal such as a PC may send a CNXN request packet to a server.
504. The server determines whether the confirmation information of the terminal connection request is stored, if not, step 507 is executed, and if so, step 508 is executed.
For example, the server determines whether the CNXN acknowledgment packet is stored in the memory.
505. And the server forwards the terminal connection request to the tested terminal based on the second wireless connection.
For example, the server may forward the CNXN request packet to a terminal to be tested, such as a mobile phone of the android system.
506. The tested terminal returns the confirmation information of the corresponding terminal connection request to the server based on the second wireless connection, and goes to step 510.
For example, a mobile phone of a terminal to be tested, such as an android system, may return a CNXN acknowledgement packet to the server.
507. The server saves the confirmation information and forwards the confirmation information to the test terminal based on the second wireless connection.
For example, the server receives the CNXN acknowledgment packet, and stores the CNXN acknowledgment packet in the memory, so as to multiplex the acknowledgment packet in the following.
The server may forward the CNXN acknowledgement packet to the test terminal, such as a PC, and when the test terminal PC receives the CNXN acknowledgement packet, the test terminal, such as a PC, facilitates the connection establishment of the terminal under test, such as an android system mobile phone.
508. The server reads the confirmation information of the terminal connection request from the local storage and forwards the confirmation information to the test terminal based on the second wireless connection.
For example, the server reads the CNXN acknowledgment packet from the memory and sends it to the test terminal, such as a PC.
In step 509, the test terminal sends a service start request to the server based on the first wireless connection when receiving the confirmation information.
For example, a test terminal such as a PC may send an OPEN packet to the server upon receiving a CNXN acknowledgement packet.
The information sender identifier is used for identifying an information sender, such as a request sender, a command sender, and the like.
The information sender identification may comprise local-id and the like
For example, the server may forward the OPEN packet to a terminal to be tested, such as an android mobile phone, where the OPEN packet carries a local-id.
510. The server maps the information sender identification into a unique preset identification, and establishes and stores a mapping relation among the information sender identification, the preset identification and the test terminal.
For example, when an automation test is performed based on the Adb protocol, after receiving an OPEN packet sent by a test terminal Client1, a server may map local-id carried by the OPEN packet to unique extra-id, and establish and store a mapping relationship among Client1, local-id, and extra-id, such as Client 1: { local-id, extra-id }.
511. And the server replaces the information sender identification carried by the service starting request with the unique preset identification.
For example, the server may replace the local-id in the OPEN packet with an extra-id.
512. And the server sends the replaced service starting request to the tested terminal based on the second wireless connection.
For example, the server may send an OPEN packet to a terminal under test, such as an android phone.
513. And the tested terminal returns response information of the service starting request to the server, and the response information carries the preset identifier.
For example, the tested terminal, such as an android mobile phone, may return an OPEN acknowledgement packet to the server, where the OPEN acknowledgement packet carries the extra-id.
514. And the server determines the target tested terminal to be sent according to the preset identification carried by the response information and the mapping relation.
For example, the target test terminal Client1 which needs to be sent and the corresponding local-id are determined according to the extra-id and the mapping relation.
515. And the server replaces the preset identification carried by the response information with the corresponding identification of the information sender.
For example, the server replaces the extra-id in the OPEN acknowledgement packet with the corresponding local-id.
516. The server forwards the response information to the test terminal based on the first wireless connection.
The server may forward the OPEN acknowledgement packet to a test terminal such as a PC.
517. And after receiving the response information, the test terminal acquires a test command to be sent.
A test terminal, such as a PC, may begin sending test commands when it receives an OPEN acknowledgement packet.
For example, referring to fig. 4b, the test terminal may obtain the test command input by the user through an Adb Client (android debug bridge Client).
Referring to fig. 5c, each test terminal may be installed with a Client process (i.e., a Client), which may include an Adb Client (an android debug bridge Client), an Adb Server (a Server of the android debug bridge Client). The tested terminal is provided with Adbd (Adb server)
The Adb server is used as a service end of an Adb client, and the Adbd is used as the service end of the Adb server.
(1) The Adb Server runs on a test terminal such as a PC terminal, and when Adb.exe is installed and Adb service is started, the Adb Server runs on the PC terminal all the time as a background process, monitors a local 5037 port and starts to receive an Adb command request of an Adb Client. The function of the system is as a medium for interacting with a mobile phone, a command sent by a user through an Adb Client is monitored, the command is forwarded out and finally received and processed by an Adbd service of a mobile phone end, and an Adbd return result is also sent to the Adb Client through an Adb Server.
(2) The Adb Client runs on a test terminal such as a PC terminal, a shell program used at ordinary times can be regarded as the Adb Client, a TCP connection is established with an Adb Server after one shell program is started, a user can then send a command to the Adb Server through a shell command window, a plurality of shell command windows can be started simultaneously, and the Adb clients and the Adb Server are started to communicate simultaneously.
(3) And the Adbd operates on a tested terminal such as an Android terminal, is a background service and is responsible for processing the received shell command and returning the result.
In some embodiments, the test terminal may pre-store a test command file, and at this time, the test terminal may read a corresponding test command from the test command file.
518. The test terminal sends the test command to the server based on the first wireless connection.
For example, a test terminal such as a PC sends an Adb command to a server.
Wherein, the test command carries an information sender identification, such as local-id.
519. The server forwards the test command to the terminal under test based on the second wireless connection.
For example, the server may forward the Adb command to a terminal under test, such as an android handset.
Specifically, in order to ensure that the server can accurately send the test result to the corresponding test terminal, the server may forward the command in the identifier mapping manner.
For example, the server may obtain an identifier of a sender of information carried by the test command (e.g., an Adb command); mapping the information sender identification (such as local-id) into a unique preset identification (such as extra-id), and establishing and storing a mapping relation among the information sender identification, the preset identification and the test terminal; and replacing the information sender identification carried by the test command with the unique preset identification, and forwarding the replaced test command to the tested terminal.
520. And the tested terminal executes corresponding test operation according to the test command to obtain a test result.
For example, the Adbd in the tested terminal, such as an android mobile phone, can perform corresponding test operations, such as unlocking a screen, opening an application, and the like, and then obtain a corresponding test result.
521. And the tested terminal sends the test result to the server based on the second wireless connection.
For example, the Adbd in the tested terminal, such as an android mobile phone, may send the test result to the server.
In some embodiments, the testing steps executed by the tested terminal side can be implemented by a background service in the QT4A helper application, where the background service is used to assist QT4A automated testing, and is applied to scenarios such as Android outdoor mobile automated testing, remote Android device debugging, and the like.
QT4A: QT4A is a set of Android UI automatic test framework, is currently responsible for development and operation by the group members, and is applied to Android automatic tests of SNG and other BG products.
QT4A assistant: the automatic test system is a part of a QT4A automatic test framework and is an Android apk, and the automatic test system can be installed in an Android mobile phone before QT4A automatic test. The execution step of the terminal to be tested in the test scheme of the embodiment of the invention can be realized by a background service in the QT4A helper.
522. The server forwards the test result to the test terminal based on the first wireless connection.
For example, the server may forward the test result to the test terminal PC on the basis of the TCP connection.
Wherein the test result may include a preset identifier (e.g., extra-id). The server may determine a target test terminal to be sent based on a mapping relationship between the information sender identifier (e.g., local-id), the preset identifier (e.g., extra-id), and the test terminal (e.g., Client), then replace the preset identifier (e.g., extra-id) in the test result with the corresponding information sender identifier (e.g., local-id), and return the replaced test result to the target test terminal, e.g., PC.
In this embodiment, the process of returning the test result by the server is similar to the process of returning the response information of the service start request, and specifically, reference may be made to the foregoing related description.
Referring to fig. 5c, Adb Server, Adb Client, and Adbd are communication roles involved in executing the Adb command, if there is a USB cable connecting the mobile phone and the PC, the user can directly execute the Adb command on the PC to obtain a return result, but the USB connection abandoning scheme of the present invention replaces the data forwarding scheme by the Server service: firstly, TCP connection is respectively established between a Server and an Android terminal as well as between the Server and a Client; and then, an Adb command executed by the Client is sent to the Server, the Adb command is forwarded to an Adbd process of the Android terminal after being packaged and processed by the Server, a processing result of the Adbd is also returned in the original path, the Adb command is sent to the Server and processed by the Server, the Adb command is forwarded to the Client after being processed, and the Client can obtain a command return result and complete a communication process.
As shown in fig. 5a, 5b, and 5c, in the test scheme of the embodiment of the present invention, it is not necessary to limit the tested terminal, such as the Android phone terminal, and the test terminal, such as the PC used by the user, to be in the same local area network. As can be seen from fig. 5b, the communication between the terminal to be tested, such as the Android phone terminal, and the Server on the Server is realized by establishing a TCP connection. The Server is deployed on a Server with a public network ip, the Android end of the tested terminal is an internal network ip, and the public network ip cannot directly initiate a connection request to the internal network ip, so that the Android end actively initiates the connection request to the Server. Similarly, each Client running on a test terminal such as a PC (fig. 5c takes 3 test terminals clients as an example, and multiple clients can actually be concurrent) communicates with the Server, and the Client actively initiates a connection request to the Server. Therefore, the Android end and the PC end do not need to be limited to be in the same local area network by utilizing the Server deployed on the public network ip Server for data forwarding.
In addition, as shown in fig. 5a, 5b, and 5c, the embodiment of the present invention further implements that a plurality of test terminals perform an automated test on the same terminal under test in parallel by two ways, i.e., confirmation information multiplexing and identifier mapping. For example, the function of enabling multiple clients to communicate with the same Android device in parallel is realized through two modes of CNXN packet multiplexing confirmation and local-id mapping, for example, multiple PCs can respectively open an Adb command window of the PCs to send commands to one Android device, and the PCs can respectively obtain expected return results. The whole communication flow is completed by the building.
As can be seen from the above, the test scheme provided in the embodiment of the present invention can implement an automatic test of a terminal based on a wireless connection, implement data forwarding through a server, replace USB data display, and wirelessly connect the terminal by using a USB data line, thereby getting rid of various defects of USB line connection (for example, the automatic test generally requires a large number of mobile phones to perform tasks, and the USB line connection easily causes an equipment failure to identify and drop lines, and the USB socket number of the PC is insufficient, which causes a large number of PC supports or requires other tools such as Hub support, and the USB lines are too many, which causes a complicated line and is difficult to manage), thereby improving efficiency and maintainability of the automatic test of the terminal.
In addition, the automatic test scheme provided by the embodiment of the invention does not need to limit the tested terminal and the test terminal to be in the same network, can realize the automatic test or debugging of the remote terminal, can meet the requirement of outdoor mobile automatic test, meanwhile, even when ip is changed due to WIFI switching or disconnection reconnection and other scenes, manual intervention is not needed (the existing wireless automatic test scheme needs to limit the test terminal and the tested terminal to be in the same local area network, the communication between the test terminal and the tested terminal is interrupted when the ip address of the tested terminal is changed every time, normal communication can be recovered only by executing a connection command again through manual intervention at the test terminal, the labor cost is increased, and complete automatic test cannot be realized), communication can be automatically reconnected and established, and therefore the effects of stronger usability and wider applicable scenes are achieved.
Furthermore, the automatic test scheme provided by the embodiment of the invention can realize that a plurality of test terminals simultaneously communicate with one tested terminal by two modes of confirmation information multiplexing and identification mapping, thereby realizing that the plurality of test terminals automatically test the same tested terminal and improving the accuracy of automatic test.
In order to better implement the above method, an embodiment of the present invention further provides a terminal testing apparatus, which is suitable for a server, and as shown in fig. 6a, the terminal testing apparatus may include: the first connection unit 601, the second connection unit 602, the command receiving unit 603, the command forwarding unit 604, and the result forwarding unit 605 are as follows:
a first connection unit 601, configured to establish a first wireless connection with a test terminal;
a second connection unit 602, configured to establish a second wireless connection with the terminal to be tested;
a command receiving unit 603, configured to receive a test command sent by the test terminal based on the first wireless connection;
a command forwarding unit 604, configured to send the test command to the terminal under test based on the second wireless connection;
a result forwarding unit 605, configured to receive a test result returned by the terminal under test based on the second wireless connection, and send the test result to the test terminal based on the first wireless connection.
In an embodiment, referring to fig. 6b, the terminal testing may further include: a connection confirmation forwarding unit 606;
the connection confirmation forwarding unit 606 is configured to: before the command receiving unit 603 receives a test command, receiving a terminal connection request sent by the test terminal based on the first wireless connection;
determining whether the server stores the confirmation information of the terminal connection request;
if not, sending the terminal connection request to the tested terminal based on the second wireless connection; receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection; storing confirmation information returned by the tested terminal, and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection;
and if so, reading the stored confirmation information of the terminal connection request, and sending the read confirmation information to the test terminal based on the first wireless connection.
In one embodiment, the test command further carries an information sender identifier;
referring to fig. 6c, the command forwarding unit 604 may include:
a first replacing subunit 6041, configured to replace an identifier of an information sender carried by the test command with a unique preset identifier, where the preset identifier corresponds to the terminal under test;
a command sending subunit 6042, configured to send, to the terminal under test, a test command with an identifier replaced based on the second wireless connection;
the result forwarding unit 605 includes:
a determining subunit 6051, configured to determine, according to the preset identifier carried in the test result, a target test terminal that needs to be sent;
a second replacing subunit 6052, configured to replace the preset identifier carried in the test result with the identifier of the information sender;
a result transmitting subunit 6053, configured to transmit the replaced test result to the target test terminal based on the first wireless connection.
In an embodiment, referring to fig. 6d, the terminal testing apparatus further includes: a start service processing unit 607;
the start service processing unit 607, configured to send the confirmation information to the test terminal by the connection confirmation forwarding unit 606, and before the command receiving unit 603 receives the test command;
receiving a service starting request sent by the test terminal based on the first wireless connection, wherein the service starting request carries an information sender identifier;
replacing a sender identifier carried by the service starting request with a unique preset identifier, wherein the preset identifier corresponds to the tested terminal;
sending a service starting request after the identifier replacement to the tested terminal based on the second wireless connection;
receiving response information of a service starting request sent by the tested terminal based on the second wireless connection, wherein the response information carries the preset identification;
determining a target test terminal to be sent according to a preset identifier carried by the response information;
and replacing the preset identification carried by the response information with the identification of the information sender, and sending the replaced response information to the target test terminal based on the first wireless connection.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The terminal testing device may be integrated in a server, for example in the form of a client.
As can be seen from the above, the terminal testing apparatus according to the embodiment of the present invention establishes a first wireless connection with the testing terminal through the first connection unit 601; establishing a second wireless connection with the terminal to be tested by the second connection unit 602; receiving, by the command receiving unit 603, a test command transmitted by the test terminal based on the first wireless connection; sending, by the command forwarding unit 604, a test command to the terminal under test based on the second wireless connection; the result forwarding unit 605 receives the test result returned by the terminal under test based on the second wireless connection and sends the test result to the test terminal based on the first wireless connection. According to the scheme, the automatic test of the terminal can be realized based on wireless connection, the terminal is connected through the USB data line in a wireless mode, and the efficiency and the maintainability of the automatic test of the terminal are improved.
In order to better implement the above method, an embodiment of the present invention further provides a terminal testing apparatus, which is suitable for testing a terminal, and as shown in fig. 7a, the terminal testing apparatus may include: the first connection establishing unit 701, the command acquiring unit 702, the command transmitting unit 703, and the result receiving unit 704 are as follows:
a first connection establishing unit 701, configured to establish a first wireless connection with a server;
a command obtaining unit 702, configured to obtain a test command to be sent, and obtain a test command to be sent;
a command sending unit 703, configured to send a test command to the server based on the first wireless connection;
a result receiving unit 704, configured to receive, based on the first wireless connection, a test result corresponding to the test command returned by the server.
In an embodiment, referring to fig. 7b, the terminal testing apparatus may further include: a first information interaction unit 705;
the first information interaction unit 705 is configured to send a terminal connection request to the server based on the first wireless connection after the first connection establishing unit 701 establishes the first wireless connection with the server and before the command obtaining unit 702 obtains the test command to be sent;
receiving confirmation information of the terminal connection request returned by the server based on the first wireless;
sending a start service request to the server based on the first wireless connection;
and receiving response information of the service starting request returned by the server based on the first wireless.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The terminal testing device may be specifically integrated in a terminal, for example, in a form of a client, where the terminal may be a mobile phone, a tablet computer, or the like.
As can be seen from the above, the terminal testing apparatus according to the embodiment of the present invention establishes the first wireless connection with the server through the first connection establishing unit 701; when establishing a first wireless connection with the server, the command acquiring unit 702 acquires a test command to be sent; sending, by the command sending unit 703, a test command to the server based on the first wireless connection; receiving, by the result receiving unit 704, a test result corresponding to the test command returned by the server based on the first wireless connection. According to the scheme, the automatic test of the terminal can be realized based on wireless connection, the terminal is connected through the USB data line in a wireless mode, and the efficiency and the maintainability of the automatic test of the terminal are improved.
To better implement the above method, an embodiment of the present invention further provides a terminal testing apparatus, which is suitable for being terminated, and as shown in fig. 8a, the terminal testing apparatus may include: the second connection establishing unit 801, the receiving unit 802, the testing unit 803, and the result transmitting unit 804 are as follows:
a second connection establishing unit 801 for establishing a second wireless connection with the server;
a receiving unit 802, configured to receive, based on the second wireless connection, a test command forwarded by a server;
the test unit 803 is configured to execute a corresponding test operation according to the test command to obtain a test result;
a result sending unit 804, configured to return the test result to the server based on the second wireless connection, so that the server forwards the test result to the test terminal.
In an embodiment, referring to fig. 8b, the terminal testing apparatus may further include: a second information interaction unit 805;
the second information interaction unit 805 is configured to, after the second connection establishing unit 801 establishes the second wireless connection with the server, before the receiving unit 803 receives the test command,
receiving a terminal connection request forwarded by the server based on the second wireless connection;
returning confirmation information of the terminal connection request to the server based on the second wireless connection so that the server forwards the confirmation information to the test terminal;
receiving a start service request forwarded by the server based on the second wireless connection;
and returning response information of the service starting request to the server based on the second wireless connection so that the server forwards the response information to the test terminal.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The terminal testing device may be specifically integrated in a terminal, for example, in a form of a client, where the terminal may be a mobile phone, a tablet computer, or the like.
As can be seen from the above, the terminal testing apparatus according to the embodiment of the present invention establishes the second wireless connection through the second connection establishing unit 801; receiving, by the receiving unit 802, a test command forwarded by a server based on the second wireless connection; the test unit 803 executes corresponding test operation according to the test command to obtain a test result; the result sending unit 804 returns the test result to the server based on the second wireless connection, so that the server forwards the test result to the test terminal. According to the scheme, the automatic test of the terminal can be realized based on wireless connection, the terminal is connected through the USB data line in a wireless mode, and the efficiency and the maintainability of the automatic test of the terminal are improved.
In order to better implement the method, the embodiment of the invention also provides a terminal server.
Referring to fig. 9, an embodiment of the present invention provides a server 900, which may include one or more processors 901 of a processing core, one or more memories 902 of a computer-readable storage medium, a Radio Frequency (RF) circuit 903, a power supply 904, an input unit 905, and a display unit 906. Those skilled in the art will appreciate that the server architecture shown in FIG. 9 does not constitute a limitation on the servers, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components. Wherein:
the processor 901 is a control center of the server, connects various parts of the entire server by various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the server. Optionally, processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 901.
The memory 902 may be used to store software programs and modules, and the processor 901 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902.
The RF circuit 903 may be used for receiving and transmitting signals during information transmission and reception, and in particular, for processing downlink information of a base station after being received by one or more processors 901; in addition, data relating to uplink is transmitted to the base station.
The server also includes a power supply 904 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 901 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 904 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may also include an input unit 905, the input unit 905 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The server may also include a display unit 906, and the display unit 906 may be used to display information input by or provided to the user, as well as various graphical user interfaces of the server, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 908 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Specifically, in this embodiment, the processor 901 in the server loads the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and the processor 901 runs the application programs stored in the memory 902, so as to implement various functions as follows:
establishing a first wireless connection with a test terminal;
establishing a second wireless connection with the tested terminal;
receiving a test command sent by the test terminal based on the first wireless connection;
sending the test command to the terminal under test based on the second wireless connection;
and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection.
In some embodiments, after establishing the first wireless connection and the second wireless connection, and before receiving the test command, the processor 901 further performs the following steps:
receiving a terminal connection request sent by the test terminal based on the first wireless connection;
sending the terminal connection request to the tested terminal based on the second wireless connection;
receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection;
and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection.
In some embodiments, before sending the terminal connection request to the terminal under test based on the second wireless connection, the processor 901 further performs the following steps:
determining whether the server stores the confirmation information of the terminal connection request;
if not, executing a step of sending the terminal connection request to the tested terminal based on the second wireless connection;
when the confirmation information returned by the terminal under test is sent to the test terminal based on the first wireless connection, the processor 901 specifically executes the following steps:
and storing the confirmation information returned by the tested terminal, and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection.
In some embodiments, before receiving the test command, the processor 901 specifically performs the following steps:
when the server is determined to store the confirmation information of the terminal connection request, reading the stored confirmation information of the terminal connection request;
sending the read confirmation information to the test terminal based on the first wireless connection.
In some embodiments, the test command carries an information sender identifier; when sending the test command to the terminal under test based on the second wireless connection, the processor 901 specifically executes the following steps:
replacing an information sender identification carried by the test command with a unique preset identification, wherein the preset identification corresponds to the tested terminal;
sending a test command with the replaced identifier to the tested terminal based on the second wireless connection;
when sending the test result to the test terminal based on the first wireless connection, the processor 901 specifically executes the following steps:
determining a target test terminal to be sent according to the preset identification carried by the test result;
replacing the preset identification carried by the test result with the identification of the information sender;
and sending the replaced test result to the target test terminal based on the first wireless connection.
In some embodiments, when the identifier of the information sender carried in the test command is replaced with a unique preset identifier, the processor 901 specifically executes the following steps:
acquiring an information sender identifier carried by the test command;
mapping the information sender identification to be a unique preset identification, and establishing and storing a mapping relation among the information sender identification, the preset identification and the test terminal;
replacing the information sender identification carried by the test command with the unique preset identification;
when determining a target test terminal to be sent according to the preset identifier carried in the test result, the processor 901 specifically executes the following steps:
and determining a target test terminal to be sent and a corresponding information sender identification according to the mapping relation and the preset identification carried by the test result.
In some embodiments, after sending the confirmation information to the test terminal and before receiving the test command, the processor 901 further performs the following steps:
receiving a service starting request sent by the test terminal based on the first wireless connection, wherein the service starting request carries an information sender identifier;
replacing a sender identifier carried by the service starting request with a unique preset identifier, wherein the preset identifier corresponds to the tested terminal;
sending a service starting request after the identifier replacement to the tested terminal based on the second wireless connection;
receiving response information of a service starting request sent by the tested terminal based on the second wireless connection, wherein the response information carries the preset identification;
determining a target test terminal to be sent according to a preset identifier carried by the response information;
and replacing the preset identification carried by the response information with the identification of the information sender, and sending the replaced response information to the target test terminal based on the first wireless connection.
The server can realize the automatic test of the terminal based on the wireless connection, the data forwarding is realized through the server, the USB data display is replaced, the USB data line is wirelessly adopted to connect the terminal, and various defects of the USB line connection are overcome (for example, the automatic test generally needs a large amount of mobile phones to execute tasks, the USB line connection easily causes that equipment cannot be identified and the line is dropped, the number of USB interfaces of the PC is insufficient, so that a large amount of PC support is needed or other tools such as Hub support are used, the number of USB lines is too large, so that the lines are complex and difficult to manage, and the like), and the efficiency and the maintainability of the automatic test of the terminal are improved.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above detailed description is provided for a terminal testing method, apparatus and storage medium provided by the embodiments of the present invention, and the specific examples are applied herein to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. A terminal test method is suitable for a server and is characterized by comprising the following steps:
establishing a first wireless connection with a plurality of test terminals;
establishing a second wireless connection with the tested terminal;
receiving a terminal connection request sent by the test terminal based on the first wireless connection;
determining whether the server stores the confirmation information of the test terminal connection request;
if not, sending the terminal connection request to the tested terminal based on the second wireless connection;
receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection;
sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection;
receiving a test command sent by the test terminal based on the first wireless connection;
sending the test command to the terminal under test based on the second wireless connection;
and receiving a test result returned by the tested terminal based on the second wireless connection, and sending the test result to the test terminal based on the first wireless connection.
2. The terminal testing method of claim 1, wherein the sending the confirmation information returned by the terminal under test to the testing terminal based on the first wireless connection comprises:
and storing the confirmation information returned by the tested terminal, and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection.
3. The terminal test method of claim 1, wherein before receiving the test command, the terminal test method further comprises:
when the server is determined to store the confirmation information of the terminal connection request, reading the stored confirmation information of the terminal connection request;
sending the read confirmation information to the test terminal based on the first wireless connection.
4. A terminal test method according to any of claims 1-3, characterized in that the test command carries an information sender identity;
sending the test command to the terminal under test based on the second wireless connection, including:
replacing an information sender identification carried by the test command with a unique preset identification, wherein the preset identification corresponds to the tested terminal;
sending a test command with the replaced identifier to the tested terminal based on the second wireless connection;
sending the test result to the test terminal based on the first wireless connection, including:
determining a target test terminal to be sent according to the preset identification carried by the test result;
replacing the preset identification carried by the test result with the identification of the information sender;
and sending the replaced test result to the target test terminal based on the first wireless connection.
5. The terminal test method of claim 4, wherein replacing an identifier of an information sender carried by the test command with a unique preset identifier comprises:
acquiring an information sender identifier carried by the test command;
mapping the information sender identification to be a unique preset identification, and establishing and storing a mapping relation among the information sender identification, the preset identification and the test terminal;
replacing the information sender identification carried by the test command with the unique preset identification;
determining a target test terminal to be sent according to the preset identification carried by the test result, including:
and determining a target test terminal to be sent and a corresponding information sender identification according to the mapping relation and the preset identification carried by the test result.
6. The terminal test method according to any one of claims 1 to 5, wherein, after sending the confirmation information to the test terminal and before receiving the test command, the terminal test method further comprises:
receiving a service starting request sent by the test terminal based on the first wireless connection, wherein the service starting request carries an information sender identifier;
replacing a sender identifier carried by the service starting request with a unique preset identifier, wherein the preset identifier corresponds to the tested terminal;
sending a service starting request after the identifier replacement to the tested terminal based on the second wireless connection;
receiving response information of a service starting request sent by the tested terminal based on the second wireless connection, wherein the response information carries the preset identification;
determining a target test terminal to be sent according to a preset identifier carried by the response information;
and replacing the preset identification carried by the response information with the identification of the information sender, and sending the replaced response information to the target test terminal based on the first wireless connection.
7. A terminal test method is suitable for a tested terminal and is characterized by comprising the following steps:
establishing a second wireless connection with the server;
receiving terminal connection requests transmitted by a plurality of test terminals forwarded by the server based on the second wireless connection, wherein the server determines whether confirmation information of the test terminal connection requests is stored before transmitting the terminal connection requests to the tested terminal, and if not, the terminal connection requests are transmitted to the tested terminal based on the second wireless connection;
returning confirmation information of the terminal connection request to the server based on the second wireless connection so that the server forwards the confirmation information to the test terminal;
receiving a test command forwarded by a server based on the second wireless connection, wherein the test command comprises a test command transmitted by one of the plurality of test terminals;
executing corresponding test operation according to the test command to obtain a test result;
and returning the test result to the server based on the second wireless connection so that the server forwards the test result to the test terminal.
8. The terminal test method of claim 7, wherein after the server returns the confirmation information of the terminal connection request and before receiving the test command, the terminal test method further comprises:
receiving a start service request forwarded by the server based on the second wireless connection;
and returning response information of the service starting request to the server based on the second wireless connection so that the server forwards the response information to the test terminal.
9. A terminal testing device is suitable for a server, and is characterized by comprising:
the first connection unit is used for establishing first wireless connection with the plurality of test terminals;
the second connection unit is used for establishing second wireless connection with the tested terminal;
a command receiving unit, configured to receive a test command sent by the test terminal based on the first wireless connection;
the command forwarding unit is used for sending the test command to the tested terminal based on the second wireless connection;
a result forwarding unit, configured to receive a test result returned by the terminal to be tested based on the second wireless connection, and send the test result to the test terminal based on the first wireless connection;
the terminal testing device further comprises a connection confirmation forwarding unit, which is used for receiving a terminal connection request sent by the testing terminal based on the first wireless connection before the command receiving unit receives the testing command;
determining whether the server stores the confirmation information of the test terminal connection request;
if not, sending the terminal connection request to the tested terminal based on the second wireless connection;
receiving confirmation information of the terminal connection request returned by the tested terminal based on the second wireless connection;
and sending the confirmation information returned by the tested terminal to the testing terminal based on the first wireless connection.
10. The terminal test apparatus of claim 9, further comprising: a connection confirmation forwarding unit;
the connection confirmation forwarding unit is configured to: and if so, reading the stored confirmation information of the terminal connection request, and sending the read confirmation information to the test terminal based on the first wireless connection.
11. The terminal test apparatus according to claim 9 or 10, wherein the test command carries an information sender identification;
the command forwarding unit includes:
the first replacement subunit is used for replacing an identifier of an information sender carried by the test command with a unique preset identifier, wherein the preset identifier corresponds to the tested terminal;
the command sending subunit is configured to send a test command with a replaced identifier to the terminal to be tested based on the second wireless connection;
the result forwarding unit includes:
the determining subunit is used for determining a target test terminal to be sent according to the preset identifier carried by the test result;
the second replacement subunit is configured to replace the preset identifier carried in the test result with the identifier of the information sender;
and the result sending subunit is used for sending the replaced test result to the target test terminal based on the first wireless connection.
12. A terminal testing device is suitable for a tested terminal, and is characterized by comprising:
a second connection establishing unit for establishing a second wireless connection with the server;
a receiving unit, configured to receive, based on the second wireless connection, a test command forwarded by a server, where the test command includes a test command sent by one of multiple test terminals;
the test unit is used for executing corresponding test operation according to the test command to obtain a test result;
a result sending unit, configured to return the test result to the server based on the second wireless connection, so that the server forwards the test result to the test terminal;
wherein, the terminal test device further comprises: a second information interaction unit, configured to receive, based on the second wireless connection, terminal connection requests sent by multiple test terminals forwarded by the server after the second connection establishment unit establishes a second wireless connection with the server and before the receiving unit receives the test command, where the server determines whether confirmation information of the test terminal connection requests is stored before sending the terminal connection requests to the tested terminal, and if not, sends the terminal connection requests to the tested terminal based on the second wireless connection;
and returning confirmation information of the terminal connection request to the server based on the second wireless connection so that the server forwards the confirmation information to the test terminal.
13. A storage medium storing instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 8.
CN201711249777.1A 2017-12-01 2017-12-01 Terminal testing method and device and storage medium Active CN109873728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711249777.1A CN109873728B (en) 2017-12-01 2017-12-01 Terminal testing method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711249777.1A CN109873728B (en) 2017-12-01 2017-12-01 Terminal testing method and device and storage medium

Publications (2)

Publication Number Publication Date
CN109873728A CN109873728A (en) 2019-06-11
CN109873728B true CN109873728B (en) 2022-03-08

Family

ID=66914653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711249777.1A Active CN109873728B (en) 2017-12-01 2017-12-01 Terminal testing method and device and storage medium

Country Status (1)

Country Link
CN (1) CN109873728B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795022B (en) * 2019-11-08 2022-03-15 北京字节跳动网络技术有限公司 Terminal testing method, system and storage medium
CN112929226B (en) * 2019-12-06 2023-05-02 深圳富泰宏精密工业有限公司 Test system and method
CN112950608B (en) * 2021-03-15 2023-05-26 读书郎教育科技有限公司 Method for detecting screen pattern and screen flashing of terminal in factory
CN113949727B (en) * 2021-08-26 2024-05-24 深圳市太美亚电子科技有限公司 Internet of things management method
CN113726612B (en) * 2021-09-07 2024-06-25 北京天融信网络安全技术有限公司 Method and device for acquiring test data, electronic equipment and storage medium
CN115827337A (en) * 2021-09-10 2023-03-21 华为技术有限公司 Model testing method and device
CN113992643A (en) * 2021-10-28 2022-01-28 中国银行股份有限公司 Asynchronous message notification method, system, mobile terminal APP and asynchronous notification system
CN116132490A (en) * 2023-01-13 2023-05-16 支付宝(杭州)信息技术有限公司 Remote debugging method and device of equipment and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780602A (en) * 2012-07-31 2012-11-14 深圳市共进电子股份有限公司 Method and device for data transmission
KR101224163B1 (en) * 2012-07-12 2013-01-21 엠티디아이 주식회사 Communication system for controlling test-device remotely and drive method of the same
CN105472083A (en) * 2015-12-08 2016-04-06 北京奇虎科技有限公司 Testing method and system for wireless terminals
CN105512029A (en) * 2015-11-27 2016-04-20 北京奇虎科技有限公司 Method, server and system for testing intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101224163B1 (en) * 2012-07-12 2013-01-21 엠티디아이 주식회사 Communication system for controlling test-device remotely and drive method of the same
CN102780602A (en) * 2012-07-31 2012-11-14 深圳市共进电子股份有限公司 Method and device for data transmission
CN105512029A (en) * 2015-11-27 2016-04-20 北京奇虎科技有限公司 Method, server and system for testing intelligent terminal
CN105472083A (en) * 2015-12-08 2016-04-06 北京奇虎科技有限公司 Testing method and system for wireless terminals

Also Published As

Publication number Publication date
CN109873728A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN109873728B (en) Terminal testing method and device and storage medium
US10959280B2 (en) Communications method of wearable device, communications system, and related device
US9008041B2 (en) Processing method supporting handover, communication apparatus, and communication system
US20130346591A1 (en) Clientless Cloud Computing
CN105450779B (en) The method of one household appliance connection multiserver
EP3763164B1 (en) Electronic device supporting multiple wireless communication protocols and method therefor
CN102447738B (en) A kind of method and device realizing base station remote debugging
US9231907B2 (en) Method for establishing connection between communication apparatuses, communication apparatus, and server apparatus
CN111949456B (en) Automatic serial port protocol testing system and method based on configuration updating
WO2011009308A1 (en) Field service test method, device and system
CN103856374A (en) Data transmission method, terminal and home interconnected system
CN105337814A (en) Network equipment connection method, equipment and system
CN108462984A (en) A kind of method and terminal carrying out access network management
CN115004650B (en) Node configuration method, node configuration device, distributed system and computer readable medium
EP3843481A1 (en) Communication device, method for controlling communication device and program
CN105072148B (en) Method and device for establishing connection with terminal
JP2014143461A (en) Radio base station, radio communication system using the same, and radio communication connection method
CN109302325A (en) Serial server, device management method and readable storage medium storing program for executing
US20200213194A1 (en) Configuration device and method
CN111901395A (en) Multi-cluster switching method and device
CN105282235B (en) A method of solution RPC upgrades unstable in double-PON port ONU
CN110830602A (en) Distribution network terminal communication test system and method based on dynamic domain name resolution
CN213403038U (en) Data transfer unit DTU device
CN219420925U (en) On-off control device of network module and on-off control system of network module
CN102740133A (en) Method, terminal and system for information interaction

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
GR01 Patent grant
GR01 Patent grant