CN105975367B - Test method and device for mobile equipment - Google Patents

Test method and device for mobile equipment Download PDF

Info

Publication number
CN105975367B
CN105975367B CN201610289563.6A CN201610289563A CN105975367B CN 105975367 B CN105975367 B CN 105975367B CN 201610289563 A CN201610289563 A CN 201610289563A CN 105975367 B CN105975367 B CN 105975367B
Authority
CN
China
Prior art keywords
touch
screen
points
test
touch event
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
CN201610289563.6A
Other languages
Chinese (zh)
Other versions
CN105975367A (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 CN201610289563.6A priority Critical patent/CN105975367B/en
Publication of CN105975367A publication Critical patent/CN105975367A/en
Application granted granted Critical
Publication of CN105975367B publication Critical patent/CN105975367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a test method and a test device for mobile equipment. Wherein, the method comprises the following steps: receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile equipment; converting the test command into a touch event recognized and responded by a driving device of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event. The invention solves the technical problem of low test depth caused by only supporting single-point touch of the touch screen when the mobile equipment is tested by the related technology.

Description

Test method and device for mobile equipment
Technical Field
The invention relates to the field of computers, in particular to a method and a device for testing mobile equipment.
Background
With the widespread use of smart mobile devices, in order to improve the performance of the mobile devices, the technology of touch screen operation is very commonly used in automated testing, remote debugging and stress testing of the mobile devices. At present, the commonly used technologies in the prior art include Monkey and Input, where Monkey is a pressure testing tool provided by the Android system, and can be operated in a simulator and actual equipment. The method realizes the pressure test of the pre-issued application program by sending a pseudo-random user event stream to the system. The Monkey is started and then operated as a server-side program, the client-side program establishes network connection with the Monkey and then sends a screen click event and a coordinate point, the Monkey is responsible for responding to the screen click event, and the functions related to the touch screen operation provided in the Monkey comprise screen pressing, screen lifting, screen moving and screen light touch. Input is a tool for inputting commands to control a system at a terminal, and provides functions related to Input and screen clicking operations, such as physical key clicking, screen tapping, and screen sliding.
However, Monkey and Input only support single touch on the screen, and do not support multi-touch of two or more points. In some occasions such as the automatic test of recreation, need both hands simultaneous operation, control direction and skill respectively, there is not the multiple touch and will lead to reducing the test depth, reduce user's use experience. In addition, the Input is started through the adb shell, so that the cost of the adb process is caused to be generated during each Input, and the real-time requirements of screen clicking and sliding in the cloud real machine cannot be met.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing mobile equipment, which are used for at least solving the technical problem of low testing depth caused by only supporting single-point touch of a touch screen when the mobile equipment is tested in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a method for testing a mobile device, including: receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile equipment; converting the test command into a touch event recognized and responded by a driving device of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event.
According to another aspect of the embodiments of the present invention, there is also provided a testing apparatus for a mobile device, including: the mobile device comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is used for receiving a test command, and the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile device; the conversion module is used for converting the test command into a touch event which is recognized and responded by the driving equipment of the touch screen; and the execution module is used for simultaneously executing touch operation on at least two points according to the touch event.
In the embodiment of the invention, the test command is received, wherein the test command is used for simultaneously executing touch operation on at least two points on the touch screen of the mobile equipment; converting the test command into a touch event recognized and responded by a driving device of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event, thereby achieving the purpose of carrying out multi-point touch test on the touch screen of the mobile equipment, realizing the technical effect of improving the test depth of the touch screen of the mobile equipment, and further solving the technical problem of low test depth caused by only supporting single-point touch of the touch screen when the mobile equipment is tested by the related technology.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment for a method of testing a mobile device according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative method of testing a mobile device in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of an alternative method of testing a mobile device in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of an alternative method of testing a mobile device in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of an alternative method of testing a mobile device in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative multi-touch system in accordance with embodiments of the invention;
FIG. 7 is a diagram illustrating the transmission and reception of Touch events during an alternative multi-Touch event in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of an alternative testing apparatus for mobile devices in accordance with embodiments of the present invention;
FIG. 9 is a schematic diagram of an alternative testing apparatus for mobile devices in accordance with embodiments of the present invention;
FIG. 10 is a schematic diagram of an alternative testing apparatus for mobile devices in accordance with embodiments of the present invention;
FIG. 11 is a schematic diagram of an alternative testing apparatus for mobile devices in accordance with embodiments of the present invention; and
fig. 12 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, a method embodiment of a method for testing a mobile device is provided.
Alternatively, in this embodiment, the test method of the mobile device may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The test method of the mobile device according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The terminal 104 may execute the test method of the mobile device according to the embodiment of the present invention by a client installed thereon.
Fig. 2 is a flow chart of an alternative testing method for a mobile device according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
step S202, receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile equipment;
step S204, converting the test command into a touch event which is recognized and responded by the driving equipment of the touch screen;
and step S206, simultaneously executing touch operation on at least two points according to the touch event.
It should be noted that the above steps may be executed by a mobile device to be tested, such as a smart phone, a tablet computer, and the like. And the mobile device to be tested can also be provided with an application program capable of realizing the steps, and the touch screen of the mobile device to be tested is tested by utilizing the application program.
Through the steps S202 to S206, by receiving a test command, where the test command is used to perform a touch operation on at least two points on the touch screen of the mobile device at the same time; converting the test command into a touch event which is recognized and responded by a driver of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event, thereby achieving the purpose of carrying out multi-point touch test on the touch screen of the mobile equipment, further solving the technical problem of low test depth caused by only supporting single-point touch of the touch screen when the mobile equipment is tested by the related technology, and realizing the technical effect of improving the test depth of the touch screen of the mobile equipment.
In the technical scheme provided in step S202, the test command received by the mobile device may be a command for simultaneously performing a touch operation on at least two points on a touch screen of the mobile device, where the mobile device is a mobile device with a touch screen, such as a smart phone, a tablet computer, and the like, it needs to be noted that an operating system on the mobile device may be Android, or may be an IOS, and embodiments of the present invention all use Android devices as examples for description. The touch operations performed on at least two points on the touch screen of the mobile device at the same time may include, but are not limited to, clicking, sliding, tapping, long-pressing, and other operations, which are not illustrated herein. Optionally, the test command received by the mobile device may include at least any one or more of the following parameters: the touch operation type, the touch point coordinates, the touch point pressure value, etc. are only some typical parameters included in the test command, and it should be noted that other parameters may also be included in the test command, which is not illustrated here.
Optionally, the test command received by the mobile device may be generated in any one of the following ways: clicking on applications such as Flash, HTML5 and the like at a Web end through a mouse, corresponding coordinates of a clicking position to mobile equipment to be tested, and further triggering to generate a test command; triggering and generating a test command when two or more points are pressed down on a mobile terminal test tool at the same time, wherein the mobile terminal test tool is an Android Package (APK) program of Android; the test command may be generated randomly or may be a clear and ordered click on the mobile phone where the test tool is located, and then the coordinates are mapped to the mobile device to be tested. Only some of the test command generation methods are listed here, and other generation methods are not illustrated here. After the test command is generated, the test command may be transmitted to the mobile device via a server, a PC device, and the like, where the server may be configured to maintain the Web interface and the mobile terminal test tool, and the PC device may be configured to perform network connection with at least one mobile device and monitor a client program running in the at least one mobile device. It should be noted that the screen click client program related to generating the test command may be run in the server or may be run in the PC device, where the screen click client program generally refers to an initiator of a screen click, and may be a mouse click on Flash, HTML5, or a screen click on the test tool APK. The screen is used for clicking the client program to obtain the test command, for example, when two or more points are pressed down in the mobile terminal test tool at the same time, parameters such as types of all touches and coordinate information at the same time can be respectively obtained through an ontouchvent method of activity or View. The PC equipment runs a screen click management program, after a test command is obtained by a screen click client program, the obtained test command can be sent to the screen click management program, and the test command is sent to the mobile equipment to be tested through the screen click management program. It should be noted that, the embodiment of the present invention does not specifically limit the transmission process of the test command, and the above is only an alternative embodiment, and does not represent that the transmission process of the test command is only one of the above manners. The embodiment of the invention can realize remote operation to test the touch screen of the mobile equipment to be tested, thereby greatly facilitating the testing personnel to test the touch screen of the mobile equipment at any place.
According to the embodiment of the invention, the touch operation can be simultaneously executed on at least two points on the touch screen of the mobile equipment through the test command, so that the technical problem of low test depth caused by only supporting single-point touch of the touch screen when the mobile equipment is tested in the related technology can be solved, and the technical effect of improving the test depth of the touch screen of the mobile equipment is realized.
In the technical solution provided in step S204, after receiving the test command, the mobile device may convert the test command into a touch event that can be recognized and responded by the driving device of the touch screen. The reason that the mobile device needs to convert the test command into a touch event that can be recognized and responded to by the driving device of the touch screen is: the method comprises the steps that touch operations are simultaneously executed on at least two points on a touch screen of the mobile equipment, such as clicking, sliding, light touch and the like, are all realized by sending a certain sequence of touch events to the touch screen, and the function of multi-point touch can be realized by recording the sequence of touch events of the touch screen during multi-point touch, correctly simulating the sequences of touch events and inputting the sequences of touch events into the touch screen. Therefore, the mobile device needs to convert the test command into a touch event after receiving the test command, and the touch event is executed by the driving device of the touch screen, so that the touch operation can be simultaneously executed on at least two points on the touch screen. It should be noted that an application program in a common mobile device does not have a permission to write a touch event into a touch screen, where a write path is a path corresponding to a drive file of a drive device of the touch screen, so that the drive device can execute the drive file conveniently, and further the drive device executes the touch event to achieve the purpose of simultaneously executing touch operations on at least two points on the touch screen, and only system level permissions (such as root, system, and shell) can directly read and write the touch screen. In order to realize direct writing of a touch event into a touch screen to realize testing of the touch screen, the embodiment of the invention can call an adb shell command to start a screen click processing program running in the mobile device by using a screen click management program running in the PC device, and the screen click processing program can be a binary program running on the Android device and is compiled in the Android NDK. And starting a screen click processing program by a screen click management program running in the PC equipment through the adb shell, so that the screen click processing program has shell authority, and reading and writing of the touch screen are realized. The screen click processing program can be used as a background server program on the Android device, and monitors and responds to the input of a touch command of the client program in real time. It should be noted here that the screen click management program may further have the following functions in addition to the foregoing screen click processing program started by the adb shell: when the screen click processing program is abnormal, the screen click processing program is restarted or killed; establishing network connection with a screen click processing program; the interface that provides for external access mainly has:
int TouchDown(int contactId,int x,int y,int pressure);
int TouchUp(int contactId,int x,int y,int pressure);
int TouchMove(int contactId,int x,int y,int pressure);
the parameter conticid represents a sequence of touch points, and is 0 if the touch points are single points, and is 0 if the touch points are multi-points, and 1 and 2 are sequentially back to back. The parameter x represents the x-axis coordinate of the input screen and the parameter y represents the y-axis coordinate of the input screen. The parameter pressure represents the pressure value at the time of screen click. The screen click processing program is connected with the screen click processing program through the network socket, and the screen click action is realized by the screen click processing program.
Specifically, the touch event may be composed of three parts, i.e., Type, Code, and Value, and the parameters related to the multi-touch may be:
SLOT: establishing an ID of a touch point, wherein the ID is 0 when the touch point is clicked; when the multiple points are pressed down simultaneously, the pressing points are respectively 0, 1 and 2, and are sequentially arranged backwards. It should be noted that, the IDs of the touch points when the multiple points are pressed simultaneously may be labeled according to the pressing time sequence, for example, when the first touch point is pressed and is not lifted, the second touch point is pressed, and the first touch point and the second touch point are two points pressed simultaneously on the touch screen, where the labels are 0 and 1, respectively.
POSITION _ X: x-coordinate values representing touch points.
POSITION _ Y: y coordinate values representing touch points.
TRACKING _ ID: representing a unique identification of the initiated touch event.
PRESSURE: indicating the amount of pressure on touch. The parameter is selectable, which may be selected depending on the type or model of the actual mobile device.
TOUCH _ MAJOR: the diameter value of the finger contact TP. The parameter is also an option that can be selected depending on the type or model of the actual mobile device.
For example, to implement simultaneous clicking on two coordinate points (100, 500) and (200, 500) on a touch screen, the screen click handler needs to write the following touch events into a driver file of the driver device of the touch screen:
EV _ ABS _ MT _ SLOT 000000000000// 1 st touch point identification
EV _ ABS _ MT _ POSITION _ X100// 1 st touch point X coordinate
EV _ ABS _ MT _ POSITION _ Y500// Y coordinate of 1 st touch point
EV _ SYN _ REPORT 00000000// perform refresh operation in order to improve the accuracy rate of performing touch events
EV _ ABS _ MT _ SLOT 00000001// 2 nd touch point identification
EV _ ABS _ MT _ POSITION _ X200// 2 nd touch point X coordinate
EV _ ABS _ MT _ POSITION _ Y500// Y coordinate of 2 nd touch point
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ SLOT 00000001// switch to touch Point 2
EV _ ABS _ MT _ TRACKING _ ID ffffffff// 2 nd touch point release
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ SLOT 000000000000// switching to 1 st touch Point
EV _ ABS _ MT _ POSITION _ X200// 1 st touch point X coordinate
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ POSITION _ X300// 1 st touch point X coordinate
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ TRACKING _ ID ffffffff// touch point release No. 1
EV _ SYN _ REPORT 000000000000// execute refresh operation
It should be noted that the above lists only some parameters of the touch event, and there may be other parameters, which are not illustrated here. In the embodiment of the invention, the touch screen is directly read and written without virtual machine overhead, so that the real-time performance of the invention is higher than that of Monkey and Input.
In the technical solution provided in step S206, after the test command is converted into the touch event that can be recognized and responded by the driving device of the touch screen, the converted touch event may be directly written into the driving file of the driving device, so as to directly execute the touch operation corresponding to the touch event on the touch screen, that is, directly execute the touch operation on at least two points in the touch screen simultaneously according to the touch event. It should be noted that the touch event converted according to the test command may include information such as coordinates of a touch point, a touch operation type, and the like, so that after the touch event is written in a drive file of a driving device of the touch screen, the driving device may implement a touch operation on at least two points on the touch screen by executing the drive file.
As an alternative embodiment, fig. 3 is a flowchart of a testing method of another alternative mobile device according to an embodiment of the present invention, and as shown in fig. 3, the step S204 of converting the test command into a touch event recognized and responded by the driving device of the touch screen may include the following steps:
step S2042, at least obtaining test information from the test command, wherein the test information at least includes: coordinates of the at least two points on the touch screen, a type of touch operation, and identifications of the at least two points.
Step S2044, generating a touch event meeting the touch event format according to the test information, where the touch event meeting the touch event format is used to indicate coordinates, a type, and an identifier, and the touch event format is used to indicate at least event parameters of the touch event recognized and responded by the driven device.
It should be noted that the test command received by the mobile device may include test information, where the test information at least includes: the coordinates of the at least two points on the touch screen, the type of the touch operation, and the identifiers of the at least two points are not specifically limited in this embodiment, and the test information may further include other contents, such as pressure values of the at least two points, and the like. Since the touch event formats supported by the touch screens of different mobile devices are different, sending that sequence of touch events to a mobile device that does not support a certain touch event format may result in the mobile device being unresponsive. Therefore, in this alternative embodiment, the screen-click handler in the mobile device generates a touch event that satisfies the touch event format supported by the mobile device according to the test information obtained from the test command. The touch event format herein may be used to indicate at least event parameters of a touch event that can be recognized and responded by a driving device of the touch screen, and the touch event generated according to the touch event format supported by the mobile device, that is, the touch event meeting the touch event format may correctly indicate coordinates of at least two points in the test command on the touch screen, a type of touch operation, identifications of the at least two points, and the like.
According to the optional embodiment, the test command is converted into the touch event meeting the touch event format supported by the mobile device, so that the touch event can be directly written into the drive file of the drive device of the touch screen, and the drive device can directly execute the drive file to simultaneously execute the touch operation on at least two points on the touch screen.
As an alternative embodiment, fig. 4 is a flowchart of another alternative testing method for a mobile device according to an embodiment of the present invention, and as shown in fig. 4, before the step S206 performs a touch operation on at least two points simultaneously according to a touch event, the alternative embodiment may further include: in step S2051, attribute information of the mobile device is acquired, where the attribute information is used to indicate a path of a driver file of the driver device. Accordingly, the step S206 of simultaneously performing the touch operation on at least two points according to the touch event may include: in step S2061, the touch event is written into the driver file of the driver device according to the path indicated by the attribute information, so as to perform the touch operation on at least two points simultaneously.
It should be noted that after the test command received by the mobile device is converted into the touch event that can be recognized and responded by the driving device of the touch screen, the touch event is written into the driving file of the driving device of the touch screen, and the driving file is executed by using the driving device, so that the touch operation can be executed on at least two points in the touch screen according to the touch event. The optional embodiment obtains the attribute information of the mobile device, wherein the attribute information of the mobile device may be used to indicate a path of the driver file of the driver device, and may obtain the path of the driver file of the driver device. It should be noted that the attribute information of the mobile device can also be used to indicate other contents, such as the name of the driving device, the supported touch event format, and the like, which are not illustrated herein.
After the path of the drive file of the drive device is acquired, step S206 may include directly writing the touch event into the drive file according to the path corresponding to the drive file, so that the drive device executes the drive file written with the touch event, thereby achieving the purpose of simultaneously executing touch operations on at least two points in the touch screen. Meanwhile, the simultaneous touch operations on at least two points in the touch screen are realized by executing, by a driving device of the touch screen, a drive file written with a touch event containing information such as coordinates of at least two points on the touch screen and a touch operation type. After the touch event is written into the driver file, it can represent that the touch operation is performed on at least two points in the touch screen at the same time.
In this alternative embodiment, the screen click processing program running in the mobile device may be used to obtain the attribute information of the mobile device through the Linux I/O control function during initialization, and may also be used to obtain the attribute information of the mobile device by other means, which is not specifically limited herein. It should be noted that, the alternative embodiment only writes event events supported by the mobile device, and the purpose of being compatible with various types of touch screens can be achieved.
As an alternative embodiment, as shown in fig. 4, before the touch operation is performed on at least two points simultaneously according to the touch event in step S206, the alternative embodiment may further include: step S2052, receiving an authority granting command, wherein the authority granting command is used for acquiring the authority for reading and writing the drive file of the drive device of the touch screen; step S2053, acquires the right in response to the right grant command.
It should be noted that, an application program in a common mobile device has no authority to write a touch event into a drive file of a drive device of a touch screen, and only system-level authorities (such as root, system, and shell) can directly read and write the drive file of the drive device of the touch screen. In order to implement direct writing of a touch event into a drive file of a drive device of a touch screen to implement testing of the touch screen, in the optional embodiment, a screen click management program running in a PC device may be used to call an adb shell to start a screen click processing program in a mobile device, so that the screen click processing program has a right to read and write the drive file of the drive device of the touch screen. In step S2052, the permission grant command received by the mobile device is an adb shell command called by the screen click manager. And the screen click processing program responds to the adb shell command sent by the screen click management program after receiving the adb shell command so as to realize the permission of reading and writing the drive file of the drive equipment of the touch screen.
According to the optional embodiment, the permission of reading and writing the drive file of the drive device of the touch screen is granted to the screen click processing program running in the mobile device, so that the effect of avoiding the overhead of the virtual machine and further improving the real-time performance can be achieved.
As an alternative embodiment, fig. 5 is a flowchart of another alternative testing method for a mobile device according to an embodiment of the present invention, and as shown in fig. 5, the step S206 of simultaneously performing a touch operation on at least two points according to a touch event may include: step S2062, performing a touch operation on at least two points simultaneously according to the touch event by the screen click processing program running on the mobile device. Accordingly, after receiving the test command at step S202, this alternative embodiment may further include: step S2032, receiving a control instruction; step S2034, restarting or killing the screen click handler with the abnormality in response to the control instruction.
It should be noted that step S206 in this alternative embodiment may be executed by a screen-click processing program running in the mobile device, and the screen-click processing program may be used to implement simultaneous touch operations on at least two points in the touch screen according to the touch event. The screen click processing program is started by a screen click management program running in the PC device, and when the screen click processing program is abnormal, the screen click management program can restart or kill the abnormal screen click processing program. In this optional embodiment, the control instruction increased in step S2032 and step S2034 is sent by the screen click management program to the screen click processing program, and is used to instruct the screen click processing program to restart or kill the screen click processing program under the abnormal condition, so as to achieve the purpose of repairing the abnormal screen click processing program.
According to the optional embodiment, when the screen click processing program is abnormal, the abnormal screen click processing program can be accurately restarted or killed through the steps, so that the running stability of the mobile equipment is improved, and the safety and reliability of the execution of the test of the mobile equipment are improved.
As an alternative embodiment, the touch operations performed on at least two points on the touch screen simultaneously in the embodiments of the present invention include at least one of: click, slide, touch. It should be noted that the touch operations performed on at least two points on the touch screen of the mobile device at the same time may include, but are not limited to, the above operations, and may also include other operations, such as long press, and the like, which are not illustrated herein. The optional embodiment can meet various requirements in actual tests by setting various types of touch operations simultaneously executed on at least two points in the touch screen, and further achieves the effect of improving the test depth of the touch screen.
The present invention also provides a preferred embodiment, which provides a method and a multi-touch system for implementing multi-touch to a mobile device (such as a mobile phone). It should be noted that the multi-touch method of the preferred embodiment may be implemented in a multi-touch system, taking a mobile phone as an example, and fig. 6 is a schematic diagram of an alternative multi-touch system according to an embodiment of the present invention, as shown in fig. 6, the system may include: the system comprises a Web interface, a mobile terminal testing tool, a server, PC equipment and at least one target mobile phone, namely a target mobile phone 1 to a target mobile phone n, wherein the target mobile phone to the target mobile phone n and the PC equipment form a testing environment.
It should be noted that, in the multi-Touch system, a screen click processing program (TouchServer) is run in the target mobile phone, and is mainly responsible for converting a received screen click command into a Touch event that can be recognized and responded by the Touch screen driver. A screen click management program (TouchController) is operated in the PC equipment and is mainly used for managing touchServer programs of a target mobile phone end through adb, and the touchServer programs comprise processes of pulling up, restarting and killing; establishing network connection with a TouchServer; and providing an API interface which can be used in a public way for the outside. A screen click client program runs in the Web interface and the mobile terminal testing tool and is mainly responsible for maintaining applications such as Flash, HTML and the like of the Web terminal and the mobile terminal testing tool, wherein the input of a remote target mobile phone is carried out by clicking the Web terminal through a mouse; and performing remote input of the remote target mobile phone on the mobile terminal testing tool by clicking a screen.
The following respectively describes in detail a screen click handler (TouchServer), a screen click manager (TouchController), and a screen click client, specifically:
1. screen click processing program (touchServer)
The screen click processing program (TouchServer) is a binary program which can run on Android equipment and is compiled in Android NDK. The program calls an adb shell command to start through a PC (personal computer) end, and the program defaults to have the permission of a shell user. The method is used as a background server program on the Android device and monitors Touch command input of the client program.
It should be noted that there is no authority on a normal cell phone application to write Touch events to the Touch screen device (/ dev/input/eventX). Only system level permissions (root, system, shell) can directly read and write the files of the touch screen device. And the PC equipment starts a screen click processing program (touchServer) through the adb shell, so that the screen click program (touchServer) has shell authority, and the reading and writing of the touch screen equipment are realized.
Clicking, sliding and tapping are all realized by sending a certain sequence of Touch events to the Touch screen device. The Touch event sequence of the Touch screen equipment during multi-point Touch is recorded and correctly simulated, and the Touch event sequence is input into the Touch screen equipment, so that the multi-point Touch function can be realized. The Touch event consists of three parts, namely Type, Code and Value, and parameters related to multi-point Touch comprise:
SLOT: establishing the ID of Touch connection, wherein the ID is 0 when clicking; when the multiple points are pressed down simultaneously, the pressing points are respectively 0, 1 and 2, and are sequentially arranged backwards.
POSITION _ X: x coordinate value of touch point
POSITION _ Y: y coordinate value of touch point
TRACKING _ ID: unique identification of initiated Touch event
PRESSURE: magnitude of pressure at Touch
TOUCH _ MAJOR: representing the diameter value of the finger touch TP.
For example, to achieve simultaneous clicking on two coordinate points (100, 500) and (200, 400). The screen click handler needs to write the following Touch event to the Touch screen device.
Identification of EV _ ABS _ MT _ SLOT 000000000000// 1 st Point
EV _ ABS _ MT _ POSITION _ X100// X coordinate of point 1
EV _ ABS _ MT _ POSITION _ Y500// Y coordinate of point 1
EV_SYN SYN_REPORT 00000000
EV _ ABS _ MT _ SLOT 00000001// 2 nd Point identification
EV _ ABS _ MT _ POSITION _ X200// 2 nd point X coordinate
EV _ ABS _ MT _ POSITION _ Y500// Y coordinate of 2 nd point
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ SLOT 00000001// switch to touch Point 2
EV _ ABS _ MT _ TRACKING _ ID ffffffff// 2 nd touch point release
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ SLOT 000000000000// switching to 1 st touch Point
EV _ ABS _ MT _ POSITION _ X200// 1 st touch point X coordinate
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ POSITION _ X300// 1 st touch point X coordinate
EV _ SYN _ REPORT 000000000000// execute refresh operation
EV _ ABS _ MT _ TRACKING _ ID ffffffff// touch point release No. 1
EV _ SYN _ REPORT 000000000000// execute refresh operation
It should be noted that Touch event types supported by Touch screen devices of different mobile phones are different. Sending that sequence of Touch events to a handset device that does not support a certain Touch parameter type may result in the handset device not responding. The screen click processing program can acquire the attribute information of the equipment through a Linux I/O control function during initialization, only writes event events supported by the equipment, and can realize compatibility with various types of touch screen equipment.
Because both Monkey and Input are based on the application on the Android virtual machine, the method directly reads and writes the touch screen device without the overhead of the virtual machine. Therefore, the real-time performance of the invention is higher than that of Monkey and Input.
2. Screen click management program (TouchController)
The screen click management program (TouchController) runs on the PC device and has the main functions of:
(1) and starting a screen click processing program (TouchServer) through the adb shell, and restarting or killing the abnormal screen click processing program (TouchServer) when the screen click processing program (TouchServer) is abnormal.
(2) And establishing network connection with a screen click processing program (TouchServer).
(3) An interface is provided for external access. Mainly comprises the following steps:
int TouchDown(int contactId,int x,int y,int pressure);
int TouchUp(int contactId,int x,int y,int pressure);
int TouchMove(int contactId,int x,int y,int pressure);
the parameter conticid represents a sequence of touch points, and is 0 if the touch points are single points, and is 0 if the touch points are multi-points, and 1 and 2 are sequentially back to back. The parameter x represents the x-axis coordinate of the input screen and the parameter y represents the y-axis coordinate of the input screen. The parameter pressure represents the pressure value at the time of screen click. The method comprises the steps that network connection is established between the method and the device through a network socket and a screen click processing program (TouchServer), and screen click action is realized through the screen click processing program (TouchServer).
3. Screen-click client program
The screen click client program generally refers to an initiator of screen click, and may be a mouse click on Flash and HTML5 on the Web side, or a screen click on the mobile terminal test tool apk.
When a mouse is clicked on Flash and HTML5, firstly, the coordinate of the clicked position is corresponded to the target mobile phone, and then an interface provided by a screen click management program (TouchController) is called to click the screen.
The mobile terminal testing tool is an Android apk program, when two or more points are pressed down on the mobile terminal testing tool at the same time, types and coordinate information (contained in a MotionEvent parameter) of all Touch at the same time can be respectively obtained by an Activity or View ontouchvent (MotionEvent event) method, and the information is sent to a screen click management program (touchroller) of the target equipment according to the received sequence, so that the function of remote multi-point Touch can be realized. Here, the mobile terminal testing tool may run on any version of Android device, and may control all devices in a testing environment.
FIG. 7 is a diagram illustrating the sending and receiving of Touch events during an optional multi-Touch according to an embodiment of the present invention, as shown in FIG. 7, a screen-click client program first sends a sequence of Touch events to a server; then the server forwards the Touch event to a screen click management program; and the screen click management program adapts and processes the Touch event sequence and then sends the Touch event sequence to the screen click processing program. The Touch event sequence transmission process is a flow of the test method of the mobile device according to the embodiment of the invention, and the screen click processing program sequentially returns the execution results to the screen click management program, the server and the screen click client program after simultaneously executing Touch operations on at least two points in the Touch screen according to the Touch event sequence.
The test method of the mobile equipment of the embodiment of the invention can achieve the following technical effects:
1. the real-time performance is improved. The cloud real machine can display the picture of the mobile device in real time, and can click and slide the mobile device at the Web end by using a mouse, which has high real-time requirements. The invention can realize smaller time delay than Monkey and Input and meet the real-time click requirement of the cloud real machine.
2. And realizing multi-point touch. In the cloud real machine, the application program is remotely installed on the target mobile device at the cloud end, meanwhile, the mobile terminal testing tool is installed in the mobile device of the tester, the application scene of the target mobile device can be remotely controlled through the mobile terminal testing tool, and therefore the testing depth of the control type application can be greatly improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the test device of the mobile equipment is also provided for implementing the test method of the mobile equipment. Fig. 8 is a schematic diagram of an alternative testing apparatus for a mobile device according to an embodiment of the present invention, as shown in fig. 8, the apparatus may include:
a first receiving module 22, configured to receive a test command, where the test command is used to perform a touch operation on at least two points on a touch screen of the mobile device at the same time; a conversion module 24, configured to convert the test command into a touch event recognized and responded by a driving device of the touch screen; and an executing module 26, configured to execute a touch operation on at least two points simultaneously according to the touch event.
It should be noted that the first receiving module 22 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the converting module 24 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, and the executing module 26 in this embodiment may be configured to execute step S206 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, the purpose of carrying out multi-point touch test on the touch screen of the mobile equipment can be achieved, the technical problem that the test depth is low due to the fact that only single-point touch of the touch screen is supported when the mobile equipment is tested in the related art is solved, and the technical effect of improving the test depth of the touch screen of the mobile equipment is achieved.
As an alternative embodiment, fig. 9 is a schematic diagram of a testing apparatus of another alternative mobile device according to an embodiment of the present invention, and as shown in fig. 9, the conversion module 24 may include: a first obtaining module 242, configured to obtain at least test information from the test command, where the test information at least includes: coordinates of the at least two points on the touch screen, types of touch operations and identifications of the at least two points; a generating module 244, configured to generate, according to the test information, a touch event satisfying a touch event format, where the touch event satisfying the touch event format is used to indicate coordinates, a type and an identification, and the touch event format is used to indicate at least event parameters of the touch event recognized and responded by the driven device.
It should be noted that the first obtaining module 242 in this embodiment may be configured to execute step S2042 in embodiment 1 of this application, and the generating module 244 in this embodiment may be configured to execute step S2044 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
As an alternative embodiment, fig. 10 is a schematic diagram of another alternative testing apparatus for a mobile device according to an embodiment of the present invention, and as shown in fig. 10, the apparatus may further include: a second obtaining module 251, configured to obtain attribute information of the mobile device before performing a touch operation on at least two points simultaneously according to the touch event, where the attribute information is used to indicate a path of a driver file of the driver device; the execution module 26 may include: and a writing module 261, configured to write the touch event into a drive file of the drive device according to the path indicated by the attribute information, so as to perform a touch operation on at least two points simultaneously.
It should be noted that the second obtaining module 251 in this embodiment may be configured to execute step S2051 in embodiment 1 of this application, and the writing module 261 in this embodiment may be configured to execute step S2061 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 10, the apparatus may further include: a second receiving module 252, configured to receive an authority granting command before performing a touch operation on at least two points simultaneously according to a touch event, where the authority granting command is used to obtain an authority for reading and writing a drive file of a drive device of a touch screen; and a first response module 253 for responding to the permission granting command to acquire the permission.
It should be noted that the second receiving module 252 in this embodiment may be configured to execute step S2052 in embodiment 1 of this application, and the first responding module 253 in this embodiment may be configured to execute step S2053 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
As an alternative embodiment, fig. 11 is a schematic diagram of a testing apparatus of another alternative mobile device according to an embodiment of the present invention, and as shown in fig. 11, the executing module 26 may include: the first sub-execution module 262 is configured to execute a touch operation on at least two points simultaneously according to a touch event through a screen-click handler running on the mobile device. The apparatus may further include: a third receiving module 232, configured to receive a control instruction after receiving the test command; and a second response module 234, configured to restart or kill the screen click handler with the exception in response to the control instruction.
It should be noted that the first sub-execution module 262 in this embodiment may be configured to execute step S2062 in embodiment 1 of this application, the third receiving module 232 in this embodiment may be configured to execute step S2032 in embodiment 1 of this application, and the second responding module 234 in this embodiment may be configured to execute step S2034 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
As an alternative embodiment, the touch operations performed on at least two points on the touch screen simultaneously in the embodiments of the present invention include at least one of: click, slide, touch. It should be noted that the touch operations performed on at least two points on the touch screen of the mobile device at the same time may include, but are not limited to, the above operations, and may also include other operations, such as long press, and the like, which are not illustrated herein. The optional embodiment can meet various requirements in actual tests by setting various types of touch operations simultaneously executed on at least two points in the touch screen, and further achieves the effect of improving the test depth of the touch screen.
Example 3
According to the embodiment of the invention, the server or the terminal for implementing the test method of the mobile equipment is also provided.
Fig. 12 is a block diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 12, the terminal may include: one or more processors 201 (only one is shown), a memory 203, and a transmission device 205 (such as the transmission device in the above embodiment), as shown in fig. 12, the terminal may further include an input/output device 207.
The memory 203 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for testing a mobile device in the embodiments of the present invention, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 203, so as to implement the above-described method for testing a mobile device. The memory 203 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include memory located remotely from the processor 201, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 205 is used for receiving or sending data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 203 is specifically used for storing application programs.
The processor 201 may call the application stored in the memory 203 via the transmission means 205 to perform the following steps: receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile equipment; converting the test command into a touch event recognized and responded by a driving device of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event.
The processor 201 is further configured to perform the following steps: obtaining at least test information from the test command, wherein the test information at least comprises: coordinates of the at least two points on the touch screen, types of touch operations and identifications of the at least two points; and generating a touch event meeting a touch event format according to the test information, wherein the touch event meeting the touch event format is used for indicating coordinates, type and identification, and the touch event format is used for indicating at least event parameters of the touch event recognized and responded by the driven device.
The processor 201 is further configured to perform the following steps: before touch operation is simultaneously executed on at least two points according to a touch event, acquiring attribute information of the mobile equipment, wherein the attribute information is used for indicating a path of a drive file of the drive equipment; the simultaneously performing the touch operation on the at least two points according to the touch event includes: and writing the touch event into a drive file of the drive device according to the path indicated by the attribute information so as to simultaneously execute touch operation on at least two points.
The processor 201 is further configured to perform the following steps: before touch operation is simultaneously executed on at least two points according to a touch event, an authority granting command is received, wherein the authority granting command is used for acquiring the authority of reading and writing a drive file of a drive device of a touch screen; and responding to the authority granting command to acquire the authority.
The processor 201 is further configured to perform the following steps: simultaneously executing touch operation on at least two points according to the touch event by a screen click processing program running on the mobile equipment; after receiving the test command, receiving a control instruction; and restarting or killing the abnormal screen click processing program in response to the control instruction.
The embodiment of the invention provides a test scheme of mobile equipment. The method comprises the steps of receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile equipment; converting the test command into a touch event which is recognized and responded by a driver of the touch screen; and simultaneously executing touch operation on at least two points according to the touch event, thereby achieving the purpose of carrying out multi-point touch test on the touch screen of the mobile equipment, further solving the technical problem of low test depth caused by only supporting single-point touch of the touch screen when the mobile equipment is tested by the related technology, and realizing the technical effect of improving the test depth of the touch screen of the mobile equipment.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 12 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 12 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
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 a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing a test method of a mobile device.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, receiving a test command, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile device;
s2, converting the test command into a touch event which is recognized and responded by the driving device of the touch screen;
and S3, simultaneously executing touch operation on at least two points according to the touch event.
Optionally, the storage medium is further arranged to store program code for performing the steps of: obtaining at least test information from the test command, wherein the test information at least comprises: coordinates of the at least two points on the touch screen, types of touch operations and identifications of the at least two points; and generating a touch event meeting a touch event format according to the test information, wherein the touch event meeting the touch event format is used for indicating coordinates, type and identification, and the touch event format is used for indicating at least event parameters of the touch event recognized and responded by the driven device.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before touch operation is simultaneously executed on at least two points according to a touch event, acquiring attribute information of the mobile equipment, wherein the attribute information is used for indicating a path of a drive file of the drive equipment; the simultaneously performing the touch operation on the at least two points according to the touch event includes: and writing the touch event into a drive file of the drive device according to the path indicated by the attribute information so as to simultaneously execute touch operation on at least two points.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before touch operation is simultaneously executed on at least two points according to a touch event, an authority granting command is received, wherein the authority granting command is used for acquiring the authority of reading and writing a drive file of a drive device of a touch screen; and responding to the authority granting command to acquire the authority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: simultaneously executing touch operation on at least two points according to the touch event by a screen click processing program running on the mobile equipment; after receiving the test command, receiving a control instruction; and restarting or killing the abnormal screen click processing program in response to the control instruction.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A test method of mobile equipment is characterized in that the mobile equipment is connected with PC equipment, the PC equipment is connected with a server, and the server is connected with a webpage end or a mobile test tool, and the method comprises the following steps:
receiving a test command generated by a screen-click client program forwarded by the server, wherein the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile device, and the screen-click client program runs in the web page terminal or the mobile test tool corresponding to the mobile device;
obtaining at least test information from the test command, wherein the test information at least comprises: coordinates of the at least two points on the touch screen, the type of the touch operation and identifications of the at least two points;
generating the touch event satisfying a touch event format according to the test information, wherein the touch event satisfying the touch event format is used for indicating the coordinates, the type and the identification, and the touch event format is used for indicating at least event parameters of the touch event recognized and responded by a driven device;
acquiring attribute information of the mobile equipment, wherein the attribute information is used for indicating a path of a drive file of the drive equipment;
writing the touch event into a drive file of the drive device according to the path indicated by the attribute information so as to simultaneously execute the touch operation on the at least two points.
2. The method of claim 1, further comprising, prior to performing the touch operation on the at least two points simultaneously according to the touch event:
receiving an authority granting command, wherein the authority granting command is used for acquiring the authority for reading and writing the drive file of the drive device of the touch screen;
and responding to the permission granting command to acquire the permission.
3. The method of claim 1,
the simultaneously performing the touch operation on the at least two points according to the touch event includes: simultaneously executing the touch operation on the at least two points according to the touch event through a screen click processing program running on the mobile equipment;
after receiving the test command, the method further comprises: receiving a control instruction; and responding to the control instruction to restart or kill the abnormal screen click processing program.
4. The method according to any one of claims 1 to 3, wherein the touch operation comprises at least one of: click, slide, touch.
5. A testing device of mobile equipment is characterized in that the mobile equipment is connected with PC equipment, the PC equipment is connected with a server, the server is connected with a webpage end or a mobile testing tool, and the device comprises:
the mobile device comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a test command which is generated by a screen click client program and is forwarded by a server, the test command is used for simultaneously executing touch operation on at least two points on a touch screen of the mobile device, and the screen click client program runs in the webpage end or the mobile test tool corresponding to the mobile device;
a first obtaining module, configured to obtain at least test information from the test command, where the test information at least includes: coordinates of the at least two points on the touch screen, the type of the touch operation and identifications of the at least two points;
a generating module, configured to generate the touch event satisfying a touch event format according to the test information, where the touch event satisfying the touch event format is used to indicate the coordinate, the type, and the identifier, and the touch event format is used to indicate at least an event parameter of a touch event recognized and responded by a driven device;
a second obtaining module, configured to obtain attribute information of the mobile device before the touch operation is performed on the at least two points simultaneously according to the touch event, where the attribute information is used to indicate a path of a driver file of the driver device;
and the writing module is used for writing the touch event into a drive file of the drive equipment according to the path indicated by the attribute information so as to simultaneously execute the touch operation on the at least two points.
6. The apparatus of claim 5, further comprising:
a second receiving module, configured to receive an authority granting command before the touch operation is simultaneously performed on the at least two points according to the touch event, where the authority granting command is used to obtain an authority for reading and writing a drive file of a drive device of the touch screen;
and the first response module is used for responding the permission granting command to acquire the permission.
7. The apparatus of claim 5, further comprising:
the first sub-execution module is used for simultaneously executing the touch operation on the at least two points according to the touch event through a screen click processing program running on the mobile equipment;
the third receiving module is used for receiving the control instruction after receiving the test command; and the second response module is used for responding to the control instruction to restart or kill the screen click processing program with the exception.
8. The apparatus according to any of claims 5 to 7, wherein the touch operation comprises at least one of: click, slide, touch.
9. A computer storage medium, characterized in that it stores a program code for implementing the method of any of the preceding claims 1 to 4 when executed by a processor.
CN201610289563.6A 2016-04-29 2016-04-29 Test method and device for mobile equipment Active CN105975367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610289563.6A CN105975367B (en) 2016-04-29 2016-04-29 Test method and device for mobile equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610289563.6A CN105975367B (en) 2016-04-29 2016-04-29 Test method and device for mobile equipment

Publications (2)

Publication Number Publication Date
CN105975367A CN105975367A (en) 2016-09-28
CN105975367B true CN105975367B (en) 2022-03-25

Family

ID=56993662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610289563.6A Active CN105975367B (en) 2016-04-29 2016-04-29 Test method and device for mobile equipment

Country Status (1)

Country Link
CN (1) CN105975367B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684218A (en) * 2018-12-26 2019-04-26 世纪龙信息网络有限责任公司 Test macro and test method based on cloud prototype
CN109600282A (en) * 2018-12-26 2019-04-09 世纪龙信息网络有限责任公司 Test macro and test method based on cloud prototype
CN112445356A (en) * 2019-08-28 2021-03-05 北京钛方科技有限责任公司 Method, device and system for testing and calibrating touch component
CN111651232A (en) * 2020-06-10 2020-09-11 网易(杭州)网络有限公司 One-machine multi-control method, device and system and electronic equipment
CN111866160B (en) * 2020-07-28 2023-09-15 网易(杭州)网络有限公司 Multi-machine control method, device, equipment and storage medium
CN112100076B (en) * 2020-09-24 2022-11-11 腾讯科技(深圳)有限公司 Game testing method, related device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681942A (en) * 2012-04-21 2012-09-19 北京迈凯互动网络科技有限公司 Testing method and system of mobile application
CN103678132A (en) * 2013-12-18 2014-03-26 中国科学院深圳先进技术研究院 Application software cloud testing system
CN104536888A (en) * 2014-12-24 2015-04-22 网易(杭州)网络有限公司 Game testing method and system for mobile devices

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193863A (en) * 2011-04-26 2011-09-21 青岛海信移动通信技术股份有限公司 Method and device for implementing multi-point touch operation
CN102521118B (en) * 2011-11-11 2014-12-10 福建星网视易信息系统有限公司 Automatic testing method of Android program
US9891727B2 (en) * 2012-03-08 2018-02-13 Google Llc Simulating multi-touch events on a browser system
CN103810089B (en) * 2012-11-12 2021-12-03 Sap欧洲公司 Automatically testing gesture-based applications
CN103353858B (en) * 2013-06-06 2016-03-16 百度在线网络技术(北京)有限公司 A kind of automated testing method based on action touch simulation and device
CN105005529B (en) * 2014-04-16 2018-10-23 腾讯科技(深圳)有限公司 A kind of method and device that application program is tested
CN104536889A (en) * 2014-12-26 2015-04-22 北京奇虎科技有限公司 Method and system for testing user interface, use case management platform and operating terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681942A (en) * 2012-04-21 2012-09-19 北京迈凯互动网络科技有限公司 Testing method and system of mobile application
CN103678132A (en) * 2013-12-18 2014-03-26 中国科学院深圳先进技术研究院 Application software cloud testing system
CN104536888A (en) * 2014-12-24 2015-04-22 网易(杭州)网络有限公司 Game testing method and system for mobile devices

Also Published As

Publication number Publication date
CN105975367A (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN105975367B (en) Test method and device for mobile equipment
CN108845930B (en) Interface operation test method and device, storage medium and electronic device
CN112380093A (en) Operation and maintenance processing method and device and computer equipment
CN104765678A (en) Method and device for testing applications on mobile terminal
CN104699591A (en) Reappearing method and device of test scenes
CN101853157B (en) Automatic identification method for application software GUI object
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN108234659B (en) Data processing method, device and system
CN104536776A (en) Method and device for running plug-in application in plug-in running environment at host end
CN104426945B (en) A kind of method, apparatus and system obtaining application performance data
CN104298602A (en) Method and device for debugging application program
CN104935639A (en) Intelligent terminal, and applied distributed exploitation system and method
CN104102578A (en) Test method and system and operation terminal
CN110750453B (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
CN108132832B (en) Application program starting method and device
CN108654088B (en) Program debugging method and device, storage medium and electronic device
CN113722164A (en) Method, system and storage medium for automatic testing of mobile terminal and remote real machine debugging
CN109634856B (en) IOS intelligent terminal remote real machine debugging system and method based on cloud service
CN105808419B (en) Application testing method and terminal
CN107391354B (en) Method and system for automatically monitoring terminal performance and storage device
CN112131092A (en) Page debugging method and device
CN109583192A (en) A kind of fixed safety system of mobile terminal application and method based on emulation
CN110795330A (en) Monkey pressure testing method and device
CN112506729B (en) Fault simulation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant