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

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

Info

Publication number
CN110597720A
CN110597720A CN201910836669.7A CN201910836669A CN110597720A CN 110597720 A CN110597720 A CN 110597720A CN 201910836669 A CN201910836669 A CN 201910836669A CN 110597720 A CN110597720 A CN 110597720A
Authority
CN
China
Prior art keywords
triggering
page
trigger
application program
simulating
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.)
Pending
Application number
CN201910836669.7A
Other languages
Chinese (zh)
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.)
Zhuomi Private Ltd
Original Assignee
Hong Kong LiveMe Corp 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 Hong Kong LiveMe Corp ltd filed Critical Hong Kong LiveMe Corp ltd
Priority to CN201910836669.7A priority Critical patent/CN110597720A/en
Publication of CN110597720A publication Critical patent/CN110597720A/en
Pending legal-status Critical Current

Links

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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the invention discloses a method and a device for testing an application program, electronic equipment and a storage medium, relates to the technical field of computers, and can improve the testing efficiency and the testing effect. The method comprises the following steps: acquiring first page information of an application program to be tested, wherein the first page information comprises distribution information of triggerable controls in a first page of the application program to be tested; generating a batch trigger parameter for the first page according to the first page information, wherein the batch trigger parameter comprises at least one of the following items: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times; simulating a triggering operation on the first page according to the batch triggering parameters; and determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation. The invention is suitable for testing the application program.

Description

Application program testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for testing an application program, an electronic device, and a storage medium.
Background
With the development of computer and network technologies, computer devices such as mobile phones, tablet computers and personal computers have become very popular in people's lives. Various applications, such as Foxmail, QQ, etc., may be installed on these computer devices to provide corresponding services to users.
Before the application program is provided for the public to download, strict tests are required to ensure that various application functions of the application program are successfully realized. To do so, it is often necessary for the tester to click, view, and record various function buttons in the application. The testing mode is simple, rough and low in efficiency.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing an application program, an electronic device, and a storage medium, which can improve testing efficiency and testing effect.
In a first aspect, an embodiment of the present invention provides a method for testing an application program, including: acquiring first page information of an application program to be tested, wherein the first page information comprises distribution information of triggerable controls in a first page of the application program to be tested; generating a batch trigger parameter for the first page according to the first page information, wherein the batch trigger parameter comprises at least one of the following items: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times; simulating a triggering operation on the first page according to the batch triggering parameters; and determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation.
Optionally, the triggering manner includes at least one of the following triggering operations: click, long press, slide, drag.
Optionally, the simulating a trigger operation on the first page according to the batch trigger parameter includes at least one of: simulating a range test trigger operation on the first page according to the trigger mode and the trigger position; simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times; and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
Optionally, the range test triggering operation includes: clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array; the frequency test trigger operation includes: selecting at least one second pixel point from the first page according to a preset rule; continuously clicking the second pixel point for multiple times at a preset frequency; the logical test trigger operation comprises: simulating a plurality of trigger operations performed simultaneously on the first page.
Optionally, the determining, according to the response of the application to be tested to the trigger operation, whether the first page is qualified includes: determining that the first page is not qualified if at least one of the following conditions exists, and determining that the first page is qualified if none of the following conditions exists: under the condition that the first pixel point is positioned on the triggerable control, no response message of the triggerable control is received within a first time threshold; receiving at least one response message within a second time threshold under the condition that the first pixel point is not located on the triggerable control; under the condition that the second pixel point is positioned on the triggerable control, within a third time threshold, no response message of the triggerable control is received; receiving at least one response message within a fourth time threshold under the condition that the second pixel point is not located on the triggerable control; and not receiving response messages corresponding to the plurality of trigger operations one by one within a fifth time length threshold value.
Optionally, the simulating a trigger operation on the first page according to the batch trigger parameter includes: and simulating a pressure test on the server through communication between the terminal and the server while simulating a trigger operation on the first page according to the batch trigger parameters.
In a second aspect, an embodiment of the present invention further provides an apparatus for testing an application, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first page information of an application program to be tested, and the first page information comprises distribution information of a triggerable control in a first page of the application program to be tested; a generating unit, configured to generate a batch trigger parameter for the first page according to the first page information, where the batch trigger parameter includes at least one of: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times; the simulation unit is used for simulating a trigger operation on the first page according to the batch trigger parameters; and the determining unit is used for determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation.
Optionally, the triggering manner includes at least one of the following triggering operations: click, long press, slide, drag.
Optionally, the simulation unit is specifically configured to at least one of: simulating a range test trigger operation on the first page according to the trigger mode and the trigger position; simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times; and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
Optionally, the range test triggering operation includes: clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array; the frequency test trigger operation includes: selecting at least one second pixel point from the first page according to a preset rule; continuously clicking the second pixel point for multiple times at a preset frequency; the logical test trigger operation comprises: simulating a plurality of trigger operations performed simultaneously on the first page.
Optionally, the determining unit is specifically configured to: determining that the first page is not qualified if at least one of the following conditions exists, and determining that the first page is qualified if none of the following conditions exists: under the condition that the first pixel point is positioned on the triggerable control, no response message of the triggerable control is received within a first time threshold; receiving at least one response message within a second time threshold under the condition that the first pixel point is not located on the triggerable control; under the condition that the second pixel point is positioned on the triggerable control, within a third time threshold, no response message of the triggerable control is received; receiving at least one response message within a fourth time threshold under the condition that the second pixel point is not located on the triggerable control; and not receiving response messages corresponding to the plurality of trigger operations one by one within a fifth time length threshold value.
Optionally, the simulation unit is specifically configured to simulate, according to the batch trigger parameter, a pressure test on the server through communication simulation between the terminal and the server while simulating the trigger operation on the first page.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing any application program testing method provided by the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing one or more programs, where the one or more programs are executable by one or more processors to implement any one of the methods for testing an application program provided by the embodiments of the present invention.
The application program testing method, device, electronic equipment and storage medium provided by the embodiment of the invention can acquire first page information of an application program to be tested, generate batch trigger parameters for the first page according to the first page information, simulate trigger operation on the first page according to the batch trigger parameters, and determine whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation. The first page information comprises distribution information of the triggerable controls in the first page of the application program to be tested, and the batch triggering parameters comprise triggering modes, triggering positions, triggering sequences, triggering frequency and triggering times, so that batch tests of various functions, performances and stability can be carried out on the first page, the testing efficiency of the application program is effectively improved, and the testing effect is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for testing an application according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of a method for testing an application according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for testing an application according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and 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 invention.
In a first aspect, embodiments of the present invention provide a method for testing an application program, which can improve testing efficiency and testing effect of the application program.
As shown in fig. 1, a method for testing an application according to an embodiment of the present invention may include:
s11, acquiring first page information of an application program to be tested, wherein the first page information comprises distribution information of triggerable controls in the first page of the application program to be tested;
optionally, the application to be tested may be any application installed on a mobile terminal such as a mobile phone and a pad, for example, a microblog, a tremble, and the like. The first page may be any user interface of the application to be tested, such as a home page, a search page, a live page, a user information page, and the like.
Optionally, one or more triggerable controls may be included in the first page, and the triggerable controls may be any buttons, icons, links, etc. having clickable, long-depressible, slidable, or draggable functionality. For example, in one embodiment of the invention, the first page may be a home page of a live application, and the triggerable controls in the first page may include top navigation bar, bottom navigation bar click buttons, secondary tabs, tabs (tabs), and advertising banners (banners), live room covers, and the like.
In particular, the first page information may include distribution information of the triggerable control on the first page, for example, in one embodiment of the present invention, the first page information may include a coordinate position of a "next page" button on the first page, and the like. Optionally, the first page information may further include boundary information of the first page, and the like, so that the overall condition of the first page is more definite.
It should be noted that the application program testing method provided in the embodiment of the present invention may be based on the mobile terminal where the application program to be tested is located, so that the first page information of the application program to be tested may be directly obtained in the same mobile terminal, or may be based on another terminal device different from the mobile terminal, and the first page information is obtained through communication between the terminals. For example, in an embodiment of the present invention, the testing method for the application program may be set based on a desktop computer, and the desktop computer may be connected to a mobile phone through a data line, so as to implement, through communication between the desktop computer and the mobile phone, acquisition of the first page information of the application program to be tested (for example, WeChat) in the mobile phone, which is not limited in this embodiment of the present invention.
S12, generating a batch trigger parameter for the first page according to the first page information, wherein the batch trigger parameter comprises at least one of the following items: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times;
in this step, batch trigger parameters for the first page may be generated according to the first page information acquired in step S11, and these batch trigger parameters may be used to define multiple trigger operations performed on the first page, so that a series of tests on the first page may be implemented through a simple command, and the test efficiency is effectively improved.
The triggering manner in this step may refer to what manner the first page is sent out with an operation instruction, such as clicking, long pressing, sliding, dragging, and the like. Specifically, the trigger position may be an action point coordinate of a trigger operation, for example, clicking on a pixel point a1(100, 350); the trigger sequence may be the sequence between the trigger operations, for example, first long-pressing the pixel point a2(1800, 500), and then clicking the pixel point A3(2600, 500). The trigger frequency may include the number of times one or more trigger operations are performed per unit time, e.g., 6 clicks per second, 40 drags per minute, etc. The number of triggers may refer to the number of times each trigger operation is performed consecutively, e.g., 10 consecutive clicks, etc.
S13, simulating a trigger operation on the first page according to the batch trigger parameters;
in this step, the trigger operation may be defined in batches by using one or more batch trigger parameters, for example, in an embodiment of the present invention, the test operation T1 may be defined by using a batch trigger parameter, and the test operation T1 may specifically include: the click operation was performed 4 times per second for pixel B1 10 times, and after 2-second interval, the long-press operation was performed for pixel B2 one time. Thus, the series of operations can be started by inputting the test operation T1, so that the complex batch trigger operation can be efficiently performed according to a simple command.
And S14, determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation.
In this step, whether the application program to be tested responds to the trigger operation may be determined by checking the interface display on the first page or by detecting the response message.
It should be noted that the first page may be any page in the application program to be tested, and after the first page is tested, other pages (e.g., pop-up pages) of the application program to be tested may be continuously tested, so that the application program to be tested is completely tested.
The method for testing the application program provided by the embodiment of the invention can acquire the first page information of the application program to be tested, generate the batch trigger parameters for the first page according to the first page information, then simulate the trigger operation on the first page according to the batch trigger parameters, and determine whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation. The first page information comprises distribution information of the triggerable controls in the first page of the application program to be tested, and the batch triggering parameters comprise triggering modes, triggering positions, triggering sequences, triggering frequency and triggering times, so that batch tests of various functions, performances and stability can be carried out on the first page, the testing efficiency of the application program is effectively improved, and the testing effect is greatly improved.
Optionally, in step S11, the first page information may include distribution information of the triggerable controls on the first page, or distribution information of other non-triggerable parts (e.g., background, border, etc.) on the first page, so as to complete the test of the first page using the non-triggerable parts.
In one embodiment of the invention, the first page may be a current page displayed on a screen of the mobile terminal, so as to facilitate the triggering operation and observation. After the first page is clicked, a new page or dialog box can be popped out, and page information of the new page or dialog box can be further acquired, so that the new page or dialog box can be tested continuously.
After the first page information is acquired, in step S12, a batch trigger parameter for the first page may be generated according to the first page information, where the batch trigger parameter includes at least one of: trigger mode, trigger position, trigger sequence, trigger frequency, trigger times and the like. Optionally, in an embodiment of the present invention, different parameter items may be selected from the batch trigger parameters to be configured according to test requirements, so as to achieve different test targets. For example, in order to test the response of the pixel point in the first page to the click operation more comprehensively, the trigger mode may be configured as a click, and the trigger position is configured as a trigger point spaced by a preset distance on the first page, so as to form a trigger point array.
After the configured batch trigger parameters are issued by the test command, the batch test can be performed in step S13. The test operation executed by the batch test is different due to different batch trigger parameter configurations.
For example, in one embodiment of the invention, simulating a trigger operation on the first page according to the batch trigger parameter may include at least one of:
simulating a range test trigger operation on the first page according to the trigger mode and the trigger position;
simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times;
and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
Optionally, the range test triggering operation may include: and clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array. Therefore, the trigger position can be expanded to the range of the whole first page through a simple command, and therefore the first page can be comprehensively checked and tested.
Optionally, the frequency test triggering operation may include: selecting at least one second pixel point from the first page according to a preset rule; and continuously clicking the second pixel point for multiple times at a preset frequency. For example, in an embodiment of the present invention, the preset rule may be that 10 times of continuous clicks are performed on each triggerable control in the first page, the click frequency is 5 times/second, or 1 to 2 consecutive clicks are randomly selected from the triggerable controls, for example, a "next page" button in the first page is clicked 10 times in a speed of 3 times per second, or a non-triggerable part in the first page is clicked continuously, so as to detect how often the first page can bear the highest clicks without collapsing, thereby implementing a stress test on the application to be tested.
Optionally, the logic test triggering operation may include: a plurality of trigger operations performed simultaneously are simulated on the first page. For example, the "cancel" button and the "next" button in the first page may be clicked simultaneously, and so on. Therefore, by performing simulation test on the condition that the first page does not conform to logic but is likely to actually occur, the stability of the application program to be tested can be detected, and whether the application program to be tested is trapped in a dead loop or crashed due to misoperation of a user can be detected.
After simulating the trigger operation on the first page, in step S14, it may be determined whether the first page is qualified according to the response of the application to be tested to the trigger operation. For the first page of the application program to be tested, if one of the simulated trigger operations can not respond correctly and timely, the application program to be tested can be determined to be unqualified, and only if all the trigger operations can respond correctly and timely, the application program to be tested can be determined to be qualified.
Based on this, optionally, in an embodiment of the present invention, the first page is determined to be unqualified if at least one of the following conditions exists, and the first page is determined to be qualified if none of the following conditions exists:
under the condition that the first pixel point is positioned on the triggerable control, no response message of the triggerable control is received within a first time threshold; that is, if the trigger operation falls on the triggerable control, it is necessary to receive a response message to the triggerable control within the first time threshold to indicate that the response of the to-be-tested program to the triggerable control is qualified, and if the response message is received after the first time threshold is exceeded, it is indicated that the response of the to-be-tested application program is slow and unqualified, and it is necessary to return to the developer to re-optimize the code. If the response message is not received all the time, the problem that the application program to be tested may have logic errors or function loss and the like is shown, and the research personnel needs to return to search errors.
Receiving at least one response message within a second time threshold under the condition that the first pixel point is not located on the triggerable control; that is, if the trigger operation does not fall on the triggerable control, the application to be tested cannot respond to the trigger operation within the second duration threshold, and should maintain the stability that the application to be tested should have. Otherwise, if a response action is generated due to clicking the non-triggerable part of the first page, the logic code indicating that the error exists in the application program to be tested triggers a response that the trigger is not triggered, and the response needs to be returned to the research and development personnel to search for the error.
Under the condition that the second pixel point is positioned on the triggerable control, within a third time threshold, no response message of the triggerable control is received; that is, if the trigger operation falls on the triggerable control, it is necessary to receive a response message to the triggerable control within the third time threshold to indicate that the response of the to-be-tested program to the triggerable control is qualified, and if the response message is received after the third time threshold is exceeded, it is indicated that the response of the to-be-tested application program is slow and unqualified, and it is necessary to return to the developer to re-optimize the code. If the response message is not received all the time, the problem that the application program to be tested may have logic errors or function loss and the like is shown, and the research personnel needs to return to search errors.
Receiving at least one response message within a fourth time threshold under the condition that the second pixel point is not located on the triggerable control; that is, if the trigger operation does not fall on the triggerable control, the application to be tested cannot respond to the trigger operation within the fourth time threshold, and should maintain the stability it should have. Otherwise, if a response action is generated due to clicking the non-triggerable part of the first page, the logic code indicating that the error exists in the application program to be tested triggers a response that the trigger is not triggered, and the response needs to be returned to the research and development personnel to search for the error.
And not receiving response messages corresponding to the plurality of trigger operations one by one within a fifth time length threshold value. That is to say, when a plurality of trigger operations with disordered logic are performed on the first page at the same time, the first page does not crash because of the non-compliance of the trigger operations, but the trigger operations can be reasonably analyzed and disassembled, and a one-to-one response is performed on the plurality of trigger operations. Otherwise, if the response messages corresponding to the multiple trigger operations in one-to-one correspondence are not received within the fifth duration threshold, it is indicated that the processing capability of the application program to be tested on the complex logic is deficient, and the application program may be trapped into a dead loop or crash when a user misoperation occurs, and needs to be returned to a research and development staff for further optimization.
It should be noted that, in the embodiment of the present invention, the determination process of the application to be tested related to the first pixel point and the second pixel point is basically similar, except that the first pixel point relates to the test of the coverage of the first page, and the second pixel point relates to the test of the bearing capacity of the operating frequency of the first page. Optionally, the first time length threshold, the second time length threshold, the third time length threshold, and the fourth time length threshold may be equal to or different from each other, which is not limited in the embodiment of the present invention.
Further, the above embodiments mainly test functions, performances and/or logic of the application program, but the embodiments of the present invention are not limited thereto. In other embodiments of the present invention, the server may be jointly tested while the application is being tested. For example, in an embodiment of the present invention, simulating a trigger operation on the first page according to the batch trigger parameter in step S13 may include: and simulating the triggering operation on the first page and simultaneously simulating the pressure test on the server through the communication between the terminal and the server according to the batch triggering parameters, so that the application program and the server can be jointly analyzed.
Optionally, in an embodiment of the present invention, during the test process, only one application program to be tested may be run on the terminal, or a plurality of other application programs may also be run simultaneously. Under the condition that a plurality of applications are operated, if the response message capable of triggering the control is not received within the preset time threshold, the change of the number of messages to be processed in the CPU can be inquired, so that the reason that the CPU is busy or the reason that the application program to be tested is self-caused is determined.
The following describes in detail the method for testing an application program according to an embodiment of the present invention with specific examples.
As shown in fig. 2, a method for testing an application according to an embodiment of the present invention may include:
s201, obtaining first page information of an application program to be tested, wherein the first page information comprises distribution information of a triggerable control in the first page of the application program to be tested.
S202, generating batch trigger parameters for the first page according to the first page information.
Optionally, the specific batch triggering parameters are as follows:
(a) and carrying out one-time click operation on the first page by taking the pixel points (0, 0) as starting points and 50 pixel points at intervals, wherein the interval between the two-time click operation is 2 seconds. (b) And randomly selecting 3 pixel points on the first page to perform quick continuous click operation, wherein the frequency is 8 times/second and the times are 5 times. (c) And simultaneously carrying out trigger operation on the two triggerable controls in the first page.
And S203, simulating a trigger operation on the first page according to the batch trigger parameters.
S204, in the testing process (a), whether a coordinate point corresponding to the clicking operation falls on the triggerable control is judged.
S205, if the clicking operation falls on the triggerable control, if no response to the clicking operation is received within 0.5 second after the clicking operation, for example, a dialog box should pop up but no dialog box actually pops up, determining that the first page is unqualified; if the click operation does not fall on the triggerable control, if a response to the click operation is received within 0.5 second after the click operation, for example, a jump is made to another page, it is determined that the first page is not qualified.
S206, in the testing process (b), whether the coordinate point corresponding to the clicking operation falls on the triggerable control is judged.
S207, if the clicking operation falls on the triggerable control, within 2 seconds after the clicking operation, if 5 responses to the clicking operation are not received, determining that the first page is unqualified; and if the clicking operation does not fall on the triggerable control, within 2 seconds after the clicking operation, if any response to the clicking operation is received, determining that the first page is unqualified.
And S208, in the test process (c), if the response messages corresponding to the two trigger operations in one-to-one mode are not received within 1.5 seconds, determining that the first page is unqualified.
S209, after the first page is tested, clicking a next page button to continue testing the next page of the application program.
In a second aspect, an embodiment of the present invention further provides a device for testing an application program, which can improve the testing efficiency and the testing effect of the application program.
As shown in fig. 3, an embodiment of the present invention further provides an apparatus for testing an application program, which may include:
the acquiring unit 31 is configured to acquire first page information of an application program to be tested, where the first page information includes distribution information of a triggerable control in a first page of the application program to be tested;
a generating unit 32, configured to generate a batch trigger parameter for the first page according to the first page information, where the batch trigger parameter includes at least one of: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times;
the simulation unit 33 is used for simulating a trigger operation on the first page according to the batch trigger parameters;
and the determining unit 34 is configured to determine whether the first page is qualified according to a response of the application to be tested to the trigger operation.
The testing device for the application program provided by the embodiment of the invention can acquire the first page information of the application program to be tested, generate the batch triggering parameters for the first page according to the first page information, then simulate the triggering operation on the first page according to the batch triggering parameters, and determine whether the first page is qualified or not according to the response of the application program to be tested to the triggering operation. The first page information comprises distribution information of the triggerable controls in the first page of the application program to be tested, and the batch triggering parameters comprise triggering modes, triggering positions, triggering sequences, triggering frequency and triggering times, so that batch tests of various functions, performances and stability can be carried out on the first page, the testing efficiency of the application program is effectively improved, and the testing effect is greatly improved.
Optionally, the triggering manner includes at least one of the following triggering operations: click, long press, slide, drag.
Optionally, the simulation unit 33 may be specifically configured to at least one of:
simulating a range test trigger operation on the first page according to the trigger mode and the trigger position;
simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times;
and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
Optionally, the range test triggering operation includes: clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array; the frequency test trigger operation includes: selecting at least one second pixel point from the first page according to a preset rule; continuously clicking the second pixel point for multiple times at a preset frequency; the logical test trigger operation comprises: simulating a plurality of trigger operations performed simultaneously on the first page.
Optionally, the simulation unit 33 may be specifically configured to simulate, according to the batch trigger parameter, a pressure test on the server through communication simulation between the terminal and the server while simulating the trigger operation on the first page.
Optionally, the determining unit 34 may be specifically configured to:
determining that the first page is not qualified if at least one of the following conditions exists, and determining that the first page is qualified if none of the following conditions exists:
under the condition that the first pixel point is positioned on the triggerable control, no response message of the triggerable control is received within a first time threshold;
receiving at least one response message within a second time threshold under the condition that the first pixel point is not located on the triggerable control;
under the condition that the second pixel point is positioned on the triggerable control, within a third time threshold, no response message of the triggerable control is received;
receiving at least one response message within a fourth time threshold under the condition that the second pixel point is not located on the triggerable control;
and not receiving response messages corresponding to the plurality of trigger operations one by one within a fifth time length threshold value.
In a third aspect, an embodiment of the present invention further provides an electronic device, which enables a system to operate more smoothly, and effectively improves user experience.
As shown in fig. 4, an electronic device provided in an embodiment of the present invention may include: the device comprises a shell 51, a processor 52, a memory 53, a circuit board 54 and a power circuit 55, wherein the circuit board 54 is arranged inside a space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; a power supply circuit 55 for supplying power to each circuit or device of the electronic apparatus; the memory 53 is used to store executable program code; the processor 52 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 53, and is used for executing the test method of the application program provided by any of the foregoing embodiments.
For specific execution processes of the above steps by the processor 52 and further steps executed by the processor 52 by running the executable program code, reference may be made to the description of the foregoing embodiments, and details are not described herein again.
The above electronic devices exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement any one of the methods for testing an application program provided in the foregoing embodiments, so that corresponding technical effects can also be achieved, which have been described in detail above and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for testing an application program, comprising:
acquiring first page information of an application program to be tested, wherein the first page information comprises distribution information of triggerable controls in a first page of the application program to be tested;
generating a batch trigger parameter for the first page according to the first page information, wherein the batch trigger parameter comprises at least one of the following items: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times;
simulating a triggering operation on the first page according to the batch triggering parameters;
and determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation.
2. The method of claim 1, wherein the triggering manner comprises at least one of the following triggering operations: click, long press, slide, drag.
3. The method of claim 1, wherein simulating a trigger operation on the first page according to the batch trigger parameter comprises at least one of:
simulating a range test trigger operation on the first page according to the trigger mode and the trigger position;
simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times;
and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
4. The method of claim 3,
the range test trigger operation includes: clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array;
the frequency test trigger operation includes: selecting at least one second pixel point from the first page according to a preset rule; continuously clicking the second pixel point for multiple times at a preset frequency;
the logical test trigger operation comprises: simulating a plurality of trigger operations performed simultaneously on the first page.
5. The method of claim 4, wherein determining whether the first page is eligible according to the response of the application under test to the trigger operation comprises:
determining that the first page is not qualified if at least one of the following conditions exists, and determining that the first page is qualified if none of the following conditions exists:
under the condition that the first pixel point is positioned on the triggerable control, no response message of the triggerable control is received within a first time threshold;
receiving at least one response message within a second time threshold under the condition that the first pixel point is not located on the triggerable control;
under the condition that the second pixel point is positioned on the triggerable control, within a third time threshold, no response message of the triggerable control is received;
receiving at least one response message within a fourth time threshold under the condition that the second pixel point is not located on the triggerable control;
and not receiving response messages corresponding to the plurality of trigger operations one by one within a fifth time length threshold value.
6. The method of any of claims 1 to 5, wherein simulating a trigger operation on the first page according to the batch trigger parameter comprises:
and simulating a pressure test on the server through communication between the terminal and the server while simulating a trigger operation on the first page according to the batch trigger parameters.
7. An apparatus for testing an application, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring first page information of an application program to be tested, and the first page information comprises distribution information of a triggerable control in a first page of the application program to be tested;
a generating unit, configured to generate a batch trigger parameter for the first page according to the first page information, where the batch trigger parameter includes at least one of: triggering mode, triggering position, triggering sequence, triggering frequency and triggering times;
the simulation unit is used for simulating a trigger operation on the first page according to the batch trigger parameters;
and the determining unit is used for determining whether the first page is qualified or not according to the response of the application program to be tested to the trigger operation.
8. The apparatus of claim 7, wherein the triggering manner comprises at least one of the following triggering operations: click, long press, slide, drag.
9. The apparatus according to claim 7, wherein the simulation unit is specifically configured to at least one of:
simulating a range test trigger operation on the first page according to the trigger mode and the trigger position;
simulating a frequency test triggering operation on the first page according to the triggering mode, the triggering position, the triggering frequency and the triggering times;
and simulating a logic test triggering operation on the first page according to the triggering mode, the triggering position and the triggering sequence.
10. The apparatus of claim 9,
the range test trigger operation includes: clicking first pixel points in a preset pixel point array on the first page one by one according to a preset sequence, wherein a preset distance is reserved between adjacent first pixel points in the preset pixel point array;
the frequency test trigger operation includes: selecting at least one second pixel point from the first page according to a preset rule; continuously clicking the second pixel point for multiple times at a preset frequency;
the logical test trigger operation comprises: simulating a plurality of trigger operations performed simultaneously on the first page.
CN201910836669.7A 2019-09-04 2019-09-04 Application program testing method and device, electronic equipment and storage medium Pending CN110597720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910836669.7A CN110597720A (en) 2019-09-04 2019-09-04 Application program testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910836669.7A CN110597720A (en) 2019-09-04 2019-09-04 Application program testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110597720A true CN110597720A (en) 2019-12-20

Family

ID=68857686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910836669.7A Pending CN110597720A (en) 2019-09-04 2019-09-04 Application program testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110597720A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324531A (en) * 2020-02-05 2020-06-23 香港乐蜜有限公司 Application program testing method and device, electronic equipment and storage medium
CN111488539A (en) * 2020-04-08 2020-08-04 中国银行股份有限公司 Page adjusting method and device
CN112685299A (en) * 2020-12-25 2021-04-20 广东乐心医疗电子股份有限公司 Automatic test method, device, electronic equipment and readable storage medium
CN112860559A (en) * 2021-02-19 2021-05-28 一汽解放汽车有限公司 Upgrade test system and method
CN113468068A (en) * 2021-07-21 2021-10-01 腾讯科技(深圳)有限公司 Virtual resource testing method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000547A1 (en) * 2014-06-30 2016-01-07 北京金山安全软件有限公司 Method, apparatus and mobile terminal for triggering widget in application
CN107193733A (en) * 2017-05-12 2017-09-22 微梦创科网络科技(中国)有限公司 Simulate the methods, devices and systems of Monkey tests
CN109117372A (en) * 2018-08-14 2019-01-01 平安壹钱包电子商务有限公司 Test code generating method, device, computer equipment and storage medium
CN110162453A (en) * 2018-02-11 2019-08-23 腾讯科技(深圳)有限公司 Test method, device, computer readable storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000547A1 (en) * 2014-06-30 2016-01-07 北京金山安全软件有限公司 Method, apparatus and mobile terminal for triggering widget in application
CN107193733A (en) * 2017-05-12 2017-09-22 微梦创科网络科技(中国)有限公司 Simulate the methods, devices and systems of Monkey tests
CN110162453A (en) * 2018-02-11 2019-08-23 腾讯科技(深圳)有限公司 Test method, device, computer readable storage medium and computer equipment
CN109117372A (en) * 2018-08-14 2019-01-01 平安壹钱包电子商务有限公司 Test code generating method, device, computer equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324531A (en) * 2020-02-05 2020-06-23 香港乐蜜有限公司 Application program testing method and device, electronic equipment and storage medium
CN111488539A (en) * 2020-04-08 2020-08-04 中国银行股份有限公司 Page adjusting method and device
CN111488539B (en) * 2020-04-08 2023-04-21 中国银行股份有限公司 Page adjustment method and device
CN112685299A (en) * 2020-12-25 2021-04-20 广东乐心医疗电子股份有限公司 Automatic test method, device, electronic equipment and readable storage medium
CN112860559A (en) * 2021-02-19 2021-05-28 一汽解放汽车有限公司 Upgrade test system and method
CN113468068A (en) * 2021-07-21 2021-10-01 腾讯科技(深圳)有限公司 Virtual resource testing method and device, storage medium and electronic equipment
CN113468068B (en) * 2021-07-21 2023-08-25 腾讯科技(深圳)有限公司 Virtual resource testing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110597720A (en) Application program testing method and device, electronic equipment and storage medium
CN110337641B (en) Determining application test results using screen shot primitive data
US9747191B1 (en) Tool to replicate actions across devices in real time for improved efficiency during manual application testing
US11036615B2 (en) Automatically performing and evaluating pilot testing of software
CN107145782B (en) Abnormal application program identification method, mobile terminal and server
US10528247B2 (en) Operation system having touch operation enabling use of large screen area, operation control method, and operation control program
CN107193743B (en) Application evaluation method and device, computer equipment and storage medium
CN106599680B (en) Method and device for setting application program permission and electronic equipment
CN107733984A (en) A kind of method, terminal and computer-readable recording medium for pushing screen locking information
CN108038398B (en) Two-dimensional code analysis capability test method and device and electronic equipment
CN106250182B (en) File processing method and device and electronic equipment
CN110597584A (en) Page adaptation testing method and device, electronic equipment and storage medium
CN111596971B (en) Application cleaning method and device, storage medium and electronic equipment
CN112966438A (en) Machine learning algorithm selection method and distributed computing system
CN107967207A (en) The test method and device of user interface interaction function
CN110502414B (en) Terminal equipment performance test method and device, terminal equipment and storage medium
CN108845955B (en) Chinese input method test method and device and electronic equipment
CN104881224A (en) Method and device for adding cards
CN108847948B (en) Method and device for creating activity group, medium and computing equipment
CN109407953A (en) Using lookup method, device, computer installation and storage medium
CN111047332B (en) Model training and risk identification method, device and equipment
CN109756350A (en) A kind of method and apparatus of the PUSH message in group session
CN105262829B (en) Geographical position monitoring method and system
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN106708705B (en) Terminal background process monitoring method and system

Legal Events

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

Effective date of registration: 20210603

Address after: 25, 5th floor, shuangjingfang office building, 3 frisha street, 189352, Singapore

Applicant after: Zhuomi Private Ltd.

Address before: Room 1101, Santai Commercial Building, 139 Connaught Road, Hong Kong, China

Applicant before: HONG KONG LIVE.ME Corp.,Ltd.