CN110597704B - Pressure test method, device, server and medium for application program - Google Patents

Pressure test method, device, server and medium for application program Download PDF

Info

Publication number
CN110597704B
CN110597704B CN201810610095.7A CN201810610095A CN110597704B CN 110597704 B CN110597704 B CN 110597704B CN 201810610095 A CN201810610095 A CN 201810610095A CN 110597704 B CN110597704 B CN 110597704B
Authority
CN
China
Prior art keywords
test
scene
specific
application program
pressure
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
CN201810610095.7A
Other languages
Chinese (zh)
Other versions
CN110597704A (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 CN201810610095.7A priority Critical patent/CN110597704B/en
Publication of CN110597704A publication Critical patent/CN110597704A/en
Application granted granted Critical
Publication of CN110597704B publication Critical patent/CN110597704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the invention discloses a pressure testing method, a device, a server and a medium for an application program, wherein the method comprises the following steps: executing the UI automation test script to enter a specific test scene of the target application program; performing pressure test on a specific test scene by using a random test tool; in the pressure test process, monitoring whether the current test scene of the target application program is in a specific test scene or not; and if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform the pressure test. The embodiment of the invention solves the problem that the specific service scene of the application program cannot be subjected to the targeted pressure test in the prior art, and improves the pertinence of the pressure test.

Description

Pressure test method, device, server and medium for application program
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a pressure testing method, device, server and medium of an application program.
Background
The stability of mobile Applications (APP) can be determined through stress testing in daily test work, and defects of the product can be exposed by frequently simulating manual operations during the test.
Currently, the pressure testing method of mobile application programs mainly comprises the following two steps:
1) The test is performed directly using a random pressure test tool, such as a Moneky tool. The method comprises the steps of generating a pseudo-random data sequence, wherein each data corresponds to an event unit, and realizing random pressure test by sequentially injecting the event units into a tested system.
2) Testing is performed based on page element traversal. According to the method, each page element in the application program is traversed according to the sequence, then an event is triggered according to the attribute of the page element, and the traversing test is carried out on the functions of each module in the application program.
However, when the random pressure testing tool is directly used for testing or page elements are traversed in sequence for testing, the specific service scene of the application program cannot be subjected to targeted pressure testing.
Disclosure of Invention
The embodiment of the invention provides a pressure test method, a pressure test device, a pressure test server and a pressure test medium for an application program, which are used for solving the problem that the specific service scene of the application program cannot be subjected to targeted pressure test in the prior art.
In a first aspect, an embodiment of the present invention provides a method for testing stress of an application, where the method includes:
executing the UI automation test script to enter a specific test scene of the target application program;
performing pressure test on the specific test scene by using a random test tool;
in the pressure test process, monitoring whether the current test scene of the target application program is in the specific test scene;
and if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform pressure test.
In a second aspect, an embodiment of the present invention further provides a pressure testing apparatus for an application program, where the apparatus includes:
the UI script execution module is used for executing the UI automation test script so as to enter a specific test scene of the target application program;
the pressure test module is used for performing pressure test on the specific test scene by using a random test tool;
the scene monitoring module is used for monitoring whether the current test scene of the target application program is in the specific test scene or not in the pressure test process;
and the scene reentry module is used for executing the UI automation test script and reentering the specific test scene to perform pressure test if the current test scene is monitored not to be in the specific test scene.
In a third aspect, an embodiment of the present invention further provides a server, including:
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 a stress testing method for an application according to any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a stress testing method for an application program according to any of the embodiments of the present invention.
According to the embodiment of the invention, the UI automatic test script is executed, a specific test scene of the target application program is entered, and then the random test tool is utilized to perform pressure test on the specific test scene; in the pressure test process, the current test scene is monitored in real time, and if the current test scene is monitored to be not in the specific test scene, the UI automatic test script is executed to reenter the specific test scene, so that the specific test scene is ensured not to change in the test process. The embodiment of the invention solves the problem that the specific service scene of the application program cannot be subjected to the targeted pressure test in the prior art, and improves the pertinence of the pressure test.
Drawings
FIG. 1 is a flowchart of a pressure testing method for an application program according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a pressure testing method for an application program according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a pressure testing apparatus for an application program according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a pressure testing method for an application program according to an embodiment of the present invention, where the method may be performed by a pressure testing device for an application program, and the device may be implemented in software and/or hardware and may be integrated in a server. As shown in fig. 1, the method specifically includes:
s110, executing the UI automation test script to enter a specific test scene of the target application program.
The pressure test in this embodiment mainly aims at a specific scenario of a software program of an application layer, and does not involve the pressure test on a server layer, where the specific scenario includes a specific running scenario of the application program in a mobile terminal such as a mobile phone, a personal computer, and a tablet computer, for example, a specific page or a specific functional module.
Considering that the simple random pressure test at the application level cannot guarantee the test of a specific page or a specific functional module of an application program, particularly for a complex application program, if the simple random pressure test at the application level is performed, the pressure test duration and coverage rate of the specific functional module cannot be guaranteed, therefore, after a tester sends a packaged test instruction, a test case is executed, an automatic script enters a specific test scene of a target application program through executing a User Interface (UI), and then a random test tool is triggered to perform the pressure test on the specific test scene. The packaged test instructions are pre-written by a tester before the tester performs the stress test, and include instructions related to the test, such as a test scene, a test case and the like.
Any type of UI automation test framework may be used in executing the UI automation test script, such as UIAutometer, robotium, or Monkeyrunner, among others. Each test scenario of an application has a particular program entry that is entered by executing a UI automation test script to traverse elements of a particular page or elements of a particular functional module in a particular order. Wherein the UI automation test script is pre-written by a tester based on page elements or module elements included in a specific test scenario of the target application.
S120, performing pressure test on the specific test scene by using a random test tool.
After the program enters a specific test scenario of the target application program, a random test tool can be used for pressure test, wherein the random test tool comprises a pressure test tool Monkey integrated on the application program.
For example, in project testing of internet companies, it is often necessary to test specific scenarios of applications, such as a new online or reconfigured module, and many applications of complex business are developed cooperatively by multiple teams, each team needs to perform stress testing on a specific functional module in charge during the development stage. Based on the technical scheme of the embodiment, through executing the UI automatic test script, entering a specific test scene of the target application program, and then carrying out pressure test on the specific test scene by utilizing the random test tool, the specific pressure test on the specific scene can be realized, and the defect that the specific test cannot be realized by simply utilizing the random pressure test tool is overcome; meanwhile, the defect that the test of the event state combination cannot be guaranteed when the test is carried out based on page element traversal in the UI-based automatic test method can be overcome, wherein the main reason is that the event state combination is an event which cannot be traversed and cannot be triggered according to a sequential traversal mode.
And S130, monitoring whether the current test scene of the target application program is in a specific test scene or not in the pressure test process.
In the pressure test process of the specific scene, in order to ensure that the test program is always executed in the specific test scene until the test is finished, the monitoring program can be utilized to monitor whether the current test scene of the target application program is in the specific test scene in real time. The scene monitoring program and the random test tool can adopt an asynchronous execution mode in the pressure test process. After entering a specific test scene, the execution of the random test tool and the scene monitoring may be started at the same time, or the execution of the random test tool may be started before the scene monitoring. The scene monitoring can be realized by monitoring the page dimension of the application program, and by taking an Android system as an example, the scene monitoring can be realized by monitoring a certain Fragment level in the Activity or FragmentActivity.
And S140, if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform the pressure test.
If the current test scene is not in the specific test scene in the scene monitoring process, for example, the test tool program jumps and switches to other test scenes, the UI automation test script is executed so as to reenter the specific test scene, meanwhile, the execution process of the random test tool is terminated, and after the specific test scene is reentered, the random test tool is reused for pressure test. It should be noted that, when the execution process of the random test tool is terminated, the stress test of the application program is not terminated, and the stress test can still be continuously executed as long as the test returns to a specific test scenario.
The method includes the steps of performing pressure test on a navigation module in a hundred-degree map application program, executing a UI (user interface) automatic test script when the test tool program is monitored to jump to a location search module in the test process, resetting a test scene, ending the pressure test on the location search module at the same time, and continuously executing the pressure test on the navigation module after reentering the navigation module.
If the current test scene is always in the specific test scene in the scene monitoring process, the random test tool can be continuously executed until the pressure test is finished, and the scene monitoring is finished at the same time. Based on real-time cycle monitoring and scene resetting, the pressure test for a specific test scene can be ensured to be successfully completed.
According to the technical scheme, the UI automatic test script is executed, a specific test scene of a target application program is entered, and then a random test tool is utilized to perform pressure test on the specific test scene; in the pressure test process, the current test scene is monitored in real time, and if the current test scene is monitored to be not in the specific test scene, the UI automatic test script is executed to reenter the specific test scene, so that the specific test scene is ensured not to change in the test process. According to the technical scheme, random test, UI automatic test and scene monitoring are organically integrated to form a complete technical scheme, the problem that the specific service scene of the application program cannot be subjected to targeted pressure test in the prior art is solved, and the pertinence of the pressure test is improved.
Example two
Fig. 2 is a flowchart of a pressure testing method for an application program according to a second embodiment of the present invention, where the method is further optimized based on the foregoing embodiment. As shown in fig. 2, the method specifically includes:
s210, executing the UI automation test script to enter a specific test scene of the target application program.
S220, performing pressure test on the specific test scene by using a random test tool.
S230, acquiring target activities located at the top of a stack in a task stack of an activity component in real time from the running environment of the target application program, wherein the target activities comprise host activities or inheritance of the host activities.
After the application program runs, the system generates a task stack which can be used for recording the activity state, so that whether the current test scene is in a specific test scene can be judged by acquiring the information of the stack. The activities in the current running environment recorded by the task stack comprise host activities or inheritance of the host activities, and the activities at the top of the stack can be the host activities or inheritance of the host activities according to the recorded sequence of the activities.
For example, with respect to the Android system, after an application program runs, a task stack is generated, in which an Activity state of the application program running or a fragmentability is described, for example, page information displayed by the application program, and the like, and are sequentially arranged in the stack in an opening order of the Activity or the fragmentability. The common Activity can only contain one page, and the fragmentatity is taken as one of the activities, so that a plurality of pages can be managed in the Activity. Further, the Fragment state in the Fragment activity state may be recorded in the fallback stack.
S240, judging whether the current test scene is in a specific test scene or not according to the target activity.
The target activity is an activity in the current running environment of the application program, the target activity can be compared with the due activity in the specific test scene, and if the target activity acquired in real time is consistent with the due activity in the specific test scene, the current test scene is in the specific test scene.
S250, if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform the pressure test.
On the basis of the above technical solution, optionally, the method further includes: recording the accumulated time of the pressure test until the accumulated time meets the preset scene test time, and stopping the current pressure test.
The preset scene test time may be preset by a tester, for example, may be set when a test instruction of the package is written before the test. The specific time length can be set by a tester according to the pressure test requirement so as to ensure the effectiveness of the pressure test.
Optionally, the method further comprises:
collecting an operation log of a target application program in the pressure test process;
and analyzing the operation log according to a preset rule, and generating a test report.
The log collection and analysis functions are also realized in the pressure test process, and a test report is generated by analyzing the test log. For example, in the monitoring process of the test scene, the running log of the target application program is recorded at the same time, and after the pressure test is completed, the running log is analyzed to generate a test report. Analysis rules of the running log include analysis using existing log analysis tools or analysis using databases, etc.
According to the technical scheme, the UI automatic test script is executed, a specific test scene of a target application program is entered, and then a random test tool is utilized to perform pressure test on the specific test scene; in the pressure test process, whether the current test scene is in a specific test scene is judged according to target activities at the top of the trestle in the running environment obtained in real time, so that the smooth completion of the pressure test in the specific test scene is ensured, the problem that the targeted pressure test cannot be carried out on the specific service scene of the application program in the prior art is solved, and the pertinence of the pressure test is improved.
Example III
Fig. 3 is a schematic structural diagram of a pressure testing device for an application program according to a third embodiment of the present invention, and the embodiment is applicable to a situation of performing pressure testing of an application program. The pressure testing device for the application program provided by the embodiment of the invention can execute the pressure testing method for the application program provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. As shown in fig. 3, the stress test apparatus includes a UI script execution module 310, a stress test module 320, a scene monitoring module 330, and a scene reentry module 340, wherein:
a UI script execution module 310 for executing a UI automation test script to enter a specific test scenario of the target application;
the pressure testing module 320 is configured to perform pressure testing on a specific testing scenario by using a random testing tool;
the scene monitoring module 330 is configured to monitor whether a current test scene of the target application program is in a specific test scene during the pressure test process;
and the scene reentry module 340 is configured to execute the UI automation test script if it is monitored that the current test scene is not in the specific test scene, and reenter the specific test scene to perform the pressure test.
Optionally, the scene monitoring module 330 includes a task activity obtaining unit and a scene judging unit, where:
the task activity acquisition unit is used for acquiring target activities positioned at the top of a stack in a task stack of the activity component in real time from the running environment of the target application program, wherein the target activities comprise host activities or inheritance of the host activities;
and the scene judging unit is used for judging whether the current test scene is in a specific test scene according to the target activity.
Optionally, the pressure testing device further includes:
and the time recording module is used for recording the accumulated time of the pressure test until the accumulated time meets the preset scene test time, and stopping the current pressure test.
Optionally, the pressure testing device further includes:
the log acquisition module is used for acquiring the running log of the target application program in the pressure test process;
and the report generation module is used for analyzing the operation log according to preset rules and generating a test report.
According to the technical scheme, the UI automatic test script is executed, a specific test scene of a target application program is entered, and then a random test tool is utilized to perform pressure test on the specific test scene; and in the pressure test process, monitoring the current test scene in real time, and if the current test scene is monitored to be not in the specific test scene, re-entering the specific test scene by executing the UI automation test script. The embodiment solves the problem that the specific service scene of the application program cannot be subjected to the targeted pressure test in the prior art, and improves the pertinence of the pressure test.
Example IV
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary server 412 suitable for use in implementing embodiments of the present invention. The server 412 shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 4, the server 412 is in the form of a general purpose server. Components of server 412 may include, but are not limited to: one or more processors 416, a storage 428, and a bus 418 that connects the various system components (including the storage 428 and the processors 416).
Bus 418 represents one or more of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry standard architecture (Industry Subversive Alliance, ISA) bus, micro channel architecture (Micro Channel Architecture, MAC) bus, enhanced ISA bus, video electronics standards association (Video Electronics Standards Association, VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
Server 412 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 412 and includes both volatile and nonvolatile media, removable and non-removable media.
The storage 428 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 430 and/or cache memory 432. The server 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk such as a Read Only Memory (CD-ROM), digital versatile disk (Digital Video Disc-Read Only Memory, DVD-ROM), or other optical media, may be provided. In such cases, each drive may be coupled to bus 418 via one or more data medium interfaces. Storage 428 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for example, in the storage 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 442 generally perform the functions and/or methodologies in the described embodiments of the invention.
The server 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), one or more terminals that enable a user to interact with the server 412, and/or any terminals (e.g., network card, modem, etc.) that enable the server 412 to communicate with one or more other computing terminals. Such communication may occur through an input/output (I/O) interface 422. Also, the server 412 may communicate with one or more networks (e.g., local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as the internet) via the network adapter 420. As shown in fig. 4, network adapter 420 communicates with the other modules of server 412 via bus 418. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with server 412, including, but not limited to: microcode, end drives, redundant processors, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processor 416 executes various functional applications and data processing by running programs stored in the storage 428, for example, to implement a stress test method for an application provided by an embodiment of the present invention, the method including:
executing the UI automation test script to enter a specific test scene of the target application program;
performing pressure test on a specific test scene by using a random test tool;
in the pressure test process, monitoring whether the current test scene of the target application program is in a specific test scene or not;
and if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform the pressure test.
Example five
The fifth embodiment of the present invention further provides a computer readable storage medium having a computer program stored thereon, the program when executed by a processor implementing a pressure testing method for an application program according to the embodiment of the present invention, the method comprising:
executing the UI automation test script to enter a specific test scene of the target application program;
performing pressure test on a specific test scene by using a random test tool;
in the pressure test process, monitoring whether the current test scene of the target application program is in a specific test scene or not;
and if the current test scene is not in the specific test scene, executing the UI automation test script, and re-entering the specific test scene to perform the pressure test.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A method for stress testing of an application program, comprising:
after the test case is executed based on the test instruction, executing the UI automation test script to enter a specific test scene of the target application program; the specific test scene comprises a test on a specific page or a specific functional module;
performing pressure test on the specific test scene by using a random test tool, and traversing elements of a specific page or elements of a specific functional module according to a specific sequence;
in the pressure test process, monitoring whether the current test scene of the target application program is in the specific test scene or not in real time by using a monitoring program; the scene monitoring program and the random test tool adopt an asynchronous execution mode in the pressure test process;
if the current test scene is monitored to be not in the specific test scene, the execution process of the random test tool which is not in the specific test scene is terminated, the UI automation test script is executed, the specific test scene is reentered, and the pressure test is continued;
and if the current test scene is always in the specific test scene, continuously executing the random test tool until the pressure test is finished, and synchronously finishing the scene monitoring program.
2. The method of claim 1, wherein monitoring whether a current test scenario of a target application is in the particular test scenario comprises:
acquiring target activities at the top of a stack in a task stack of an activity component in real time from an operating environment of a target application program, wherein the target activities comprise host activities or inheritance of the host activities;
and judging whether the current test scene is in the specific test scene according to the target activity.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
recording the accumulated time of the pressure test until the accumulated time meets the preset scene test time, and stopping the current pressure test.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
collecting an operation log of a target application program in the pressure test process;
and analyzing the operation log according to a preset rule, and generating a test report.
5. A stress testing device for an application program, comprising:
the UI script execution module is used for executing the UI automation test script after executing the test case based on the test instruction so as to enter a specific test scene of the target application program; the specific test scene comprises a test on a specific page or a specific functional module;
the pressure test module is used for performing pressure test on the specific test scene by utilizing a random test tool, and traversing elements of the specific page or elements of the specific functional module according to a specific sequence;
the scene monitoring module is used for monitoring whether the current test scene of the target application program is in the specific test scene or not in real time by using a monitoring program in the pressure test process; the scene monitoring program and the random test tool adopt an asynchronous execution mode in the pressure test process;
the scene reentry module is used for executing the UI automatic test script, reentering the specific test scene and continuing the pressure test if the current test scene is monitored not to be in the specific test scene, and the execution process of the random test tool which is not in the specific test scene is terminated;
and the scene ending module is used for continuously executing the random test tool until the pressure test is ended and synchronously ending the scene monitoring program if the current test scene is monitored to be always in the specific test scene.
6. The apparatus of claim 5, wherein the scene monitoring module comprises:
the task activity acquisition unit is used for acquiring target activities positioned at the top of a stack in a task stack of the activity component in real time from the running environment of the target application program, wherein the target activities comprise host activities or inheritance of the host activities;
and the scene judging unit is used for judging whether the current test scene is in the specific test scene according to the target activity.
7. The apparatus according to claim 5 or 6, characterized in that the apparatus further comprises:
and the time recording module is used for recording the accumulated time of the pressure test until the accumulated time meets the preset scene test time, and stopping the current pressure test.
8. The apparatus according to claim 5 or 6, characterized in that the apparatus further comprises:
the log acquisition module is used for acquiring the running log of the target application program in the pressure test process;
and the report generation module is used for analyzing the running log according to preset rules and generating a test report.
9. A server, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the stress testing method of an application as claimed in any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a stress testing method of an application program according to any one of claims 1-4.
CN201810610095.7A 2018-06-13 2018-06-13 Pressure test method, device, server and medium for application program Active CN110597704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810610095.7A CN110597704B (en) 2018-06-13 2018-06-13 Pressure test method, device, server and medium for application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810610095.7A CN110597704B (en) 2018-06-13 2018-06-13 Pressure test method, device, server and medium for application program

Publications (2)

Publication Number Publication Date
CN110597704A CN110597704A (en) 2019-12-20
CN110597704B true CN110597704B (en) 2023-09-26

Family

ID=68849563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810610095.7A Active CN110597704B (en) 2018-06-13 2018-06-13 Pressure test method, device, server and medium for application program

Country Status (1)

Country Link
CN (1) CN110597704B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100085B (en) * 2020-11-17 2021-03-16 深圳市房多多网络科技有限公司 Android application program stability testing method, device and equipment
CN112256552B (en) * 2020-12-22 2021-10-08 智道网联科技(北京)有限公司 Pressure testing method and device for map engine
CN113448867B (en) * 2021-07-16 2022-08-16 谢靖 Software pressure testing method and device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009075704A (en) * 2007-09-19 2009-04-09 Nec Electronics Corp Test method, test device, and program
CN102479146A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Scenario testing monitoring method, device and system
CN104346279A (en) * 2014-10-27 2015-02-11 百度在线网络技术(北京)有限公司 Method and device for software testing
CN104965791A (en) * 2015-07-20 2015-10-07 上海斐讯数据通信技术有限公司 Method for testing Android application
US9201773B1 (en) * 2011-05-08 2015-12-01 Panaya Ltd. Generating test scenario templates based on similarity of setup files
CN105373474A (en) * 2015-11-10 2016-03-02 中国建设银行股份有限公司 Business system-oriented test method and device
CN106055451A (en) * 2016-05-23 2016-10-26 努比亚技术有限公司 Information processing method and electronic device
CN106126418A (en) * 2016-06-20 2016-11-16 福建省农村信用社联合社 A kind of banking terminal automatic test device, system and the method for mechanically-based arm
CN106649024A (en) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 Method and device for real-time monitoring of application performance
CN106708818A (en) * 2015-07-17 2017-05-24 阿里巴巴集团控股有限公司 Pressure testing method and system
WO2018014580A1 (en) * 2016-07-20 2018-01-25 平安科技(深圳)有限公司 Data interface test method and apparatus, and server and storage medium
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3295311B1 (en) * 2015-05-12 2021-08-11 Suitest s.r.o. Method and system for automating the process of testing of software application

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009075704A (en) * 2007-09-19 2009-04-09 Nec Electronics Corp Test method, test device, and program
CN102479146A (en) * 2010-11-30 2012-05-30 金蝶软件(中国)有限公司 Scenario testing monitoring method, device and system
US9201773B1 (en) * 2011-05-08 2015-12-01 Panaya Ltd. Generating test scenario templates based on similarity of setup files
CN104346279A (en) * 2014-10-27 2015-02-11 百度在线网络技术(北京)有限公司 Method and device for software testing
CN106708818A (en) * 2015-07-17 2017-05-24 阿里巴巴集团控股有限公司 Pressure testing method and system
CN104965791A (en) * 2015-07-20 2015-10-07 上海斐讯数据通信技术有限公司 Method for testing Android application
CN105373474A (en) * 2015-11-10 2016-03-02 中国建设银行股份有限公司 Business system-oriented test method and device
CN106055451A (en) * 2016-05-23 2016-10-26 努比亚技术有限公司 Information processing method and electronic device
CN106126418A (en) * 2016-06-20 2016-11-16 福建省农村信用社联合社 A kind of banking terminal automatic test device, system and the method for mechanically-based arm
WO2018014580A1 (en) * 2016-07-20 2018-01-25 平安科技(深圳)有限公司 Data interface test method and apparatus, and server and storage medium
CN106649024A (en) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 Method and device for real-time monitoring of application performance
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
Customer Scenario Focused End-to-End Testing;Chen Liang等;《2012 IEEE 23rd International Symposium on Software Reliability Engineering Workshops》;80-81 *
云计算中基于多租户的策略驱动型软件定义网络应用研究;陈实;《中国优秀硕士学位论文全文数据库 (工程科技Ⅰ辑)》(第03期);I138-4377 *
压力测试SCADA系统;黄福光;《中国优秀硕士学位论文全文数据库 (工程科技Ⅱ辑)》(第04期);C030-25 *
吴军等译.《OS/22.0技术库编程指南 第1卷 控制程序编程接口》.清华大学出版社,1994,第89-90页. *
基于UML的自动工单系统测试用例研究;张国鸣;《中国优秀硕士学位论文全文数据库 (信息科技辑)》(第06期);I138-252 *
李小军主编.智能手机APP软件开发:Android.《智能手机APP软件开发:Android》.2015,第62-63,67页. *

Also Published As

Publication number Publication date
CN110597704A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
CN110764945B (en) Crash log processing method, device, equipment and storage medium
US9355003B2 (en) Capturing trace information using annotated trace output
CN107025167B (en) Method and apparatus for data flow analysis using compiler type information in processor trace logs
CN110597704B (en) Pressure test method, device, server and medium for application program
US8402446B2 (en) Associating probes with test cases
CN107451062B (en) User interface traversal test method, device, server and storage medium
US7783927B2 (en) Intelligent processing tools
CN110990842A (en) Recurrence method and device of small probability event, storage medium and electronic equipment
CN107193747B (en) Code testing method and device and computer equipment
CN110727476B (en) Method, device, equipment and storage medium for generating authorization configuration file
CN111274130A (en) Automatic testing method, device, equipment and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN112069158A (en) Data restoration method, device, equipment and storage medium
CN111309606A (en) Page exception handling method and device, computer equipment and storage medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN112861138A (en) Software security analysis method and analysis device, electronic device, and storage medium
CN114238048B (en) Automatic testing method and system for Web front-end performance
CN110716859A (en) Method for automatically pushing test cases for modified codes and related device
CN113641575B (en) Test method, device, equipment and storage medium
CN109213569B (en) Auditing method and device based on virtual machine, server and storage medium
CN109062797B (en) Method and device for generating information
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN110851332A (en) Log file processing method, device, equipment and medium
CN110806981A (en) Application program testing method, device, equipment and storage medium
CN112988593B (en) Code analysis method, device, computer equipment and storage medium

Legal Events

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