CN111506492A - 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
CN111506492A
CN111506492A CN201910101124.1A CN201910101124A CN111506492A CN 111506492 A CN111506492 A CN 111506492A CN 201910101124 A CN201910101124 A CN 201910101124A CN 111506492 A CN111506492 A CN 111506492A
Authority
CN
China
Prior art keywords
program
application program
target application
target
random
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.)
Granted
Application number
CN201910101124.1A
Other languages
Chinese (zh)
Other versions
CN111506492B (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 terminal is controlled to run a first test program, and a first random event is sent to a target application program installed on the terminal; triggering the target application program to respond to a first random operation of a target in the first random event and then entering a ramming state, wherein the target application program cannot normally run a test program in the ramming state; and the control terminal runs a second test program, sends a second random event to the target application program, and triggers the target application program to respond to a second random operation of a target in the second random event and then adjusts the target application program from a tamping state to a normal state so as to complete 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 an 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, and monkey test is unordered random operation, which sometimes causes the rammer of the tested application program, for example, the tested application program is stuck in a certain interface and cannot continue to respond, and at this time, the rammer problem can be solved only by manual intervention, for example, restarting the test program, thereby reducing the test efficiency.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for testing an application program, which are used for reducing manual operation and improving the testing 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 a terminal, wherein the test program comprises a first test program and a second test program;
the method comprises the steps that a terminal is controlled to run 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 enter a ramming state after responding to first random operation of a target in the first random event, and the target application program cannot run the test program normally in the ramming state;
and the control terminal runs a second test program, sends a second random event to the target application program, and triggers the target application program to respond to a second random operation of a target in the second random event and then adjusts the target application program from a tamping state to a normal state so as to complete 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 comprises at least two different second random operations; the method further comprises the following steps:
triggering a second random operation contained by the target application program responding to the second random event;
and after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state.
In one embodiment, the method further comprises:
determining a target second random operation based on the target first random operation which triggers the target application program to enter the ramming 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 on a terminal;
acquiring a target configuration parameter corresponding to a first program feature of the target application program, and configuring the test program;
and running the configured test program.
In one embodiment, the method further comprises:
acquiring a mapping table representing the corresponding relation between the program characteristics and the configuration parameters;
target configuration parameters corresponding to the first program features are determined based on the mapping table.
In one embodiment, the method further comprises:
after a test program corresponding to the terminal is started, the first test program and the second test program are run in parallel; or,
and after a test program corresponding to the terminal is started and the target application program is detected to enter a ramming state, running a second test program.
In a second aspect, an embodiment of the present invention provides an apparatus for testing an application, including:
the starting unit is used for starting a test program corresponding to the terminal, and the test program comprises a first test program and a second test program;
the first control unit is used for controlling a 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 respond to a first random operation of a target in the first random event and then enter a ramming state, wherein the target application program cannot normally run the test program in the ramming state;
and 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 a second target random operation in the second random event and then adjusting the target application program from a tamping state to a 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 comprises at least two different second random operations;
the second control unit is further configured to trigger the target application to respond to a second random operation included in the second random event; and after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state.
In an 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 program to enter a ramming 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 by the terminal; acquiring a target configuration parameter corresponding to a first program feature of the target application program, and configuring the test program;
the starting unit is also used for running the configured test program.
In an embodiment, the screening unit is further configured to obtain a mapping table representing a correspondence between program features and configuration parameters; target configuration parameters corresponding to the first program features are determined based on the mapping table.
In an 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 the target application program is detected to enter the ramming state, running a second test program.
In a third aspect, an embodiment of the present invention provides an application program testing device, where functions of the device may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the device includes a processor and a memory, the memory is used for storing a program for supporting the device to execute the testing 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 a communication network.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer software instructions for a testing apparatus for an application program, which includes a program for executing the testing 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 test program corresponding to a terminal is started, the terminal is controlled to run 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 enter a ramming state after responding to a target first random operation in the first random event, the terminal is controlled to run a second test program, a second random event is sent to the target application program, the target application program is further triggered to respond to a target second random operation in the second random event, and then the ramming state is adjusted to a normal state, so that the ramming 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 during the process of testing the target application program, the test program itself can be still used to solve the problem, the test coverage is continued, and no manual intervention is required during the process, so that the effective operation within the fixed execution time is improved, and the test efficiency is improved.
The foregoing summary is provided for the purpose of description 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 be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
FIG. 1 shows a flow diagram of a method of testing an application according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an application scenario of a test method for an application according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an application scenario of a method for testing an application according to an embodiment of the present invention;
FIG. 4 shows a flow diagram of a method of testing an application according to an embodiment of the invention;
FIG. 5 is a block diagram showing a configuration of a test apparatus for an application according to an embodiment of the present invention;
FIG. 6 is a block diagram showing a configuration 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 for an application according to an embodiment of the present invention.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all 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 App monkey testing is google native monkey, but native monkey has the defect of complete disorder randomness, if the App to be tested is clamped behind a certain interface, the monkey cannot continuously respond to monkey testing, the test coverage cannot be continuously increased, the execution time is wasted, and the test efficiency is reduced.
For example, the following scenario often occurs during the testing process:
scene one: the App enters the description introduction interface after being installed for the first time, and at the moment, in the monkey test process, the conventional random operation cannot control the App to cross the description introduction interface, and the test coverage cannot be normally carried out under the condition of no manual intervention.
Scene two: and skipping for multiple times after entering a webview type third-party webpage interface or advertisement interface, wherein a return key cannot return to the tested App and is stuck in a third-party page, and at the moment, conventional random operation in the monkey testing process cannot control the third-party page to be crossed, and the test coverage cannot be normally carried out without manual intervention.
Scene three: random events in the monkey testing process hit the flight mode, so that the network is disconnected, and at the moment, many scenes cannot be covered by testing.
Scene four: random events in the monkey testing process cause the App to jump out of the tested App, and normal testing cannot be completed.
The existing native monkey cannot intervene in the scenes, and only after manual discovery, manual intervention is performed, such as restarting and re-execution, so that the testing efficiency is reduced.
Based on this, embodiments of the present invention provide a method and an apparatus for testing an application program, a device, and a storage medium, so as to solve the above problems, reduce the probability of deadlock, improve effective operation within a fixed execution time, and further improve the test coverage.
Fig. 1 shows a flowchart of a testing method of an application according to an embodiment of the present 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 according to the embodiment of the present invention is executed in a terminal, at this time, a test program is installed in the terminal, and a plurality of application programs are installed simultaneously, where the target application program is any one of the plurality of application programs installed in the terminal.
In another specific scenario, as shown in fig. 3, the method according to the embodiment of the present invention is applied to a control platform, for example, when the method is executed on a control server side, the control platform interacts with a terminal through a network, and tests a target application 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 types of application programs installed in the terminal.
In this embodiment, the test program corresponding to the terminal may specifically be 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, that is, a test program capable of detecting the target application program. Of course, in practical applications, the test programs corresponding to different application programs may be the same or different.
In a specific scenario, as shown in fig. 4, the test program corresponding to the 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 on a terminal; for example, a target application program for testing is selected from a plurality of types of application programs installed in the terminal.
Step 101-2: acquiring a target configuration parameter corresponding to a first program feature 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 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: acquiring a mapping table representing the corresponding relation between the program characteristics and the configuration parameters; target configuration parameters corresponding to the first program features are determined based on the mapping table. Therefore, the configuration process can be automatically completed in the terminal after the test program is started without manually memorizing and configuring complex parameters, the test flow is simplified, and a foundation is further laid for improving the test efficiency.
Step 102: the method comprises the steps of controlling a 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 respond to a first random operation of a target in the first random event and then enter a ramming state, wherein the target application program cannot normally run the test program in the ramming state.
In a specific scenario, the first random event includes at least two different first random operations; the target first random operation is one of the first random operations included 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; furthermore, the target first random operation and the target second random operation have an incidence relation, namely the target second random operation can intervene in a target application program which enters a ramming state after responding to the target first random operation and trigger the target application program to enter a normal state, so that the problem of ramming is solved, a foundation is laid for enabling the test to continue to cover, and a foundation is laid for improving the test efficiency.
Here, the target application may continue to perform test coverage in response to any other first random operation included in the first random event.
Specifically, in practical application, the first test program may specifically be a monkey test, the first random event includes a plurality of first random operations, and the first random operation may specifically simulate any one of a key input operation, a touch screen input operation (that is, a touch operation), a gesture input, and the like of a user. The target application program can continue to perform test coverage after responding to the first random operation in the monkey test, but enters a ramming state after responding to the first random operation of the target, and cannot perform test coverage.
Step 103: and the control terminal runs a second test program, sends a second random event to the target application program, and triggers the target application program to respond to a second random operation of a target in the second random event and then adjusts the target application program from a tamping state to a normal state so as to complete 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 comprises at least two different second random operations; the method further comprises the following steps: triggering a second random operation contained by the target application program responding to the second random event; and after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state. For example, after the target application program is in the tamper status, or before the target application program is in the tamper status, the target application program is also responding to the second random operation included in the second random event; further, after the target application program responds to the first random operation of the target and enters a ramming state, the target application program can still continue to respond to the second random operation; and then, after responding to a target second random operation having an association relation with the target first random operation, triggering the target application program to adjust from a ramming state to a normal state, and further enabling the target application program to continue to carry out 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, which triggers the target application program to enter a tamper-dead state, and specifically, the method further includes: determining at least one target second random operation based on at least one target first random operation which triggers the target application program to enter a ramming 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; therefore, the tamping state entered based on the first test program can be unlocked by the second test program, and the test coverage is continued, so that compared with the prior art, the test method provided by the embodiment of the invention can reduce the tamping probability of the application program in the test process, and meanwhile, the effective operation in the fixed execution time can be improved, thereby improving the test efficiency.
Or, in another specific example, the second test program is started and run after detecting that the target application program enters the tamper-evident state, that is, after starting the test program corresponding to the terminal and detecting that the target application program enters the tamper-evident state, the second test program is run. Of course, in practical application, the execution mode may be selected based on an actual scene, actual working efficiency, and the like, which is not limited in this embodiment.
In this example, the mobile phone end executes a test program, which is a visual program installed on the mobile phone end, and is simple and convenient; the test program comprises a monkey test and a second test program, and during the execution process, the second test program is used for user-defined user scene intervention, so that the blocking of the tested application program is avoided. In particular, the amount of the solvent to be used,
step 1: selecting a tested App; and at the mobile phone end, acquiring configuration parameters corresponding to the program characteristics of the App to be tested, such as App name, version and the like, and configuring the test program.
In the method, manual memory or copy complex commands and parameters are not needed, so that the operation of detection personnel is simplified, and a foundation is laid for improving the detection efficiency.
Step 2: and starting the App (application) automatic service, namely starting the configured test program, wherein the monkey test and the second test program are executed in parallel.
The monkey test is a random event and comprises a plurality of first random operations; the second test procedure is also a random event comprising a plurality of second random operations. The monkey test and the second test program are executed in parallel, and certainly, in the process of parallel execution, the second test program may be started at regular time, that is, after the preset time duration is reached, the second test program is triggered to run, so that the second test program and the monkey test are executed in parallel.
And step 3: after the tested App enters the ramming state in response to the random operation in the monkey test, the tested App performs automatic random intervention based on the random operation in the second test program, specifically,
scene one: the App enters the description introduction interface after being installed for the first time, and at the moment, the App cannot be controlled to cross the description introduction interface by conventional random operation in the monkey test process.
The solution is as follows: and using App (application) IU (application layer) automation service, forcibly sliding left for 5 times or sliding right for 5 times based on the target second random operation in the second test program, further triggering the tested application program to adjust from the ramming state to the normal state, and continuing to perform monkey testing. The process does not need to manually force the left sliding 5 times or the right sliding 5 times, so the testing efficiency is improved.
Scene two: and skipping for multiple times after entering a webview type third-party webpage interface or advertisement interface, wherein a return key cannot return to the tested App and is blocked on the third-party webpage.
The solution is as follows: and using App (application) IU (application layer) automation service, controlling the android api to forcibly stop the tested App based on the target second random operation in the second test program, restarting the tested App, triggering the tested application program to adjust from a rammed state to a normal state, and continuing to perform monkey testing.
Scene three: random events in the monkey testing process hit the flight mode, so that the network is disconnected, and at the moment, many scenes cannot be covered by testing.
The solution is as follows: and using App (application, integration and integration) automation service to control the android api to shield the notification bar based on the target second random operation in the second test program so as to avoid hitting the flight mode.
Scene four: random events in the monkey testing process cause the App to jump out of the tested App, and normal testing cannot be completed.
The solution is as follows: and using App (application) IU (automated application) services, controlling an android interface to randomly start the tested App based on target second random operation in the second test program, and further continuing to complete the coverage of monkey test.
As such, the tamper problem of the target application is solved with 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 during the process of testing the target application program, the test program itself can be still used to solve the problem, the test coverage is continued, and no manual intervention is required during the process, so that the effective operation within the fixed execution time is improved, and the test efficiency is improved.
An embodiment of the present invention further provides a device for testing an application program, and as shown in fig. 5, the device includes:
the starting unit 51 is configured to start a test program corresponding to a 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 installed in the terminal, and trigger the target application to enter a tamper state after responding to a first random operation of a target in the first random event, where the target application cannot run the test program normally in the tamper state;
and 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, trigger the target application program to respond to a second target random operation in the second random event, and then adjust the target application program from a tamper 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 comprises 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 after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state.
In one embodiment, the starting unit 51 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 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 in the terminal; acquiring a target configuration parameter corresponding to a first program feature of the target application program, and configuring the test program;
the starting unit 51 is further configured to run the configured test program.
In an embodiment, the screening unit 54 is further configured to obtain a mapping table representing a correspondence between program features and configuration parameters; target configuration parameters corresponding to the first program features are determined based on the mapping table.
In an 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 the target application program is detected to enter the ramming state, running a second test program.
The functions of each module in each apparatus in the embodiments of the present invention may refer to the corresponding description in the above method, and are not described herein again.
Fig. 7 shows a block diagram of a test apparatus for an application according to an embodiment of the present invention. As shown in fig. 7, the apparatus includes: memory 710 and processor 720. memory 710 has stored therein computer programs that are executable on processor 920. The processor 720, when executing the computer program, implements the testing method of the application program in the above embodiments. The number of the memory 710 and the processor 720 may be one or more.
The apparatus further comprises:
and a communication interface 730, configured to communicate with an external device, and perform data interactive transmission.
Memory 710 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 710, the processor 720 and the communication interface 730 are implemented independently, the memory 710, the processor 720 and the communication interface 730 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Optionally, in an 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 complete communication with each other through an internal interface.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is used for implementing the method of any one of the above embodiments when being executed by a processor.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean 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 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, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically 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 alternate 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.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement 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). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can 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 should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, 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 person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present invention, and these should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. A method for testing an 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 method comprises the steps that a terminal is controlled to run 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 enter a ramming state after responding to first random operation of a target in the first random event, and the target application program cannot run the test program normally in the ramming state;
and the control terminal runs a second test program, sends a second random event to the target application program, and triggers the target application program to respond to a second random operation of a target in the second random event and then adjusts the target application program from a tamping state to a normal state so as to complete 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 comprises at least two different second random operations; the method further comprises the following steps:
triggering a second random operation contained by the target application program responding to the second random event;
and after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state.
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 which triggers the target application program to enter the ramming state;
a second random event is formed based on the target second random operation.
4. The method of claim 1, further comprising:
selecting a target application program installed on a terminal;
acquiring a target configuration parameter corresponding to a first program feature of the target application program, and configuring the test program;
and running the configured test program.
5. The method of claim 1 or 4, further comprising:
acquiring a mapping table representing the corresponding relation between the program characteristics and the configuration parameters;
target configuration parameters corresponding to the first program features are determined based on the mapping table.
6. The method of claim 1, further comprising:
after a test program corresponding to the terminal is started, the first test program and the second test program are run in parallel; or,
and after a test program corresponding to the terminal is started and the target application program is detected to enter a ramming state, running a second test program.
7. An apparatus for testing an application, the apparatus comprising:
the starting unit is used for starting a test program corresponding to the terminal, and the test program comprises a first test program and a second test program;
the first control unit is used for controlling a 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 respond to a first random operation of a target in the first random event and then enter a ramming state, wherein the target application program cannot normally run the test program in the ramming state;
and 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 a second target random operation in the second random event and then adjusting the target application program from a tamping state to a 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 comprises at least two different second random operations;
the second control unit is further configured to trigger the target application to respond to a second random operation included in the second random event; and after the target application program is determined to respond to the target second random operation corresponding to the target first random operation, triggering the target application program to be adjusted from a tamping state to a normal state.
9. The apparatus of claim 7, further comprising:
the screening unit is used for selecting a target application program installed by the terminal; acquiring a target configuration parameter corresponding to a first program feature 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 according to claim 7, wherein 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 the target application program is detected to enter the ramming state, running a second test program.
11. An apparatus for testing an application, comprising:
one or more processors;
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, in which a computer program is stored which, when being executed by a processor, carries out the method according to 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 true CN111506492A (en) 2020-08-07
CN111506492B 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 (9)

* 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
CN103942146A (en) * 2014-04-22 2014-07-23 上海斐讯数据通信技术有限公司 Visual Monkey test method and device
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
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
US20180089065A1 (en) * 2016-09-26 2018-03-29 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
CN108563539A (en) * 2018-03-21 2018-09-21 广州视源电子科技股份有限公司 Interface testing method, server, readable storage medium and system
CN109240924A (en) * 2018-09-03 2019-01-18 中国平安人寿保险股份有限公司 A kind of test method and equipment of application program

Patent Citations (9)

* 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
CN103942146A (en) * 2014-04-22 2014-07-23 上海斐讯数据通信技术有限公司 Visual Monkey test method and device
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
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
US20180089065A1 (en) * 2016-09-26 2018-03-29 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
CN108563539A (en) * 2018-03-21 2018-09-21 广州视源电子科技股份有限公司 Interface testing method, server, readable storage medium and system
CN109240924A (en) * 2018-09-03 2019-01-18 中国平安人寿保险股份有限公司 A kind of test method and equipment of application program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ASHLIE MARTINEZ 等: "Crashmonkey: a framework to systematically test file-system crash consistency" *
卢昌鑫: "Android应用程序自动化测试检测系统的研究与实现" *
谷林涛 等: "基于GUI的Android移动软件性能测试" *

Also Published As

Publication number Publication date
CN111506492B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
US10409635B2 (en) Switching method, switching system and terminal for system and/or application program
CN108363507B (en) Touch screen dead zone compensation method and device, electronic equipment and storage medium
EP3509270A1 (en) Data backup method and device, storage medium and electronic apparatus
CA2741982C (en) Apparatus and method for monitoring a computer system
CN107544902B (en) Program testing method, device and equipment
CN107621963B (en) Software deployment method, software deployment system and electronic equipment
CN104346279A (en) Method and device for software testing
CN110806965A (en) Automatic test method, device, equipment and medium
CN108519935B (en) Board card testing method and device, readable storage medium and computer equipment
US20120072779A1 (en) Memory leak monitoring device and method for monitoring memory leak
CN110618853B (en) Detection method, device and equipment for zombie container
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN106919489B (en) Method and device for monitoring abnormal exit of application interface of application program
CN105574410A (en) Application program safety detection method and device
CN111506492B (en) Application program testing method and device, equipment and storage medium
CN108508349A (en) Board card storage response test method and system, storage medium and computer equipment
EP4354293A1 (en) Detection method and apparatus, and electronic device
CN109800146B (en) Application program start time testing method and device, computer equipment and storage medium
CN108984238B (en) Gesture processing method and device of application program and electronic equipment
CN114721968B (en) Test method, test device and storage medium
CN111045876A (en) Splash screen detection method and device, storage medium and electronic equipment
CN106201258A (en) A kind of information processing method and electronic equipment
CN108959931B (en) Vulnerability detection method and device, information interaction method and equipment
CN106326049B (en) A kind of Fault Locating Method and terminal
CN111797016B (en) Application program testing method, device, storage medium and device

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