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

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

Info

Publication number
CN111506492B
CN111506492B CN201910101124.1A CN201910101124A CN111506492B CN 111506492 B CN111506492 B CN 111506492B CN 201910101124 A CN201910101124 A CN 201910101124A CN 111506492 B CN111506492 B CN 111506492B
Authority
CN
China
Prior art keywords
program
application program
test
random
target application
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
CN201910101124.1A
Other languages
Chinese (zh)
Other versions
CN111506492A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910101124.1A priority Critical patent/CN111506492B/en
Publication of CN111506492A publication Critical patent/CN111506492A/en
Application granted granted Critical
Publication of CN111506492B publication Critical patent/CN111506492B/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/3692Test management for test results analysis
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a method, a device, equipment and storage equipment for testing an application program, wherein the method comprises the following steps: starting a test program corresponding to the terminal; the method comprises the steps that a control terminal runs a first test program and sends a first random event to a target application program installed on the terminal; triggering the target application program to enter a tamping state after responding to a first random operation of a target in the first random event, wherein the target application program can not normally run a test program in the tamping state; and the control terminal runs a second test program, sends a second random event to the target application program, triggers the target application program to respond to the second random operation of the target in the second random event, and adjusts the target application program from the ramming state to the normal state so as to finish the detection of the target application program. Therefore, the tamping probability is reduced, the effective operation in the fixed execution time is improved, and the test coverage rate is further improved.

Description

Application program testing method and device, equipment and storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a method and apparatus for testing an application program, a device, and a storage medium.
Background
In the prior art, a native monkey test program is often used to test an application program (App) installed in a terminal, but the monkey test is a random operation, sometimes the tamper of the tested application program is caused, for example, the tested application program is blocked at a certain interface and cannot continue to respond to the operation, at this time, the problem of tamping can only be solved by manual intervention, for example, restarting the test program, so that the test efficiency is reduced.
Disclosure of Invention
The embodiment of the invention provides a test method, a test device, test equipment and a test storage medium for an application program, which are used for reducing manual operation and improving test efficiency.
In a first aspect, an embodiment of the present invention provides a method for testing an application program, including:
starting a test program corresponding to the terminal, wherein the test program comprises a first test program and a second test program;
the method comprises the steps that a control terminal runs a first test program, a first random event is sent to a target application program installed on the terminal, the target application program is triggered to respond to first random operation of a target in the first random event and then enter a tamping state, and the test program cannot be normally run by the target application program in the tamping state;
and the control terminal runs a second test program, sends a second random event to the target application program, triggers the target application program to respond to the second random operation of the target in the second random event, and adjusts the target application program from the ramming state to the normal state so as to finish the detection of the target application program.
In one embodiment, the first random event comprises at least two different first random operations; the second random event includes at least two different second random operations; the method further comprises the steps of:
triggering a second random operation contained in the target application program responding to the second random event;
and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation.
In one embodiment, the method further comprises:
determining a target second random operation based on the target first random operation triggering the target application program to enter a rammed state;
a second random event is formed based on the target second random operation.
In one embodiment, the method further comprises:
selecting a target application program installed by a terminal;
acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program;
and running the configured test program.
In one embodiment, the method further comprises:
obtaining a mapping table representing the corresponding relation between the program features and the configuration parameters;
and determining target configuration parameters corresponding to the first program features based on the mapping table.
In one embodiment, the method further comprises:
after a test program corresponding to a terminal is started, the first test program and the second test program are operated in parallel; or alternatively, the process may be performed,
and after the test program corresponding to the terminal is started, and the target application program is detected to enter a tamping state, a second test program is operated.
In a second aspect, an embodiment of the present invention provides a test apparatus for an application program, including:
the starting unit is used for starting a test program corresponding to the terminal, wherein the test program comprises a first test program and a second test program;
the first control unit is used for controlling the terminal to run a first test program, sending a first random event to a target application program installed on the terminal, triggering the target application program to enter a tamping state after responding to a first random operation of a target in the first random event, and enabling the target application program to not normally run the test program in the tamping state;
the second control unit is used for controlling the terminal to run a second test program, sending a second random event to the target application program, triggering the target application program to respond to the second random operation in the second random event and then adjusting the second random operation from the tamping state to the normal state so as to finish the detection of the target application program.
In one embodiment, the first random event comprises at least two different first random operations; the second random event includes at least two different second random operations;
the second control unit is further configured to trigger the target application program to respond to a second random operation included in the second random event; and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation.
In one embodiment, the starting unit is further configured to determine a target second random operation based on a target first random operation that triggers the target application to enter a tamper state; a second random event is formed based on the target second random operation.
In one embodiment, the apparatus further comprises:
the screening unit is used for selecting a target application program installed on the terminal; acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program;
the starting unit is also used for running the configured test program.
In one embodiment, the screening unit is further configured to obtain a mapping table that characterizes a correspondence between program features and configuration parameters; and determining target configuration parameters corresponding to the first program features based on the mapping table.
In one embodiment, the starting unit is further configured to run the first test program and the second test program in parallel after starting the test program corresponding to the terminal; or after the test program corresponding to the terminal is started, and after the target application program is detected to enter the tamping state, a second test program is operated.
In a third aspect, an embodiment of the present invention provides an application program testing device, where the function of the device may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In one possible design, the structure of the device includes a processor and a memory, where the memory is used to store a program for supporting the device to execute the test method of the application program, and the processor is configured to execute the program stored in the memory. The device may also include a communication interface for communicating with other devices or communication networks.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer software instructions for use by a test apparatus for an application program, including a program for executing the test method for the application program.
One of the above technical solutions has the following advantages or beneficial effects:
the method comprises the steps that a first test program is controlled to run by a terminal through starting a test program corresponding to the terminal, a first random event is sent to a target application program installed by the terminal, the target application program is triggered to enter a tamping state after responding to a first random operation of a target in the first random event, a second test program is controlled to run by the terminal, a second random event is sent to the target application program, and then the target application program is triggered to respond to a second random operation of the target in the second random event and then is adjusted to a normal state from the tamping state, so that the tamping problem of the target application program is solved by utilizing the second random operation of the target in the second random event; here, since the target second random operation is a random operation included in the test program, even if a tamper state occurs in the process of testing the target application program, the problem can still be solved by using the test program itself, and the test coverage is continued without manual intervention in the process, so that the effective operation in the fixed execution time is improved, and the test efficiency is improved.
The foregoing summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will become apparent by reference to the drawings and the following detailed description.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the disclosure and are not therefore to be considered limiting of its scope.
FIG. 1 illustrates a flow chart of a method of testing an application program according to an embodiment of the invention;
fig. 2 shows an application scenario diagram of a test method of an application program according to an embodiment of the present invention;
fig. 3 shows an application scenario diagram of a test method of an application program according to an embodiment of the present invention;
FIG. 4 shows a flow chart of a test method of an application according to an embodiment of the invention;
FIG. 5 shows a block diagram of a test apparatus for an application according to an embodiment of the present invention;
FIG. 6 shows a block diagram of a test apparatus for an application according to an embodiment of the present invention;
fig. 7 shows a block diagram of a test apparatus of an application program according to an embodiment of the present invention.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those of skill in the pertinent art, the described embodiments may be modified in various different ways without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive.
The most widely used scheme for the App monkey test is google native monkey, but the native monkey has the defect of being completely disordered and random, if the tested App is clamped on a certain interface, the test cannot be responded continuously, the test coverage cannot be increased continuously, the execution time is wasted, and the test efficiency is reduced.
For example, the following scenario often occurs during testing:
scene one: and after the App is firstly installed, entering an instruction introduction interface, wherein in the monkey test process, the conventional random operation cannot control the App to cross the instruction introduction interface, and the test coverage cannot be normally performed under the condition of no manual intervention.
Scene II: the webview type third-party webpage interface or advertisement interface can not be jumped back to the tested App for multiple times after entering, and the return key can not be blocked on the third-party webpage, at this time, the conventional random operation in the monkey test process can not be controlled to cross the third-party webpage, and the test coverage can not be normally carried out under the condition of no manual intervention.
Scene III: random events in the monkey test process hit the flight mode, resulting in a broken network, at which time many scenarios cannot be tested for coverage.
Scene four: the random event in the monkey test process causes the tested App to jump out, and normal test cannot be completed.
The prior original monkey cannot perform the intervention of the scene, and only can perform manual intervention, such as restarting and re-executing, after manual discovery, so that the testing efficiency is reduced.
Based on the above, the embodiment of the invention provides a testing method and device, equipment and storage medium of an application program, so that the problems are solved, the tamping probability is reduced, the effective operation in the fixed execution time is improved, and the testing coverage rate is further improved.
Fig. 1 shows a flow chart of a test method of an application program according to an embodiment of the invention. As shown in fig. 1, the method includes:
step 101: and starting a test program corresponding to the terminal, wherein the test program comprises a first test program and a second test program.
In this embodiment, the terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like.
In a specific scenario, as shown in fig. 2, the method in the embodiment of the present invention is executed in a terminal, and at this time, a test program is installed in the terminal, and meanwhile, a plurality of applications in the terminal are installed, and the target application is any one of the plurality of applications installed in the terminal.
In another specific scenario, as shown in fig. 3, the method of the embodiment of the present invention is applied to a control platform, for example, executed on a control server side, where the control platform interacts with a terminal through a network, and tests a target application program installed on the terminal by using a test program, where the test program may be installed on the control platform or may be installed on the terminal. The target application program is any one of a plurality of application programs installed in the terminal.
In this embodiment, the test program corresponding to the terminal may be specifically a test program matched with an operating system of the terminal; further, the test program may also be a test program matched with the target application program, i.e. a test program capable of detecting the target application program. Of course, in practical application, the test programs corresponding to different application programs may be the same or different.
In a specific scenario, as shown in fig. 4, a test procedure corresponding to a start terminal in the method according to the embodiment of the present invention may specifically include the following steps, that is, step 101 may specifically be:
step 101-1: selecting a target application program installed by a terminal; for example, a target application program to be tested is selected from among a plurality of application programs installed in the terminal.
Step 101-2: acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program; in practical applications, the first program feature may include, but is not limited to, an application program name, a version, a program identifier, a program configuration parameter, and the like.
Step 101-3: and running the configured test program.
In another specific scenario, before configuring the test program, the method further includes: obtaining a mapping table representing the corresponding relation between the program features and the configuration parameters; and determining target configuration parameters corresponding to the first program features based on the mapping table. Therefore, the configuration process can be automatically completed in the terminal after the test program is started without manual memory and complex parameter configuration, the test flow is simplified, and a foundation is further laid for improving the test efficiency.
Step 102: the method comprises the steps that a control terminal runs a first test program, a first random event is sent to a target application program installed in the terminal, the target application program is triggered to respond to first random operation of a target in the first random event and then enter a tamping state, and the test program cannot be normally run by the target application program in the tamping state.
In a specific scenario, the first random event includes at least two different first random operations; the target first random operation is one operation of first random operations contained in the first random event; the second random event comprises at least two different second random operations, and the target second random operation is one of the second random operations contained in the second random event; further, the first random operation of the target and the second random operation of the target have an association relation, namely the second random operation of the target can intervene on the target application program which enters the tamping state after responding to the first random operation of the target and trigger the target application program to enter the normal state, so that the tamping problem is solved, a foundation is laid for enabling the test to be continuously covered, and meanwhile, a foundation is laid for improving the testing efficiency.
Here, the target application can continue to perform test coverage after responding to any other first random operation included in the first random event.
Specifically, in practical application, the first test program may be a monkey test, the first random event includes a plurality of first random operations, and the first random operations may be any operation such as a key input operation, a touch screen input operation (i.e. a touch operation), a gesture input operation, and the like of the simulation user. The target application program can respond to the first random operation in the monkey test and then continue to conduct test coverage, but after responding to the first random operation of the target, the target application program enters a tamping state and cannot conduct test coverage.
Step 103: and the control terminal runs a second test program, sends a second random event to the target application program, triggers the target application program to respond to the second random operation of the target in the second random event, and adjusts the target application program from the ramming state to the normal state so as to finish the detection of the target application program.
In a specific scenario, the first random event includes at least two different first random operations; the second random event includes at least two different second random operations; the method further comprises the steps of: triggering a second random operation contained in the target application program responding to the second random event; and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation. For example, after the target application is in the tamper state, or before the target application is in the tamper state, the target application is also responding to a second random operation contained in the second random event; further, after the target application program enters a tamper state in response to a target first random operation, the target application program can still continue to respond to the second random operation; and then, after responding to a target second random operation with an association relation with the target first random operation, triggering the target application program to adjust from the ramming state to the normal state, and further enabling the target application program to continue to conduct test coverage.
In another specific scenario, the second test program is determined based on at least one target first random operation in the first test program that triggers the target application program to enter the rammed state, and specifically, the method further includes: determining at least one target second random operation based on at least one target first random operation triggering the target application to enter a tamper state; a second random event is formed based on the at least one target second random operation.
In a specific example, the first test program and the second test program are executed in parallel, for example, after the test program corresponding to the terminal is started, the first test program and the second test program are run in parallel; in this way, the second test program can be utilized to unlock the tamping state entered based on the first test program and enable the test coverage to continue, so compared with the prior art, the test method disclosed by the embodiment of the invention can reduce the tamping probability of the application program in the test process, and meanwhile, can improve the effective operation within the fixed execution time, thereby improving the test efficiency.
Or in another specific example, the second test program is started and operated after the target application program is detected to enter the tamper state, that is, after the test program corresponding to the terminal is started, and after the target application program is detected to enter the tamper state, the second test program is operated. Of course, in practical application, the execution mode may be selected based on the actual scene, the actual working efficiency, and the like, which is not limited in this embodiment.
The following describes the embodiments of the present invention in further detail with reference to specific examples, in which, in the present example, a mobile phone end executes a test program, which is a visual program installed on the mobile phone end, simply and conveniently; the test program comprises a monkey test and a second test program, and in the execution process, the second test program is utilized to perform user-defined user scene intervention, so that the tested application program is prevented from being blocked. In particular, the method comprises the steps of,
step 1: selecting a tested App; and acquiring configuration parameters corresponding to program features of the tested App, such as App names, versions and the like, at the mobile phone end, and configuring the test program.
Because of no need of manual memory or copy complex command and parameter, the operation of the detecting personnel is simplified, and a foundation is laid for improving the detecting efficiency.
Step 2: and starting an App ium automation service, namely starting a configured test program, and executing the monkey test in parallel with the second test program at the moment.
The monkey test is a random event and comprises a plurality of first random operations; the second test program is also a random event and comprises a plurality of second random operations. The monkey test is executed in parallel with the second test program, and of course, the second test program may be started at fixed time in the parallel execution process, that is, after the preset duration arrives, the second test program is triggered to run, so that the second test program is executed in parallel with the monkey test.
Step 3: after the tested App enters the tamper state in response to the random operation in the monkey test, an automated random intervention is performed based on the random operation in the second test procedure, specifically,
scene one: the App enters the description introduction interface after being installed for the first time, and at this time, the conventional random operation cannot control the App to cross the description introduction interface in the monkey test process.
The solution is as follows: and forcing left sliding for 5 times or right sliding for 5 times based on a target second random operation in a second test program by using an App ium automation service, triggering the tested application program to adjust from a tamping state to a normal state, and continuing a monkey test. The process does not need to manually force left sliding for 5 times or right sliding for 5 times, so that the testing efficiency is improved.
Scene II: the webview type third-party webpage interface or advertisement interface can not return to the tested App after entering, and is blocked on the third-party webpage.
The solution is as follows: and controlling the android api to forcibly stop the tested App based on a target second random operation in the second test program by using an App ium automation service, restarting the tested App, triggering the tested application program to adjust from a tamping state to a normal state, and continuing the monkey test.
Scene III: random events in the monkey test process hit the flight mode, resulting in a broken network, at which time many scenarios cannot be tested for coverage.
The solution is as follows: using an App ium automation service, controlling an android api mask notification bar based on a target second random operation in a second test program to avoid hitting a flight mode.
Scene four: the random event in the monkey test process causes the tested App to jump out, and normal test cannot be completed.
The solution is as follows: and controlling the android interface to randomly start the tested App based on a target second random operation in a second test program by using an App ium automation service, and further continuously completing the coverage of the monkey test.
Thus, the tamper problem of the target application program is solved by utilizing the target second random operation in the second random event; here, since the target second random operation is a random operation included in the test program, even if a tamper state occurs in the process of testing the target application program, the problem can still be solved by using the test program itself, and the test coverage is continued without manual intervention in the process, so that the effective operation in the fixed execution time is improved, and the test efficiency is improved.
The embodiment of the invention also provides a testing device of the application program, as shown in fig. 5, the device comprises:
a starting unit 51, configured to start a test program corresponding to the terminal, where the test program includes a first test program and a second test program;
the first control unit 52 is configured to control the terminal to run a first test program, send a first random event to a target application program installed on the terminal, trigger the target application program to enter a tamper state after responding to a first random operation of a target in the first random event, and enable the target application program to fail to run the test program normally in the tamper state;
the second control unit 53 is configured to control the terminal to run a second test program, send a second random event to the target application program, and trigger the target application program to respond to a second random operation in the second random event and then adjust from a ramming state to a normal state, so as to complete detection of the target application program.
In one embodiment, the first random event comprises at least two different first random operations; the second random event includes at least two different second random operations;
the second control unit 53 is further configured to trigger the target application to respond to a second random operation included in the second random event; and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation.
In one embodiment, the starting unit 51 is further configured to determine a target second random operation based on the target first random operation triggering the target application program to enter the rammed state; a second random event is formed based on the target second random operation.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
a screening unit 54, configured to select a target application installed on the terminal; acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program;
the starting unit 51 is further configured to run the configured test program.
In one embodiment, the filtering unit 54 is further configured to obtain a mapping table that characterizes the correspondence between the program features and the configuration parameters; and determining target configuration parameters corresponding to the first program features based on the mapping table.
In one embodiment, the starting unit 51 is further configured to run the first test program and the second test program in parallel after starting the test program corresponding to the terminal; or after the test program corresponding to the terminal is started, and after the target application program is detected to enter the tamping state, a second test program is operated.
The functions of each module in each device of the embodiments of the present invention may be referred to the corresponding descriptions in the above methods, and are not described herein again.
Fig. 7 shows a block diagram of a test apparatus of an application program according to an embodiment of the present invention. As shown in fig. 7, the apparatus includes: memory 710 and processor 720, memory 710 having stored thereon a computer program executable on processor 920. The processor 720, when executing the computer program, implements the method for testing the application program in the above embodiment. The number of memory 710 and processors 720 may be one or more.
The apparatus further comprises:
and the communication interface 730 is used for communicating with external devices for data interactive transmission.
The memory 710 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
If memory 710, processor 720, and communication interface 730 are implemented independently, memory 710, processor 720, and communication interface 730 may be interconnected and communicate with each other via a bus. The bus may be an industry standard architecture (ISA, industry Standard Architecture) bus, a peripheral component interconnect (PCI, peripheral Component) bus, or an extended industry standard architecture (EISA, extended Industry Standard Component) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 710, the processor 720, and the communication interface 730 are integrated on a chip, the memory 710, the processor 720, and the communication interface 730 may communicate with each other through internal interfaces.
An embodiment of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements a method as in any of the above embodiments.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that various changes and substitutions are possible within 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 (12)

1. A test method for application program is characterized in that,
starting a test program corresponding to a terminal, wherein the test program comprises a first test program and a second test program, the first test program is a monkey test, and the second test program is determined based on at least one target first random operation of the first test program, which triggers a target application program to enter a tamping state;
the method comprises the steps that a control terminal runs a first test program, a first random event is sent to a target application program installed on the terminal, the target application program is triggered to respond to first random operation of a target in the first random event and then enter a tamping state, and the test program cannot be normally run by the target application program in the tamping state;
and the control terminal runs a second test program, sends a second random event to the target application program, triggers the target application program to respond to the second random operation of the target in the second random event, and adjusts the target application program from the ramming state to the normal state so as to finish the detection of the target application program.
2. The method of claim 1, wherein the first random event comprises at least two different first random operations; the second random event includes at least two different second random operations; the method further comprises the steps of:
triggering a second random operation contained in the target application program responding to the second random event;
and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
determining a target second random operation based on the target first random operation triggering the target application program to enter a rammed state;
a second random event is formed based on the target second random operation.
4. The method according to claim 1, wherein the method further comprises:
selecting a target application program installed by a terminal;
acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program;
and running the configured test program.
5. The method according to claim 1 or 4, characterized in that the method further comprises:
obtaining a mapping table representing the corresponding relation between the program features and the configuration parameters;
and determining target configuration parameters corresponding to the first program features based on the mapping table.
6. The method according to claim 1, wherein the method further comprises:
after a test program corresponding to a terminal is started, the first test program and the second test program are operated in parallel; or alternatively, the process may be performed,
and after the test program corresponding to the terminal is started, and the target application program is detected to enter a tamping state, a second test program is operated.
7. An apparatus for testing an application program, the apparatus comprising:
the starting unit is used for starting a test program corresponding to the terminal, wherein the test program comprises a first test program and a second test program, the first test program is a monkey test, and the second test program is determined based on at least one target first random operation of triggering a target application program to enter a tamping state in the first test program;
the first control unit is used for controlling the terminal to run a first test program, sending a first random event to a target application program installed on the terminal, triggering the target application program to enter a tamping state after responding to a first random operation of a target in the first random event, and enabling the target application program to not normally run the test program in the tamping state;
the second control unit is used for controlling the terminal to run a second test program, sending a second random event to the target application program, triggering the target application program to respond to the second random operation in the second random event and then adjusting the second random operation from the tamping state to the normal state so as to finish the detection of the target application program.
8. The apparatus of claim 7, wherein the first random event comprises at least two different first random operations; the second random event includes at least two different second random operations;
the second control unit is further configured to trigger the target application program to respond to a second random operation included in the second random event; and triggering the target application program to adjust from the ramming state to the normal state after determining that the target application program responds to the target second random operation corresponding to the target first random operation.
9. The apparatus of claim 7, wherein the apparatus further comprises:
the screening unit is used for selecting a target application program installed on the terminal; acquiring a target configuration parameter corresponding to a first program characteristic of the target application program, and configuring the test program;
the starting unit is also used for running the configured test program.
10. The apparatus of claim 7, wherein the starting unit is further configured to run the first test program and the second test program in parallel after starting a test program corresponding to a terminal; or after the test program corresponding to the terminal is started, and after the target application program is detected to enter the tamping state, a second test program is operated.
11. An application program testing apparatus, comprising:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-6.
12. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1 to 6.
CN201910101124.1A 2019-01-31 2019-01-31 Application program testing method and device, equipment and storage medium Active CN111506492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910101124.1A CN111506492B (en) 2019-01-31 2019-01-31 Application program testing method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910101124.1A CN111506492B (en) 2019-01-31 2019-01-31 Application program testing method and device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111506492A CN111506492A (en) 2020-08-07
CN111506492B true CN111506492B (en) 2023-05-26

Family

ID=71872516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910101124.1A Active CN111506492B (en) 2019-01-31 2019-01-31 Application program testing method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111506492B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095063A (en) * 2014-05-12 2015-11-25 腾讯科技(深圳)有限公司 Application program testing method, apparatus and system
CN105095062A (en) * 2014-05-09 2015-11-25 腾讯科技(深圳)有限公司 Application testing method and system
CN108563539A (en) * 2018-03-21 2018-09-21 广州视源电子科技股份有限公司 Interface test method, server, readable storage medium storing program for executing and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838663A (en) * 2012-11-20 2014-06-04 腾讯科技(深圳)有限公司 Application testing method and device
CN103942146B (en) * 2014-04-22 2017-08-04 上海斐讯数据通信技术有限公司 One kind visualization Monkey method of testings and device
CN105094783B (en) * 2014-05-19 2019-12-13 腾讯科技(深圳)有限公司 method and device for testing stability of android application
US10180897B2 (en) * 2016-09-26 2019-01-15 Fujitsu Limited Automated software program repair
CN108363662A (en) * 2018-01-29 2018-08-03 深圳壹账通智能科技有限公司 A kind of applied program testing method, storage medium and terminal device
CN109240924B (en) * 2018-09-03 2024-03-08 中国平安人寿保险股份有限公司 Application program testing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095062A (en) * 2014-05-09 2015-11-25 腾讯科技(深圳)有限公司 Application testing method and system
CN105095063A (en) * 2014-05-12 2015-11-25 腾讯科技(深圳)有限公司 Application program testing method, apparatus and system
CN108563539A (en) * 2018-03-21 2018-09-21 广州视源电子科技股份有限公司 Interface test method, server, readable storage medium storing program for executing and system

Also Published As

Publication number Publication date
CN111506492A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
JP6736130B2 (en) Android based popup prompt method and device
CN110908888B (en) Server testing method and device
CN105302722B (en) CTS automatic testing method and device
CN110896366B (en) Network card function testing method and device of multi-network card equipment and storage medium
CN104346279A (en) Method and device for software testing
CN110806965A (en) Automatic test method, device, equipment and medium
CN109558313B (en) Method and device for constructing abnormal test scene
CN110928777B (en) Test case processing method, device, equipment and storage medium
CN110618853B (en) Detection method, device and equipment for zombie container
CN111506492B (en) Application program testing method and device, equipment and storage medium
CN107122305B (en) Software testing device and method
CN109726124B (en) Test system, test method, management device, test device and computing equipment
CN113238935A (en) Application testing method, system, device, medium, and computer program product
CN115733741B (en) Abnormal scene test method and device for system to be tested
CN111538994A (en) System security detection and repair method, device, storage medium and terminal
CN114721968B (en) Test method, test device and storage medium
CN108959931B (en) Vulnerability detection method and device, information interaction method and equipment
CN112054927B (en) Anti-tampering website updating method and device based on fingerprint verification and electronic equipment
CN111797016B (en) Application program testing method, device, storage medium and device
CN109697356B (en) Application software permission adaptation method and device
CN114356769A (en) Software learning method, device, equipment and storage medium
CN112711495A (en) Display screen fault diagnosis method and device and computer readable storage medium
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN109104748B (en) Network switching control method, mobile terminal and storage medium
CN114741325B (en) Recording method and device of test script for application system test

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