CN109144881B - Monkey testing method, apparatus, terminal device and storage medium - Google Patents

Monkey testing method, apparatus, terminal device and storage medium Download PDF

Info

Publication number
CN109144881B
CN109144881B CN201811045392.8A CN201811045392A CN109144881B CN 109144881 B CN109144881 B CN 109144881B CN 201811045392 A CN201811045392 A CN 201811045392A CN 109144881 B CN109144881 B CN 109144881B
Authority
CN
China
Prior art keywords
area
determining
interface
tested
operable
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
CN201811045392.8A
Other languages
Chinese (zh)
Other versions
CN109144881A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201811045392.8A priority Critical patent/CN109144881B/en
Publication of CN109144881A publication Critical patent/CN109144881A/en
Application granted granted Critical
Publication of CN109144881B publication Critical patent/CN109144881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Landscapes

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

Abstract

The embodiment of the invention provides a Monkey testing method, a Monkey testing device, terminal equipment and a storage medium, wherein the Monkey testing method comprises the following steps: displaying an interface to be tested; determining a first operable area located in the interface to be tested; generating a first pseudo-random event on the first actionable area and executing the first pseudo-random event. Therefore, the testing efficiency of the terminal equipment is improved.

Description

Monkey testing method, apparatus, terminal device and storage medium
Technical Field
The application relates to the technical field of software testing, in particular to a Monkey testing method, a Monkey testing device, terminal equipment and a storage medium.
Background
The Monkey test is used for testing the stability of the application program and the compatibility of the application program with the terminal equipment, and generally the Monkey test is as follows: the random pseudo input event, such as click operation, touch operation or sliding operation, is generated by a test program running in the terminal equipment. If the application program is in error flash quit, it is indicated that the application program has a Bug (Bug), or that the application program is incompatible with the terminal device.
As described above, in the prior art, the test program may automatically trigger the pseudo input event, and there may be some "blank areas" in the interface to be tested (the interface corresponding to the application program), where the blank areas refer to that when the terminal device executes the pseudo input event on the area, the terminal does not respond. This kind of test in the blank area will cause the problem of low test efficiency.
Disclosure of Invention
The embodiment of the invention provides a Monkey testing method, a Monkey testing device, terminal equipment and a storage medium, so that the testing efficiency can be improved.
In a first aspect, an embodiment of the present invention provides a Monkey testing method, including: displaying an interface to be tested; determining a first operable area in an interface to be tested; a first pseudorandom event is generated on the first actionable area and executed.
The embodiment of the invention has the beneficial effects that: by the method, the terminal equipment cannot execute the pseudo-random operation in the blank area, and the test efficiency of the terminal equipment is improved.
Optionally, generating a first pseudo-random event on the first actionable area includes: deleting an invalid region in the interface to be tested, wherein the invalid region is a region except for the first operable region in the interface to be tested; and generating a first pseudo-random event on the interface to be tested after the deletion. The method can effectively determine the first operable area, so that the terminal equipment cannot perform pseudo-random operation in the blank area, and further the test efficiency of the terminal equipment is improved.
Optionally, determining a first actionable area located in the interface to be tested comprises: determining a current operable control positioned in an interface to be tested; a first actionable area is determined from a currently actionable control.
Optionally, determining the first operable area according to the currently operable control includes: determining an area occupied by the current operable control as a first operable area; or, determining a region formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable region.
Optionally, after generating a first pseudo-random event on the first operable area and executing the first pseudo-random event, the method further includes: determining position coordinates corresponding to the first pseudorandom event; determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold value; a second pseudo-random event is generated on the second actionable area and the second pseudo-random event is executed.
Based on the method, the terminal equipment can execute the Monkey test for multiple times, the operable area of each Monkey test is not the operable area in the previous Monkey test, and based on the method, the Monkey test can not be concentrated in one or more areas of the interface to be tested, so that the test coverage is improved, and the test effectiveness is further improved.
Optionally, determining a second operable area located in the interface to be tested according to the position coordinates and a preset threshold includes: determining the radius of the area according to a preset threshold; determining an area with the position coordinate as a center and the area radius as a preset area; and determining the area of the interface to be tested except the preset area as a second operable area. The second operable area can be effectively determined by the method.
Optionally, the first pseudorandom event is a click operation, a touch operation or a slide operation; the second pseudo-random event is a click operation, a touch operation or a slide operation.
The following provides a Monkey testing apparatus, a terminal device, a storage medium and a computer program product, and the contents and effects thereof can refer to the method part, which is not described in detail in the embodiments of the present invention.
In a second aspect, an embodiment of the present invention provides a Monkey testing apparatus, including:
and the display module is used for displaying the interface to be tested.
The first determining module is used for determining a first operable area in the interface to be tested.
The first generating module is used for generating a first pseudo-random event on the first operable area and executing the first pseudo-random event.
Optionally, the first generating module is specifically configured to delete an invalid region in the interface to be tested, where the invalid region is a region of the interface to be tested, except for the first operable region. And generating a first pseudo-random event on the interface to be tested after the deletion.
Optionally, the first determining module is specifically configured to: and determining the current operable control positioned in the interface to be tested. A first actionable area is determined from a currently actionable control.
Optionally, the first determining module is specifically configured to: and determining the area occupied by the current operable control as the first operable area. Or, determining an area formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable area.
Optionally, the apparatus further comprises:
and the second determining module is used for determining the position coordinate corresponding to the first pseudorandom event.
And the third determining module is used for determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold value.
And the second generating module is used for generating a second pseudo-random event on the second operable area and executing the second pseudo-random event.
Optionally, the third determining module is specifically configured to: and determining the radius of the area according to a preset threshold value. And determining the area with the position coordinate as the center and the area radius as the preset area. And determining the area of the interface to be tested except the preset area as a second operable area.
In a third aspect, an embodiment of the present invention provides a terminal device, including: a display, a processor, and a memory; the display is used for displaying an interface to be tested; the memory is for storing executable instructions of the processor for causing the processor to implement the Monkey test method as an alternative to the first aspect or the second aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium, including: computer instructions for implementing the Monkey test method as an alternative to the first or second aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product, including: computer instructions for implementing the Monkey test method of the alternative form of the first or second aspect.
The embodiment of the invention provides a Monkey testing method, a Monkey testing device, terminal equipment and a storage medium, so that the testing efficiency can be improved. On one hand, the method ensures that the terminal equipment does not execute the pseudo-random operation in the blank area, thereby improving the test efficiency of the terminal equipment. On the other hand, the terminal equipment can execute a plurality of Monkey tests, the operable area of each Monkey test is not the operable area in the previous Monkey test, and based on the Monkey test, the Monkey test can not be concentrated in one or more areas of the interface to be tested, so that the test coverage is improved, and the test effectiveness is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic diagram of an application interface provided in an embodiment of the present invention;
fig. 2 is a flowchart of a Monkey testing method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of an application interface provided in accordance with another embodiment of the present invention;
FIG. 4 is a flowchart of a Monkey testing method according to another embodiment of the present application;
FIG. 5 is a flowchart of a Monkey testing method according to yet another embodiment of the present application;
FIG. 6 is a schematic diagram of a Monkey testing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
The terms "first," "second," and the like in the description and in the claims, and in the drawings, if any, 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, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Moreover, 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.
As described above, in the prior art, the test program may automatically trigger the pseudo input event, and there may be some "blank areas" in the interface to be tested (the interface corresponding to the application program), for example, fig. 1 is a schematic diagram of an application interface provided by an embodiment of the present invention, as shown in fig. 1, the application interface is a calculator application interface, and the data display area 11 on the application interface is a blank area. Such a test in the blank area is liable to cause a problem of low test efficiency since the operation on the blank area is not effective.
In order to solve the above technical problems, embodiments of the present invention provide a Monkey testing method, apparatus, terminal device, and storage medium. The application scenario of the application is as follows: the terminal device has installed an Application program, which may be a shopping Application (APP), a game APP, a taxi-taking APP, or the aforementioned calculator APP, and the terminal device implements a test on the Application program through a loaded test program.
The terminal device may be a smart phone, a tablet Computer, a Personal Computer (PC), a game console, a simulator, or the like.
Example one
Fig. 2 is a flowchart of a Monkey testing method according to an embodiment of the present application, where an execution main body of the method may be a Monkey testing apparatus, and the apparatus may be a part or all of a terminal device, and the Monkey testing method is described below by taking the execution main body of the method as the terminal device as an example. As shown in fig. 2, the method comprises the steps of:
step S21: and the terminal equipment displays the interface to be tested.
Step S22: the terminal equipment determines a first operable area in the interface to be tested.
Step S23: the terminal device generates a first pseudo-random event on the first operational area and executes the first pseudo-random event.
The interface to be tested is an interface corresponding to the APP to be tested, for example: the calculator interface shown in fig. 1 is an interface corresponding to the calculator APP.
Optionally, before step S21: the terminal equipment can also obtain the operation of the APP to be tested so that the terminal equipment can display the interface to be tested. The operation on the APP to be tested may be a click operation, a touch operation, a slide operation, or the like, which is not limited in this embodiment of the present invention.
Step S22 is explained below:
one alternative is to: the terminal device determines a current operable control located in the interface to be tested, and optionally, before the terminal device determines the current operable control located in the interface to be tested, the terminal device may pre-configure the current operable control in the interface to be tested.
Further, the terminal device determines the first operable area according to the current operable control. Optionally, the determining, by the terminal device, the first operable area according to the currently operable control includes: the terminal equipment determines an area occupied by the current operable control as a first operable area; or, determining a region formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable region.
For example: fig. 3 is a schematic diagram of an application interface according to another embodiment of the present invention, and as shown in fig. 3, a currently operable control includes: control 9, control 5, and control 6. Further, the terminal device may determine an area occupied by the currently operable control as the first operable area, for example, an area occupied by the control 9 is the first operable area 31. Or, the terminal device determines, as the first operable area, an area formed by a coordinate point that is centered on the currently operable control and is located a distance smaller than a preset distance from the currently operable control, where the first operable area is a circle, and in fact, the first operable area may also be a rectangle or another polygon, for example: as shown in fig. 3, the control 5 and the control 6 correspond to a first operable area 31, and the first operable area 31 is rectangular. The shape of the first operable region is not limited in the embodiments of the present invention.
Another alternative is: the terminal equipment does not need to determine the current operable control, but deletes the marginal area in the interface to be tested, and the rest area is used as the first operable area. The edge region may be at least one of the following to be tested: left edge region, right edge region, upper edge region, lower edge region.
Step S23 is explained below:
the first pseudorandom event is click operation, touch operation or sliding operation; for example: in connection with the interface diagram shown in fig. 3, the first pseudo-random event may be a click operation on the control 9.
It should be noted that the controls described in the embodiments of the present invention all refer to virtual controls.
In summary, an embodiment of the present invention provides a Monkey testing method, including: the method comprises the steps that the terminal device displays an interface to be tested, the terminal device determines a first operable area located in the interface to be tested, the terminal device generates a first pseudo-random event on the first operable area, and executes the first pseudo-random event. Therefore, the terminal equipment cannot execute the pseudo-random operation in the blank area, and the testing efficiency of the terminal equipment is improved.
Example two
The following description is made with respect to step S23:
in an alternative, the terminal device generates a first pseudo-random event directly on the determined first operable area, and executes the first pseudo-random event.
Another alternative is: fig. 4 is a flowchart of a Monkey testing method according to another embodiment of the present application, where an execution subject of the method may be a Monkey testing apparatus, and the apparatus may be a part or all of a terminal device, and the Monkey testing method is described below by taking the execution subject of the method as the terminal device. As shown in fig. 4, the step S23 includes the following steps:
step S231: and the terminal equipment deletes an invalid region in the interface to be tested, wherein the invalid region is a region except the first operable region in the interface to be tested.
Step S232: and the terminal equipment generates a first pseudo-random event on the interface to be tested after the deletion, and executes the first pseudo-random event.
The invalid region may be the blank region, or the invalid region includes the blank region, for example: as shown in fig. 1, the blank area is a data display area 11, and assuming that the first operable area includes an area occupied by the control 9, an area occupied by the control 5, and an area occupied by the control 6, the invalid area includes, in addition to the data display area, areas occupied by the control 1, the control 2, and the like.
The first pseudorandom event is click operation, touch operation or sliding operation; for example: in connection with the interface diagram shown in fig. 3, the first pseudo-random event may be a click operation on the control 9.
In the embodiment of the invention, the terminal equipment deletes the invalid area in the interface to be tested, generates the first pseudo-random event on the deleted interface to be tested and executes the first pseudo-random event. Therefore, the terminal equipment cannot execute the pseudo-random operation in the blank area, and the testing efficiency of the terminal equipment is improved.
EXAMPLE III
Based on the first embodiment or the second embodiment, further, fig. 5 is a flowchart of a Monkey testing method provided in yet another embodiment of the present application, an execution subject of the method may be a Monkey testing apparatus, the apparatus may be a part or all of a terminal device, and the Monkey testing method is described below by taking the execution subject of the method as the terminal device as an example. As shown in fig. 5, the method further includes the following steps after step S23:
step S24: and the terminal equipment determines the position coordinate corresponding to the first pseudorandom event.
Step S25: and the terminal equipment determines a second operable area in the interface to be tested according to the position coordinates and a preset threshold value.
Step S26: the terminal device generates a second pseudo-random event on the second operational area and executes the second pseudo-random event.
As described above, the first pseudo-random event may be a click operation, a touch operation, or a slide operation. Based on this, the position coordinates corresponding to the first pseudo-random event are coordinates of an operation position in the terminal device by a click operation, a touch operation, or a slide operation.
The following description is made with respect to step S25:
one alternative is to: the terminal equipment directly uses a preset threshold as an area radius, and determines an area with the position coordinate as a center and the area radius as a preset area; and determining the area of the interface to be tested except the preset area as the second operable area.
Another alternative is: the terminal equipment determines the radius of the area according to the preset threshold; determining an area with the position coordinate as a center and the area radius as a preset area; and determining the area of the interface to be tested except the preset area as the second operable area.
The preset threshold may be configured according to actual conditions.
It should be noted that steps S24 to S26 can be understood as a Monkey test, and embodiment one or embodiment two can also be understood as a Monkey test. If the Monkey test is performed a plurality of times before step S24 to step S26, the method of determining the second operable area is: for any one Monkey test before the current Monkey test (for convenience, this one Monkey test is referred to as a target Monkey test), a preset area can be determined, for example: the terminal equipment determines the radius of the area according to the preset threshold; and determining the area with the area radius as the radius by taking the position coordinate in the target Monkey test as the center as a preset area. Wherein, the area radius can also be related to the target Monkey test being the second test. For example: assuming that the preset threshold is k, the current Monkey test is the nth test, and at least one area radius comprises: k (1- (n-1) m), k (1- (n-2) m), k (1- (n-3) m) … … k (1- (n- (n-1)) m), where n indicates that the current Monkey test is the nth Monkey test. For example: n may be 5 and m may be 0.2. The numbers 1,2 … … n-1 indicate the 1 st Monkey test, the 2 nd Monkey test … … n-1 th Monkey test, before the nth Monkey test. After the terminal equipment determines all the area radiuses according to the preset threshold, the terminal equipment determines that the area with the corresponding position coordinate as the center and each area radius as the radius is a preset area; and finally, determining the area of the interface to be tested except all the preset areas as the second operable area.
The shape of the second operable region is not limited to a circle, and may be a rectangle or other polygon, etc.
It should be noted that, alternatively, the method in the first embodiment or the second embodiment may be adopted in the 1 st Monkey test, and the method in steps S24 to S26 may be adopted in the nth Monkey test, but the embodiment of the present invention is not limited thereto.
Step S26 is explained below:
optionally, the second pseudo-random event is a click operation, a touch operation, or a slide operation.
In summary, the embodiments of the present invention provide a Monkey testing method, in which a terminal device can execute a plurality of Monkey tests, and an operable area of each Monkey test is not an operable area in a previous Monkey test, so that the Monkey test is not concentrated on a certain area or several areas in an interface to be tested, that is, the test coverage is improved, and further the test effectiveness is improved.
Example four
Fig. 6 is a schematic diagram of a Monkey testing apparatus according to an embodiment of the present invention, where the apparatus is part or all of a terminal device, and the terminal device may be a smart phone, a tablet computer, a PC, a game console, or a simulator, as shown in fig. 6, the apparatus includes:
and the display module 61 is used for displaying the interface to be tested.
A first determining module 62 is configured to determine a first operable area located in the interface to be tested.
A first generating module 63, configured to generate a first pseudo-random event on the first operable area, and execute the first pseudo-random event.
Optionally, the first generating module 63 is specifically configured to delete an invalid region in the interface to be tested, where the invalid region is a region of the interface to be tested, except for the first operable region. Generating the first pseudo-random event on the interface to be tested after being deleted.
Optionally, the first determining module 62 is specifically configured to: and determining a current operable control positioned in the interface to be tested. Determining the first actionable area from the currently actionable control.
Optionally, the first determining module 62 is specifically configured to: and determining the area occupied by the current operable control as the first operable area. Or, determining an area formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable area.
Optionally, the apparatus further comprises:
a second determining module 64, configured to determine the position coordinate corresponding to the first pseudorandom event.
And the third determining module 65 is configured to determine a second operable area located in the interface to be tested according to the position coordinates and a preset threshold.
A second generating module 66, configured to generate a second pseudo-random event on the second operable area, and execute the second pseudo-random event.
Optionally, the third determining module 65 is specifically configured to: and determining the area radius according to the preset threshold. And determining the area with the position coordinate as the center and the area radius as the radius as a preset area. And determining the area of the interface to be tested except the preset area as the second operable area.
Optionally, the first pseudo-random event is a click operation, a touch operation or a slide operation. The second pseudo-random event is click operation, touch operation or sliding operation.
The Monkey testing device provided by the embodiment of the invention can be used for executing the Monkey testing method, the content and the effect of the Monkey testing device can be referred to the method part, and the embodiment of the invention is not repeated.
EXAMPLE five
Fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention, where the terminal device may be a smart phone, a tablet computer, a PC, a game console, or a simulator, as shown in fig. 7, the terminal device includes: a display 71, a processor 72 and a memory 73.
The display 71 is used for displaying an interface to be tested;
the memory 72 for storing executable instructions of the processor 73 for causing the processor to determine a first operational area in the interface to be tested; generating a first pseudo-random event on the first actionable area and executing the first pseudo-random event.
Optionally, the processor 72 is specifically configured to: deleting an invalid region in the interface to be tested, wherein the invalid region is a region except the first operable region in the interface to be tested; generating the first pseudo-random event on the interface to be tested after being deleted.
Optionally, the processor 72 is specifically configured to: determining a current operable control located in the interface to be tested; determining the first actionable area from the currently actionable control.
Optionally, the processor 72 is specifically configured to: determining an area occupied by the current operable control as the first operable area; or, determining an area formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable area.
Optionally, the processor 72 is further configured to: determining position coordinates corresponding to the first pseudorandom event; determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold; generating a second pseudo-random event on the second actionable area and executing the second pseudo-random event.
Optionally, the processor 72 is specifically configured to: determining the radius of the area according to the preset threshold; determining an area with the position coordinate as a center and the area radius as a preset area; and determining the area of the interface to be tested except the preset area as the second operable area.
Optionally, the first pseudo-random event is a click operation, a touch operation or a slide operation; the second pseudo-random event is click operation, touch operation or sliding operation.
Optionally, the terminal device further comprises a transceiver 64, wherein the transceiver 64 is used for enabling communication with other devices.
The Processor 72 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing all or part of the steps of the above methods.
The Memory 73 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk.
The transceiver 64 may access a WIreless network based on a communication standard, such as a WIreless Fidelity (WiFi), a second Generation (2G) mobile communication system or a third Generation (3G) mobile communication system, or a combination thereof. In an exemplary embodiment, the transceiver 64 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the transceiver 64 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.
The terminal device provided by the embodiment of the present invention can be used for executing the Monkey test method, and the content and effect thereof can refer to the method part, which is not described in detail herein.
EXAMPLE six
An embodiment of the present invention provides a computer storage medium, including: computer instructions for implementing the Monkey test method as described. The content and effect of the method can refer to the method part, and the embodiment of the invention is not repeated.
EXAMPLE seven
An embodiment of the present invention provides a computer program product, including: computer instructions for implementing the Monkey test method as described. The content and effect of the method can refer to the method part, and the embodiment of the invention is not repeated.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. A Monkey testing method, comprising:
displaying an interface to be tested;
determining a first operable area in the interface to be tested;
generating a first pseudo-random event on the first actionable area and executing the first pseudo-random event;
determining position coordinates corresponding to the first pseudorandom event;
determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold;
generating a second pseudo-random event on the second actionable area and executing the second pseudo-random event;
the determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold value comprises the following steps:
determining the radius of the area according to the preset threshold;
determining an area with the position coordinate as a center and the area radius as a preset area;
and determining the area of the interface to be tested except the preset area as the second operable area.
2. The method of claim 1, wherein generating the first pseudorandom event on the first actionable area comprises:
deleting an invalid region in the interface to be tested, wherein the invalid region is a region except the first operable region in the interface to be tested;
generating the first pseudo-random event on the interface to be tested after being deleted.
3. The method of claim 1 or 2, wherein said determining a first operational area in said interface to be tested comprises:
determining a current operable control located in the interface to be tested;
determining the first actionable area from the currently actionable control.
4. The method of claim 3, wherein said determining the first actionable area from the currently-actionable control comprises:
determining an area occupied by the current operable control as the first operable area;
or,
and determining an area formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable area.
5. The method of claim 1, wherein the first pseudorandom event is a click operation, a touch operation, or a swipe operation;
the second pseudo-random event is click operation, touch operation or sliding operation.
6. A Monkey testing apparatus, comprising:
the display module is used for displaying an interface to be tested;
the first determining module is used for determining a first operable area in the interface to be tested;
a first generating module, configured to generate a first pseudo-random event on the first actionable area and execute the first pseudo-random event;
a second determining module, configured to determine a position coordinate corresponding to the first pseudorandom event;
the third determining module is used for determining a second operable area in the interface to be tested according to the position coordinates and a preset threshold;
a second generating module, configured to generate a second pseudo-random event on the second operable area and execute the second pseudo-random event;
the third determining module is specifically configured to:
determining the radius of the area according to the preset threshold;
and determining a region with the position coordinate as the center and the region radius as the radius as a preset region, and determining a region except the preset region in the interface to be tested as the second operable region.
7. The apparatus of claim 6, wherein the first generating module is specifically configured to:
deleting an invalid region in the interface to be tested, wherein the invalid region is a region except the first operable region in the interface to be tested;
generating the first pseudo-random event on the interface to be tested after being deleted.
8. The apparatus according to claim 6 or 7, wherein the first determining module is specifically configured to:
determining a current operable control located in the interface to be tested;
determining the first actionable area from the currently actionable control.
9. The apparatus of claim 8, wherein the first determining module is specifically configured to:
determining an area occupied by the current operable control as the first operable area;
or,
and determining an area formed by coordinate points which are centered on the current operable control and have a distance smaller than a preset distance from the current operable control as the first operable area.
10. The apparatus of claim 6, wherein the first pseudorandom event is a click operation, a touch operation, or a swipe operation;
the second pseudo-random event is click operation, touch operation or sliding operation.
11. A terminal device, comprising: a display, a processor, and a memory;
the display is used for displaying an interface to be tested;
the memory, for storing executable instructions of the processor to cause the processor to implement the Monkey test method of any of claims 1-5.
12. A computer storage medium, comprising: computer instructions for implementing the Monkey testing method of any of claims 1-5.
CN201811045392.8A 2018-09-07 2018-09-07 Monkey testing method, apparatus, terminal device and storage medium Active CN109144881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811045392.8A CN109144881B (en) 2018-09-07 2018-09-07 Monkey testing method, apparatus, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811045392.8A CN109144881B (en) 2018-09-07 2018-09-07 Monkey testing method, apparatus, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN109144881A CN109144881A (en) 2019-01-04
CN109144881B true CN109144881B (en) 2022-06-03

Family

ID=64823959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811045392.8A Active CN109144881B (en) 2018-09-07 2018-09-07 Monkey testing method, apparatus, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN109144881B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309622A (en) * 2020-02-27 2020-06-19 中国平安人寿保险股份有限公司 Application program testing method and device, terminal equipment and storage medium
CN113722231B (en) * 2021-09-09 2024-04-26 同盾科技有限公司 User operation simulation method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512023A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for Monkey testing
CN105718370A (en) * 2016-01-21 2016-06-29 上海斐讯数据通信技术有限公司 Android equipment test method and test device
CN106383780A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Monkey test method and device
CN108399124A (en) * 2018-02-07 2018-08-14 深圳壹账通智能科技有限公司 Application testing method, device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280452B1 (en) * 2013-06-26 2016-03-08 Amazon Technologies, Inc. Systems and methods for generating test cases
CN106250253B (en) * 2016-07-19 2019-10-15 努比亚技术有限公司 A kind of mobile terminal test device and test method
CN107193733A (en) * 2017-05-12 2017-09-22 微梦创科网络科技(中国)有限公司 Simulate the methods, devices and systems of Monkey tests

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512023A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for Monkey testing
CN105718370A (en) * 2016-01-21 2016-06-29 上海斐讯数据通信技术有限公司 Android equipment test method and test device
CN106383780A (en) * 2016-09-05 2017-02-08 努比亚技术有限公司 Monkey test method and device
CN108399124A (en) * 2018-02-07 2018-08-14 深圳壹账通智能科技有限公司 Application testing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109144881A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
US11163969B2 (en) Fingerprint recognition method and apparatus, and mobile terminal
CN107038112B (en) Application interface debugging method and device
CN110168487B (en) Touch control method and device
US20170024121A1 (en) Operating method for contents searching function and electronic device supporting the same
CN107741820B (en) Input method keyboard display method and mobile terminal
CN104541231A (en) Method and device for preventing mistaken touch of touch screen
KR102307215B1 (en) Data processing methods and electronic devices
CN115174733A (en) Interface display method, device and equipment
KR20180089810A (en) Electronic device and method for determining touch coordinate thereof
CN109144881B (en) Monkey testing method, apparatus, terminal device and storage medium
CN109933989B (en) Method and device for detecting vulnerability
CN104077184B (en) A kind of course control method and computer system of application program
US20170046041A1 (en) Electronic device and method for controlling input in electronic device
CN105376719A (en) Information pushing method and device
WO2015011568A2 (en) Systems and methods for application management on mobile devices
US20200201923A1 (en) Information Recommendation Method, Terminal Device, and Server
CN108604161A (en) A kind of method, apparatus and terminal device of locking list object
CN108664389B (en) Test method, test device and terminal
CN109145598B (en) Virus detection method and device for script file, terminal and storage medium
CN110430252B (en) Resource data processing method and device, equipment and readable storage medium
CN109981873B (en) Address book permission opening method and device and electronic equipment
CN109995931B (en) Method and device for realizing automatic calling
CN107025058B (en) Information writing method and device of mobile terminal and mobile terminal
KR102582923B1 (en) Contents securing method and electronic device supporting the same
CN112069015B (en) Instruction execution method and device for instruction simulator, terminal equipment and storage medium

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