CN112100085B - Android application program stability testing method, device and equipment - Google Patents

Android application program stability testing method, device and equipment Download PDF

Info

Publication number
CN112100085B
CN112100085B CN202011287224.7A CN202011287224A CN112100085B CN 112100085 B CN112100085 B CN 112100085B CN 202011287224 A CN202011287224 A CN 202011287224A CN 112100085 B CN112100085 B CN 112100085B
Authority
CN
China
Prior art keywords
test
page
monkey
testing
frequency
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
CN202011287224.7A
Other languages
Chinese (zh)
Other versions
CN112100085A (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.)
Shenzhen Fangduoduo Network Technologies Co ltd
Original Assignee
Shenzhen Fangduoduo Network Technologies 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 Shenzhen Fangduoduo Network Technologies Co ltd filed Critical Shenzhen Fangduoduo Network Technologies Co ltd
Priority to CN202011287224.7A priority Critical patent/CN112100085B/en
Publication of CN112100085A publication Critical patent/CN112100085A/en
Application granted granted Critical
Publication of CN112100085B publication Critical patent/CN112100085B/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/3664Environments for testing or debugging software
    • 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

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 relates to the technical field of testing, and discloses a method, a device and equipment for testing stability of an android application program, wherein the method comprises the following steps: adding a first control script for a Monkey test tool, wherein the content configured by the first control script comprises a test starting page, a test page white list, a skipped initialization page, a check frequency and test times; adding a second control script to the Monkey testing tool, wherein the content configured by the second control script comprises ending the Monkey testing process; controlling the Monkey testing tool to perform a stability test based on a random event on the android application program according to the first control script; and in the test process, receiving a command for starting the second control script, and executing the second control script to stop the Monkey test. Through the mode, the embodiment of the invention realizes the acquisition and configuration of customized contents, so that the test is more convenient, and the efficiency is improved.

Description

Android application program stability testing method, device and equipment
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to a method, a device and equipment for testing stability of an android application program.
Background
The Monkey is a command line tool in an Android system, can run in a simulator or actual equipment, and can test the Android system through the Monkey tool. The Monkey tool sends a pseudo-random event sequence to the android system to be tested by simulating various input operations of a user, and observes whether the android system to be tested has errors and error time, so as to realize the pressure test of the android system to be tested. Generally, a Monkey tool is used for performing stability test on an APP (Application) of an Android system, and the Monkey tool is helpful for testing the stability of the APP and reducing the crash (crash) rate of the APP.
However, in the prior art, the Monkey tool can only set some random events for a certain APP, and the test form is single. And the process needs to be manually finished when the test is stopped in the middle.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide a method, an apparatus, a device, and a computer-readable storage medium for testing stability of an android application, so as to solve the problems in the prior art that a test form is single and a test needs to be stopped manually.
According to an aspect of an embodiment of the present invention, there is provided an android application stability testing method, including:
adding a first control script to a Monkey test tool, wherein the content configured by the first control script comprises a test start page, a test page white list, a jump-back initialization page, a check frequency and a test frequency, the test start page is an application page which is opened first after the Monkey test tool is started, the test page white list is an application page which is opened by Monkey test, the jump-back initialization page is an application page which is opened when the Monkey test jumps back from the application, the check frequency is a frequency for checking whether the Monkey test is operated in the application, and the test frequency is a frequency for checking the Monkey test operation within a preset time;
adding a second control script to the Monkey testing tool, wherein the content configured by the second control script comprises ending the Monkey testing process;
controlling the Monkey testing tool to perform a stability test based on a random event on the android application program according to the first control script;
and in the test process, receiving a command for starting the second control script, and executing the second control script to stop the Monkey test.
In an optional manner, the skipped initialization page is the test start page or the application page where the application program is located when the application program is skipped.
In an optional manner, the controlling the Monkey testing tool to perform a stability test based on a random event on the android application includes:
judging whether the Monkey test normally runs or not when the application program jumps out;
if the Monkey test runs normally, controlling to open the application program page where the application program jumps out when jumping back;
and if the Monkey test does not normally run, opening the test starting page when the control jumps back.
In an alternative manner, the test page whitelist includes an open order;
the control of the Monkey testing tool to perform the stability test based on the random event on the android application program comprises the following steps:
and controlling the Monkey testing tool to sequentially open each page in the testing page white list according to the opening sequence so as to complete the testing of the testing page white list and obtain a first testing result.
In an optional mode, receiving a command for opening other pages except the white list of the test pages;
and after all the pages in the white list of the test pages are tested, controlling the Monkey test tool to open the other pages so as to complete the test of the other pages.
In an optional manner, before the receiving a command to open other pages than the test page white list, the method further includes:
judging whether the first test result exceeds a first threshold value or not;
and if the first test result exceeds the first threshold value, displaying a first interface to receive a command for opening other pages except the white list of the test page.
In an optional manner, the configured content of the first control script further includes a clearing log, and the clearing log is used for clearing an existing test log when the first control script is executed.
According to another aspect of the embodiments of the present invention, there is provided an android application stability testing apparatus, including:
the first adding module is used for adding a first control script for a Monkey test tool, wherein the content configured by the first control script comprises a test starting page, a test page white list, a jump-back initialization page, a checking frequency and a test frequency, the test starting page is an application page which is firstly opened after the Monkey test tool is started, the test page white list is the application page which is opened by the Monkey test, the jump-back initialization page is the application page which is opened when the Monkey test jumps out of the application, the checking frequency is a frequency for checking whether the Monkey test is operated in the application, and the test frequency is the number of Monkey test operations within a preset time;
the second adding module is used for adding a second control script for the Monkey testing tool, wherein the content configured by the second control script comprises the ending of the Monkey testing process;
the control module is used for controlling the Monkey testing tool to perform stability testing based on random events on the android application program according to the first control script;
and the execution module is used for receiving a command for starting the second control script and executing the second control script to stop the Monkey test in the test process.
According to another aspect of the embodiments of the present invention, there is provided an electronic device including:
the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation of the android application stability testing method.
According to another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, wherein at least one executable instruction is stored in the storage medium, and when the executable instruction is executed on an electronic device, the electronic device executes the operations of the android application stability testing method described above.
According to the embodiment of the invention, the first control script is added to the Monkey test tool to complete constraint and supplement of Monkey, so that collection and configuration of customized content are realized, the test is more convenient, and different test requirements are met. By adding the second control script, the Monkey test process can be automatically ended without manually searching the process and ending the process, so that the Monkey test ending operation is facilitated, and the efficiency is improved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flowchart of an android application stability testing method provided by an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating an android application stability testing apparatus provided in an embodiment of the present invention;
fig. 3 shows a schematic structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein.
In the prior art, a Monkey tool can only set random events for certain APP, and the test form is single. And in the execution process, if the Monkey test is accidentally exited, the APP cannot be entered again for testing. Moreover, the Monkey test also does not allow for customized configuration of a single page or a specified scene. The test logs generated by the Monkey test tool are accumulated and stored, so that the log content is too much, and the positioning cannot be well performed. If the Monkey test is executed and the worker wants to stop in the midway, the worker can only manually enter the process manager to close the test process, which is troublesome.
Fig. 1 shows a flowchart of an android application stability testing method provided in an embodiment of the present invention, where the method is executed by a device, such as a mobile terminal, e.g., a mobile phone, a tablet computer, and the like, that needs to perform an android application stability test. As shown in fig. 1, the method comprises the steps of:
step 110: adding a first control script for the Monkey testing tool, wherein the content configured by the first control script comprises a test starting page, a test page white list, a jump-back initialization page, a checking frequency and testing times.
In the prior art, a Monkey test tool has no auxiliary script, and only a main Monkey test is performed after a primary Monkey test is started, namely, only a random event test is performed. According to the embodiment of the invention, the first control script which is an auxiliary script is added to the Monkey testing tool, and the constraint and supplement of Monkey are completed through the first control script, so that the acquisition and configuration of customized content are realized, the test is more convenient, and different test requirements are met.
The method comprises the steps that a test starting page is an application program page which is firstly opened after a Monkey test tool is started, and after the Monkey test tool is started, the test starting page is directly entered to test the running condition of an APP (application program) on the page. Through the configuration, the personalized test requirement can be met, for example, for an important page, the page can be set as a test starting page, so that the page can be tested firstly after the test is started, or for several pages needing to be tested, the page arranged at the forefront in the APP interface layout is used as the test starting page, so that the page can be tested firstly after the test is started, and then other subsequent pages are tested in sequence according to the page arrangement in the APP interface layout.
The test page white list is an application program page opened by Monkey test, the test page white list is one or more pages in the application program, and when Monkey test is executed, only the pages set in the test page white list can be opened without opening other pages. Through the configuration, the personalized test requirement can be met, other pages which do not need to be tested do not need to be opened, and the pages do not need to be tested in the Monkey test, so that the test time is saved, and the efficiency is improved.
The initialized page after the jump back is an application program page opened when the jump back is carried out after the Monkey test jumps out of the application program. The Monkey test sometimes runs away or is artificially popped out of the test page. After the above situation occurs, when the Monkey test continues, i.e. jumps back, a jump back initialization page can be set, so that the Monkey test does not need to be executed again from the beginning after the jump back. Through the configuration, the personalized test requirements can be met, and testers can configure any page as an initialization page after jumping back, so that the actual scene requirements are met.
The check frequency is a frequency at which the Monkey test is checked whether to run in the application. After the Monkey test is run, if the Monkey test is not checked regularly, the Monkey test is not continuously executed when the Monkey test is run away or is stopped accidentally, and the test result is influenced. Therefore, the checking frequency is configured through the first control script to check whether the Monkey test is normally operated in the application program, which is equivalent to setting the timing task. The checking frequency can be set according to actual conditions, for example, the checking frequency is set to 0.5 or 0.2 when checking once every 2S or checking once every 5S. Of course, the stability of the Monkey test can be judged according to the historical test record, if the stability is greater than or equal to the preset value, the checking frequency can be set to be a value in the first frequency interval, and if the stability is less than the preset value, the checking frequency can be set to be a value in the second frequency interval. The frequency values in the first frequency interval are all smaller than the frequency values in the second frequency interval, that is, for the Monkey test with higher stability in the history test record, a smaller frequency value can be set, the interval period of the check is longer, for the Monkey test with lower stability in the history test record, a larger frequency value can be set, and the interval period of the check is shorter.
In addition, whether the Monkey test runs in the application program or not can be further monitored, whether the Monkey runs in the expected application program page or not can be further monitored, and if the Monkey test jumps out of the application program page, the Monkey test can be forced to jump back to the page. The content is configured in a customized manner, so that the stable operation of Monkey testing is guaranteed.
The test times are the times of Monkey test operation in the preset time. For testing of certain applications, it may be desirable to perform the test during a particular time, such as nightly, and daytime stopped. The number of times of Monkey test operation in the preset time can be set, for example, if the Monkey test can be performed 10 ten thousand times at night, the number of times of Monkey test operation in 24 hours is set to 10 ten thousand times, and after the Monkey test is completed, the Monkey test is completed after the Monkey test is performed 10 ten thousand times at night, and the Monkey test is not performed any more in the daytime. This setting is comparatively simple, only needs to set up a number of times numerical value. Of course, the time for the Monkey test to run can also be directly set, for example, the running time of the Monkey test is 22:00-6:59, and the time for the Monkey test to stop is 7:00-21: 59.
In some embodiments, the configured content of the first control script may further include a flush log for flushing an existing test log when the first control script is executed. If the test log is continuously accumulated and stored, the content of the test log is huge, and the test log cannot be well positioned. The embodiment of the invention clears the previous test log before each test, so that the stored test log only comprises the test content at this time, the derived test log is ensured to be clean, other interference logs are avoided, and the test problem is convenient to locate. The past test logs are also subjected to independent backup storage for subsequent searching.
Step 120: and adding a second control script for the Monkey testing tool, wherein the content configured by the second control script comprises ending the Monkey testing process.
After the Monkey test is executed, if the worker wants to stop in the midway, the worker can only manually enter the process manager to close the test process, which is troublesome. Through the step, the second control script configures the control instruction for finishing the Monkey test process, and when the second control script is executed, the Monkey test process can be automatically finished without manually searching the process and finishing the process, so that the Monkey test finishing operation is facilitated, and the efficiency is improved.
Step 130: and controlling a Monkey testing tool to perform a stability test based on a random event on the android application program according to the first control script.
The Monkey test can be executed next by configuring the control scripts in the two parts. When the Monkey test is executed, the first control script is configured, so that the first control script controls the Monkey test tool to perform the stability test based on the random event on the android application program during the test. Specifically, the test is executed according to the configuration content of the first control script, for example, the configured test start page is entered after the Monkey test tool is started, the configured test page whitelist is tested, the configured initialization page is entered when the application program jumps back during the test, whether the Monkey test is carried out according to the configured check frequency, the Monkey test is carried out according to the configured test times, and the like.
In some embodiments, the initialization page after the jump back may be a test launch page or an application page where the application was jumped out. Furthermore, the reset initialization page can be determined according to the running state of the Monkey test during the jumping-out. Therefore, the Monkey testing tool is controlled to perform the stability test based on the random event on the android application program, and the stability test based on the random event comprises the following steps:
judging whether the application program jumps out or not, and if so, carrying out Monkey test on the application program to judge whether the application program normally runs or not;
if the Monkey test runs normally, opening an application program page where the application program jumps out when controlling to jump back;
and if the Monkey test is not operated normally, the test starting page is opened when the control jumps back.
When the jump-out occurs, the Monkey test is normally operated, which indicates that the jump-out is an accident, or the tester manually clicks the current application program page, and under the condition, the application program page where the jump-out application program exists can be directly opened when the jump-back occurs, and unfinished tests are continued. When the Monkey test is not operated normally, the reason that the jump is caused by a fault event such as program runaway or machine downtime is shown, the previous test data may not be stored or the test data is invalid, and in this case, the jump can return to the test starting page to start the test from the beginning. By the mode, the page in the jump-back process meets the requirement of the actual condition, unnecessary repeated tests are avoided, and the test efficiency is improved.
In some embodiments, the test page whitelist includes not only pages, but also the order in which the pages are opened when the pages are multiple. Therefore, when the Monkey testing tool is controlled to perform the stability test based on the random event on the android application program, the following steps can be executed:
and controlling a Monkey testing tool to sequentially open each page in the testing page white list according to the opening sequence so as to complete the testing of the testing page white list and obtain a first testing result.
By the mode, the plurality of pages can be tested according to the configured opening sequence, the configured opening sequence can be a sequence with high testing efficiency, the testing efficiency can be improved, and a customized testing scheme can be realized.
Of course, the Monkey test can also be configured to run on a plurality of pages of a certain module at the same time, so that the test efficiency is improved. For example, testing page whitelists groups multiple pages according to module, and Monkey tests can be run on all pages of a group at the same time.
Of course, besides testing the page white list, other pages can be tested during testing, and when a tester inputs an instruction for testing other pages, the test program can receive a command for opening other pages except the test page white list; and after all the pages in the white list of the test pages are tested, controlling the Monkey test tool to open other pages so as to complete the test of other pages. On the basis of testing the white list page, other pages to be tested can be set artificially, and the flexibility of testing is further improved.
On the basis, the automation degree of testing other pages can be further improved. Generally, only white list pages are tested. In some embodiments, whether other pages need to be tested may be further determined according to the test result of the white list page. For example, if the test result (which may be a test score) of the white list page is high, it is necessary to further test other pages to ensure the reliability of the test result; if the test result of the white list page is general and does not accord with the test passing condition, the application software can be judged not to pass the test without testing other pages. Therefore, before receiving a command to open a page other than the white list of test pages, the method may further include:
judging whether the first test result exceeds a first threshold value or not;
and if the first test result exceeds a first threshold value, displaying a first interface to receive a command for opening other pages except the white list of the test page.
Wherein the first test result may be a test score and the first threshold may be a pass value of the test score. By the method, the automation degree of the test is further improved, and the accuracy and the reliability of the test result are ensured.
Step 140: and in the test process, receiving a command for starting the second control script, and executing the second control script to stop the Monkey test.
The second control script is a script for stopping the Monkey test, when the tester considers that the test needs to be stopped, the second control script can be started, the test program is automatically terminated, and a test log is reserved. By the method, the Monkey test process can be automatically ended without manually searching the process and ending the process, so that the Monkey test ending operation is facilitated, and the efficiency is improved.
After the test is finished, simultaneously saving the coast log and logcat log of Monkey, and outputting the log file in a date format. Wherein the crash log is a crash log; logcat is a command line tool in Android that can be used to obtain Log information for a program, such as storing a system message Log, including a stack trace when a device throws an error, and messages written from an application using a Log class. Meanwhile, the coast log and logcat log of Monkey are saved, and the log file is output in a date format, so that the problem can be conveniently searched and positioned.
According to the embodiment of the invention, the first control script is added to the Monkey test tool to complete constraint and supplement of Monkey, so that collection and configuration of customized content are realized, the test is more convenient, and different test requirements are met. By adding the second control script, the Monkey test process can be automatically ended without manually searching the process and ending the process, so that the Monkey test ending operation is facilitated, and the efficiency is improved.
Fig. 2 shows a schematic structural diagram of an android application stability testing apparatus provided in an embodiment of the present invention. As shown in fig. 2, the apparatus 300 includes:
the first adding module 310 is configured to add a first control script to a Monkey test tool, where the content configured by the first control script includes a test start page, a test page whitelist, a jump-back initialization page, an inspection frequency, and a test frequency, the test start page is an application page that is first opened after the Monkey test tool is started, the test page whitelist is an application page that is opened by the Monkey test, the jump-back initialization page is an application page that is opened when the Monkey test jumps back from the application, the inspection frequency is a frequency at which whether the Monkey test is operated in the application is inspected, and the test frequency is a frequency at which the Monkey test is operated within a preset time;
a second adding module 320, configured to add a second control script to the Monkey testing tool, where the content configured by the second control script includes ending the Monkey testing process;
the control module 330 is configured to control the Monkey testing tool to perform a stability test based on a random event on the android application program according to the first control script;
and the execution module 340 is configured to receive a command for starting the second control script in the test process, and execute the second control script to stop the Monkey test.
In an optional manner, the skipped initialization page is the test start page or the application page where the application program is located when the application program is skipped.
In an optional manner, the control module 330 is further configured to:
judging whether the Monkey test normally runs or not when the application program jumps out;
if the Monkey test runs normally, controlling to open the application program page where the application program jumps out when jumping back;
and if the Monkey test does not normally run, opening the test starting page when the control jumps back.
In an alternative manner, the test page whitelist includes an open order;
the control module 330 is further configured to:
and controlling the Monkey testing tool to sequentially open each page in the testing page white list according to the opening sequence so as to complete the testing of the testing page white list and obtain a first testing result.
In an optional manner, the control module 330 is further configured to:
receiving a command for opening other pages except the white list of the test page;
and after all the pages in the white list of the test pages are tested, controlling the Monkey test tool to open the other pages so as to complete the test of the other pages.
In an optional manner, the control module 330 is further configured to:
before receiving a command for opening other pages except the test page white list, judging whether the first test result exceeds a first threshold value;
and if the first test result exceeds the first threshold value, displaying a first interface to receive a command for opening other pages except the white list of the test page.
In an optional manner, the configured content of the first control script further includes a clearing log, and the clearing log is used for clearing an existing test log when the first control script is executed.
According to the embodiment of the invention, the first control script is added to the Monkey test tool to complete constraint and supplement of Monkey, so that collection and configuration of customized content are realized, the test is more convenient, and different test requirements are met. By adding the second control script, the Monkey test process can be automatically ended without manually searching the process and ending the process, so that the Monkey test ending operation is facilitated, and the efficiency is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 3, the electronic device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein: the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402 is configured to execute the program 410, and may specifically execute the relevant steps in the embodiment of the method for testing the stability of the android application.
In particular, program 410 may include program code comprising computer-executable instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The embodiment of the invention provides a computer-readable storage medium, wherein at least one executable instruction is stored in the storage medium, and when the executable instruction runs on electronic equipment, the electronic equipment is enabled to execute the method for testing the stability of the android application program in any method embodiment.
The embodiment of the invention provides an android application program stability testing device which is used for executing the android application program stability testing method.
Embodiments of the present invention provide a computer program, where the computer program can be called by a processor to enable an electronic device to execute an android application stability test method in any of the above method embodiments.
Embodiments of the present invention provide a computer program product, where the computer program product includes a computer program stored on a computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are run on a computer, the computer is caused to execute the method for testing the stability of an android application program in any of the above method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (5)

1. An android application stability testing method, the method comprising:
adding a first control script to a Monkey test tool, wherein the content configured by the first control script comprises a test start page, a test page white list, a jump-back initialization page, a check frequency and a test frequency, the test start page is an application page which is opened first after the Monkey test tool is started, the test page white list is an application page which is opened by Monkey test, the jump-back initialization page is an application page which is opened when the Monkey test jumps back from the application, the check frequency is a frequency for checking whether the Monkey test is operated in the application, and the test frequency is a frequency for checking the Monkey test operation within a preset time; setting an important page or a page needing to be tested as a test starting page; judging the stability of the Monkey test according to the historical test record, if the stability is greater than or equal to a preset value, setting the checking frequency as a value in a first frequency interval, and if the stability is less than the preset value, setting the checking frequency as a value in a second frequency interval, wherein the frequency values in the first frequency interval are all smaller than the frequency values in the second frequency interval;
adding a second control script to the Monkey testing tool, wherein the content configured by the second control script comprises ending the Monkey testing process;
controlling the Monkey testing tool to perform a stability test based on a random event on the android application program according to the first control script;
in the test process, receiving a command for starting the second control script, and executing the second control script to stop the Monkey test;
the test page whitelist comprises an opening sequence;
the control of the Monkey testing tool to perform the stability test based on the random event on the android application program comprises the following steps:
controlling the Monkey testing tool to sequentially open each page in the testing page white list according to the opening sequence so as to complete the testing of the testing page white list and obtain a first testing result;
the test page white list groups a plurality of pages according to a module, and simultaneously runs the Monkey test on all pages of one group;
the method further comprises the following steps:
receiving a command for opening other pages except the white list of the test page;
after all the pages in the white list of the test pages are tested, controlling the Monkey test tool to open the other pages so as to test the other pages;
before the receiving a command for opening other pages except the white list of the test pages, the method further includes:
judging whether the first test result exceeds a first threshold value or not;
if the first test result exceeds the first threshold value, displaying a first interface to receive a command for opening other pages except the white list of the test page;
the jump-back initialization page is the test starting page or the application program page where the application program jumps;
the control of the Monkey testing tool to perform the stability test based on the random event on the android application program comprises the following steps:
judging whether the Monkey test normally runs or not when the application program jumps out;
if the Monkey test runs normally, controlling to open the application program page where the application program jumps out when jumping back;
and if the Monkey test does not normally run, opening the test starting page when the control jumps back.
2. The method of claim 1,
the configured content of the first control script further comprises a clearing log, and the clearing log is used for clearing the existing test log when the first control script is executed.
3. An android application stability testing apparatus, the apparatus comprising:
the first adding module is used for adding a first control script for a Monkey test tool, wherein the content configured by the first control script comprises a test starting page, a test page white list, a jump-back initialization page, a checking frequency and a test frequency, the test starting page is an application page which is firstly opened after the Monkey test tool is started, the test page white list is the application page which is opened by the Monkey test, the jump-back initialization page is the application page which is opened when the Monkey test jumps out of the application, the checking frequency is a frequency for checking whether the Monkey test is operated in the application, and the test frequency is the number of Monkey test operations within a preset time; setting an important page or a page needing to be tested as a test starting page; judging the stability of the Monkey test according to the historical test record, if the stability is greater than or equal to a preset value, setting the checking frequency as a value in a first frequency interval, and if the stability is less than the preset value, setting the checking frequency as a value in a second frequency interval, wherein the frequency values in the first frequency interval are all smaller than the frequency values in the second frequency interval;
the second adding module is used for adding a second control script for the Monkey testing tool, wherein the content configured by the second control script comprises the ending of the Monkey testing process;
the control module is used for controlling the Monkey testing tool to perform stability testing based on random events on the android application program according to the first control script;
the execution module is used for receiving a command for starting the second control script and executing the second control script to stop the Monkey test in the test process;
the test page whitelist comprises an opening sequence;
the control module is further configured to:
controlling the Monkey testing tool to sequentially open each page in the testing page white list according to the opening sequence so as to complete the testing of the testing page white list and obtain a first testing result;
the test page white list groups a plurality of pages according to a module, and simultaneously runs the Monkey test on all pages of one group;
the control module is further configured to:
receiving a command for opening other pages except the white list of the test page;
after all the pages in the white list of the test pages are tested, controlling the Monkey test tool to open the other pages so as to test the other pages;
the control module is further configured to:
before receiving a command for opening other pages except the test page white list, judging whether the first test result exceeds a first threshold value;
if the first test result exceeds the first threshold value, displaying a first interface to receive a command for opening other pages except the white list of the test page;
the jump-back initialization page is the test starting page or the application program page where the application program jumps;
the control module is further configured to:
judging whether the Monkey test normally runs or not when the application program jumps out;
if the Monkey test runs normally, controlling to open the application program page where the application program jumps out when jumping back;
and if the Monkey test does not normally run, opening the test starting page when the control jumps back.
4. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation of the android application stability test method of claim 1 or 2.
5. A computer-readable storage medium having stored therein at least one executable instruction that, when run on an electronic device, causes the electronic device to perform operations of the android application stability testing method of claim 1 or 2.
CN202011287224.7A 2020-11-17 2020-11-17 Android application program stability testing method, device and equipment Active CN112100085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011287224.7A CN112100085B (en) 2020-11-17 2020-11-17 Android application program stability testing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011287224.7A CN112100085B (en) 2020-11-17 2020-11-17 Android application program stability testing method, device and equipment

Publications (2)

Publication Number Publication Date
CN112100085A CN112100085A (en) 2020-12-18
CN112100085B true CN112100085B (en) 2021-03-16

Family

ID=73784724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011287224.7A Active CN112100085B (en) 2020-11-17 2020-11-17 Android application program stability testing method, device and equipment

Country Status (1)

Country Link
CN (1) CN112100085B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051146B (en) * 2021-04-09 2022-09-30 深圳赛安特技术服务有限公司 Monkey-based testing method, apparatus, device and storage medium
CN114201392A (en) * 2021-12-06 2022-03-18 麒麟软件有限公司 Android environment and android application stability testing method
CN113934645A (en) * 2021-12-16 2022-01-14 深圳市明源云链互联网科技有限公司 Application testing method, system, device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887392A (en) * 2010-07-06 2010-11-17 中兴通讯股份有限公司 Method and device for testing software system operation stability
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
CN110597704A (en) * 2018-06-13 2019-12-20 百度在线网络技术(北京)有限公司 Application program pressure testing method, device, server and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2506122A (en) * 2012-09-20 2014-03-26 Ibm Integrating data transform test with data transform tool
CN109388560A (en) * 2018-09-18 2019-02-26 广州小鹏汽车科技有限公司 Stability test method and apparatus are applied based on Monkey
CN111737695A (en) * 2020-06-24 2020-10-02 深圳前海微众银行股份有限公司 White list optimization method, device, equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887392A (en) * 2010-07-06 2010-11-17 中兴通讯股份有限公司 Method and device for testing software system operation stability
CN105094783A (en) * 2014-05-19 2015-11-25 腾讯科技(深圳)有限公司 Method and device for testing Android application stability
CN110597704A (en) * 2018-06-13 2019-12-20 百度在线网络技术(北京)有限公司 Application program pressure testing method, device, server and medium

Also Published As

Publication number Publication date
CN112100085A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN112100085B (en) Android application program stability testing method, device and equipment
CN112084113B (en) Configurable automatic test method and system based on embedded simulation verification software
US11514225B2 (en) Verification platform for system on chip and verification method thereof
CN111258913A (en) Automatic algorithm testing method and device, computer system and readable storage medium
CN114546738A (en) Server general test method, system, terminal and storage medium
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN114117973A (en) Logic synthesis method, device and storage medium
CN116166525A (en) Method and device for generating test script
CN106201787A (en) Terminal control method and device
CN112035346A (en) Automatic testing method, system and medium based on embedded DSP operating system
CN116629173A (en) Verification method and device of network chip, computer equipment and storage medium
US11347628B2 (en) Test case generation apparatus, test case generation method, and computer readable medium
CN116087752A (en) Chip testing method, system, device and medium
CN116107879A (en) Soft AC performance test method and system
US20040177344A1 (en) Debugging method for the keyboard controller code
CN116401086A (en) Test method, device, equipment and medium for memory funnel error reporting mechanism
CN116150020A (en) Test case conversion method and device
CN112560041B (en) Method, apparatus and computer storage medium for automated quality verification detection
CN110399258B (en) Stability testing method, system and device for server system
US20240231347A1 (en) Fault injection test method and apparatus, and fault injection method
CN111782499A (en) Test case generation method and system
CN113407394B (en) Method, device, equipment and medium for server RAS function test
CN118504484A (en) Verification method and device of chip device, storage medium and electronic device
CN115858323A (en) Method, system and device for testing functions and performance of Central Processing Unit (CPU)
CN116680170A (en) Test method and computing 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