CN114546878A - Service-based android monkey testing system and method, electronic device and readable storage medium - Google Patents
Service-based android monkey testing system and method, electronic device and readable storage medium Download PDFInfo
- Publication number
- CN114546878A CN114546878A CN202210212513.3A CN202210212513A CN114546878A CN 114546878 A CN114546878 A CN 114546878A CN 202210212513 A CN202210212513 A CN 202210212513A CN 114546878 A CN114546878 A CN 114546878A
- Authority
- CN
- China
- Prior art keywords
- test
- monkey
- monkey test
- android
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 282
- 241000282693 Cercopithecidae Species 0.000 title claims abstract description 197
- 238000000034 method Methods 0.000 title claims description 15
- 238000001514 detection method Methods 0.000 claims description 20
- 238000013475 authorization Methods 0.000 claims description 9
- 230000004044 response Effects 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 5
- 238000010924 continuous production Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000012800 visualization Methods 0.000 claims description 3
- 230000010354 integration Effects 0.000 abstract description 8
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 8
- 238000013461 design Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 241000282672 Ateles sp. Species 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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 invention provides a service android monkey testing system, a service android monkey testing method, electronic equipment and a readable storage medium. The test system comprises a connection module, an initialization module, an auxiliary function module, an operation module, a log module and a test recording module. By adopting the technical scheme, a service deployment mode can be adopted, a user does not need to master adb commands, build an environment and upgrade by himself, and a portable and lightweight monkey testing tool which is beneficial to management and supports continuous integration is provided for small and medium-sized enterprises which do not have conditions to build a special monkey testing machine room by adopting an API (application programming interface) interface calling mode.
Description
Technical Field
The invention relates to the technical field of software testing, and particularly discloses a service-oriented android monkey testing system, a service-oriented android monkey testing method, electronic equipment and a readable storage medium.
Background
In recent years, with the continuous development of the internet, the requirement of users on the stability of application programs is higher and higher, which also leads to the water rise of the demand of software developers on the monkey test. The monkey test means that a person without experience of the test, even a person who does not know at all about the computer (just like a monkey), does not need to know any knowledge about the user interaction of the program, and if he is given a program he will operate on the interface he sees, which is purposeless and random. The testing mode can find a plurality of good faults in the early stage of the product cycle, and saves a lot of trial and error cost for research and development users.
However, the existing monkey testing tool has the problems of high use threshold, difficulty in tool upgrading, difficulty in log management, inconvenience and convenience in use, low execution efficiency, incapability of supporting continuous integration, no archive of test records, opaqueness and the like, so that many small and medium-sized enterprises which do not have the condition for establishing a special monkey testing machine room are difficult to use the monkey testing tool which is convenient, favorable for management and capable of supporting continuous integration.
Disclosure of Invention
In view of the above-mentioned drawbacks in the prior art, the present invention provides a servitized android monkey testing system, method, electronic device and readable storage medium.
A first aspect of the present application provides a servitized android monkey testing method, which specifically includes:
the connection module is used for realizing the connection between the android monkey test system and the target equipment;
the initialization module is used for sending the configuration file required by the monkey test to the target equipment and configuring the test environment required by the monkey test in the target equipment under the condition that the android monkey test system is connected with the target equipment;
the operation module is used for executing monkey test according to the test instruction;
the log module is used for collecting the log files after the monkey test is finished, and analyzing the collected log files to obtain a detection result corresponding to the monkey test;
and the test record module is used for generating and updating the test record corresponding to the monkey test.
In a possible implementation of the first aspect, the connection module further includes a first detection unit;
the first detection unit is used for detecting whether a monkey test in operation exists in the target equipment;
and under the condition that the operating monkey test does not exist in the target equipment, the connection between the android monkey test system and the target equipment is realized.
In a possible implementation of the first aspect, the initialization module further includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring configuration parameters of target equipment, and the configuration parameters are used for configuring a monkey test environment corresponding to the target equipment;
the second detection unit is used for detecting whether the android monkey test system obtains the USB debugging authorization of the target device;
and the pushing unit is used for pushing jar files required by the monkey test, so files required by self-learning in the monkey test and related configuration files to the target equipment under the condition that the android monkey test system obtains USB debugging authorization.
In a possible implementation of the first aspect, the running module further includes:
the instruction receiving unit is used for receiving a test instruction, and the test instruction comprises application program identity information needing to execute the monkey test and test time corresponding to the monkey test;
the time compensation unit is used for executing reconnection operation under the condition that communication interruption occurs in the monkey test until the reconnection times are exhausted or the duration of the monkey test is equal to the test time;
and the state circulation unit is used for executing circulation of the running state according to the real-time running condition of the monkey test, wherein the running state comprises running failure, running success, manual termination, retry failure, manual collection and termination failure.
In a possible implementation of the first aspect, the logging module further includes:
the judging unit is used for judging whether the target equipment generates a crash log and/or an application non-response log after the monkey test;
the extraction unit is used for extracting the corresponding log file under the condition that the crash log exists and/or the application non-response log exists;
the analysis unit is used for executing duplicate removal operation and analysis operation on the extracted log file so as to acquire corresponding fault information;
and the notification unit is used for generating a corresponding fault notification according to the fault information and the configuration information of the target device and feeding back the fault notification.
In a possible implementation of the first aspect, the test recording module further includes:
the generating module is used for generating a corresponding test record at the starting moment of the monkey test;
the updating module is used for updating the test record in the continuous process of the monkey test and after the monkey test is finished;
the test record comprises corresponding information of the target device, application program information corresponding to the monkey test, duration of the monkey test, fault information and a corresponding log file.
In a possible implementation of the first aspect, the method further includes;
the storage module is used for storing the detection result and the test record corresponding to each monkey test;
and the visualization module is used for visually presenting the detection result and the test record corresponding to each monkey test.
A second aspect of the present application provides a servitized android monkey testing method, which is applied to the servitized android monkey testing system provided in the first aspect, and includes:
connecting the android monkey testing system with the target device;
under the condition that the android monkey testing system is connected with the target equipment, sending a configuration file required by monkey testing to the target equipment, and configuring a testing environment required by monkey testing in the target equipment;
executing the monkey test according to the test instruction;
after the monkey test is finished, collecting the log files, and analyzing the collected log files to obtain a detection result corresponding to the monkey test; and
and generating and updating a test record corresponding to the monkey test.
A third aspect of the present application provides an electronic device comprising: a memory for storing a processing program; and the processor is used for realizing the servitized android monkey testing system provided by the first aspect when executing the processing program.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a processing program which, when executed by a processor, implements the serviced android testing system provided by the first aspect.
Compared with the prior art, the method has the following beneficial effects:
through the technical scheme that this application provided, an android monkey test system of servitization is provided, and this technical scheme adopts the deployment mode of servitization, and the user need not master the adb order, need not build the environment, need not upgrade by oneself, has given monkey test through the mode that the api interface was called and has intervened the ability of continuing integration, supporting portable equipment.
Further, the technical scheme provided by the application also designs a time compensation mechanism. When the actual running time is smaller than the expected time due to the running interruption, the difference value between the actual time and the expected time is automatically used as the expected time of the next test for retry, and the problem of the monkey test terminal caused by the instability of the network is avoided.
In addition, the technical scheme provided by the application also provides a visual test result feedback design, and the test result feedback design is presented through a test record management page and a bug trend chart page: on the test record management page, a user can see the start-stop time, the duration, the equipment information, the application program information, the ANR, the crash information, the bug link, the event coverage rate and other information of each test; on the bug trend chart page, a user can see the monkey test duration of each version, the found quantities of crash and ANR, model coverage conditions of each version and other information, and the use experience of the monkey test system for the user is improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
fig. 1 shows a schematic structural diagram of a serviced android monkey testing system according to an embodiment of the present application.
Fig. 2 shows a flowchart of a servitized android monkey testing method according to an embodiment of the present application.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
Currently, existing monkey test implementations include SpiderMonkey and Fastbot _ andorid. Wherein:
the SpiderMonkey scheme uses Maxium + Python for high packaging and Pyinstaller to pack it into exe or mac executable file, and performs test function selection by inputting function number. After automatically acquiring the IP address and the top layer name of the USB connected equipment, the Monkey test function pushes the required jar packet and the required blacklist file to the equipment, and then executes Monkey test. The log collection function can copy the crash log generated on the mobile phone to the PC terminal, and then manually report the crash log to the BUG.
The Fastbot _ andorid scheme needs to push a required jar packet and a configuration file to a/sdcard directory of the mobile phone through an adb command after adb connection is established, and performs operations such as monkey testing, log collection and the like through the adb command, so as to manually identify and report the log.
In addition, aiming at a large enterprise with a condition for establishing a special monkey test machine room, the latest equipment can be purchased at the first time, placed into the machine room and accessed to the continuous integration, and monkey test can be continuously carried out all day long.
It can be understood that the above solutions all have the problems of high use threshold, difficult tool upgrade, difficult log management, inconvenient use, low execution efficiency, no capability of supporting continuous integration, no archive and non-transparency of test records, and the like. In order to solve the above problems, the present application provides a servitized android monkey testing system, method, electronic device and readable storage medium. The technical solutions disclosed in the present application will be specifically illustrated and described below with reference to examples.
In some embodiments of the present application, FIG. 1 illustrates a serviced android monkey testing system. As shown in fig. 1, the served android monkey testing system includes:
and the connection module 001 is used for realizing the connection between the android monkey test system and the target device.
The initialization module 002 is configured to send the configuration file required by the monkey test to the target device and configure the test environment required by the monkey test in the target device when the android monkey test system is connected to the target device.
And the running module 003 is used for executing monkey test according to the test instruction.
And the log module 004 is used for collecting the log file after the monkey test is completed, and analyzing the collected log file to obtain a detection result corresponding to the monkey test.
And the test record module 005 is used for generating and updating the test record corresponding to the monkey test.
In a specific implementation manner of the above embodiment, the monkey test system provided by the application can implement a servitization monkey test and a matched test record management based on a BS/CS architecture built by Debug kit + Django + AdminLte. The adb connect is used for establishing the connection between the mobile terminal and the service terminal, so that the monkey test has the feasibility of servitization, and the problem that the monkey test does not have the access continuous integration capability is solved. Since the monkey test entry is added to the Debug kit and the web front end of the application program end, a user can operate monkey test by one key without mastering an adb command or downloading any tool after downloading the application program, and monkey test is facilitated.
Further explanation and explanation will be given below on specific implementations of the connection module 001 to the test recording module 005 as follows:
in some embodiments of the present application, the connection module 001 may further include a first detection unit, configured to detect whether there is a monkey test running in the target device. It can be understood that, in order to avoid the problem that a plurality of Monkey tests mutually occupy connection and the same port number, thereby entering a deadlock state or unauthorized USB debugging, it is necessary to determine whether there is an operating Monkey test in the target device in advance, and if there is no operating Monkey test in the target device, establish a corresponding adb connection.
In addition, an adb connection and an disconnection are further packaged in the connection module 001, wherein the disconnection is to terminate the adb connection, and the problem that the monkey test cannot be directly terminated in advance can be avoided in the practical application of the subsequent embodiment.
In some embodiments of the present application, the initialization module 002 may further include:
the acquisition unit is used for acquiring the configuration parameters of the target device, and the configuration parameters are used for configuring the monkey test environment corresponding to the target device. It is understood that in a specific implementation of the above embodiment, after the adb connection is successfully established, the brand, model, and android system version of the device may be obtained through the adb command. Those skilled in the art may also obtain other configuration parameter information according to actual needs, which is not limited herein.
And the second detection unit is used for detecting whether the android monkey test system obtains the USB debugging authorization of the target device. In the actual application process, the USB debugging authorization state can be obtained again by retrieving the running result of the adb command, and the secondary confirmation server obtains the USB debugging authorization of the tester. After the confirmation is finished, the version number and the sub-version number of the application program to be subjected to monkey test are acquired through an adb command, and meanwhile, exception handling is performed to detect whether the target application program is installed or not so as to eliminate possible exception conditions.
And the pushing unit is used for pushing jar files required by the monkey test, so files required by self-learning in the monkey test and related configuration files to the target equipment under the condition that the android monkey test system obtains USB debugging authorization.
In some embodiments of the application, the service android monkey test system may further include an auxiliary program module, configured to automatically install and set an auxiliary program to obtain an owner permission of the device, lock a status bar, lock a silent mode, automatically start barrier-free service, automatically connect to WIFI when a WIFI connection is interrupted, automatically confirm an authorization of a USB and other permissions, and provide locking and self-starting functions of a TCP/IP port number; and provides convenient access to the following menus: the method comprises the steps of checking equipment information, developer options, safety setting, barrier-free service, self-starting management, input method setting, notification authority management, WIFI setting, account management and the like, wherein limitation is not required, and a person skilled in the art can select addition of functions according to actual needs.
In an actual application of the above embodiment, after the pushing unit finishes pushing the file and succeeds, the auxiliary program module may be implemented to install or start the auxiliary program according to an installation state of the auxiliary program, and initialize program switch settings including mute locking, automatic WIFI connection, notification bar locking, and automatic barrier-free service activation.
In particular, in order to avoid the disadvantage that a USB connection needs to be established first to lock the TCP/IP port number and start the TCP/IP port number when the target device is restarted in the conventional monkey test scheme, the above embodiment adds corresponding operation entries and functions to the debugging tool of the application client under test and the auxiliary tool automatically downloaded during execution of monkey test, so as to directly initialize the devices or parts of the vivo devices having root privileges. The devices are completely separated from the USB connection, and the convenience of monkey testing is greatly improved.
In some embodiments of the present application, the run module 003 further comprises:
and the instruction receiving unit is used for receiving a test instruction, and the test instruction comprises the identity information of the application program needing to execute the monkey test and the test time corresponding to the monkey test.
In one practical application of the above embodiment, in order to respond to the structure to the client in time, the module starts the monkey test in an asynchronous thread manner. Firstly, a test record is inserted, and the test record can contain information such as application id, equipment information, application information, start time, target time, tester, ip address, thread id, initial running state and the like. Then starting monkey test through adb command and detecting whether the test is normally operated through a return code: when the return code is 1, the running state flow is transferred to 'running exception'.
And the time compensation unit is used for executing reconnection operation under the condition that communication interruption occurs in the monkey test until the reconnection times are exhausted or the duration of the monkey test is equal to the test time. Considering that communication interruption may occur during the Monkey test operation, the time compensation mechanism is started until the reconnection times are exhausted or the operation time length is equivalent to the expected time length. The time compensation mechanism causes the problem that the monkey test cannot be terminated directly in advance, and for the problem, the monkey test is safely terminated by throwing the SystemExit exception and terminating the adb connection. The monkey test can be terminated in advance by throwing the SystemExit exception when the exception occurs in the stages of adb connection, environment initialization and the like.
And the state circulation unit is used for executing circulation of the running state according to the real-time running condition of the monkey test, wherein the running state comprises running failure, running success, manual termination, retry failure, manual collection and termination failure. It can be understood that the monkey test is more visualized and more transparent through the circulation of seven states of 'operation failure', 'operation in process', 'operation success', 'manual termination', 'retry in process', 'retry failure', 'manual collection', 'termination failure' and 'report failure'.
In some embodiments of the present application, the log module 004 further comprises:
and the judging unit is used for judging whether the target equipment generates a crash log and/or an application non-response log after the monkey test.
And the extraction unit is used for extracting the corresponding log file under the condition that the crash log exists and/or the application non-response log exists.
And the analysis unit is used for executing the duplicate removal operation and the analysis operation on the extracted log file so as to acquire corresponding fault information.
And the notification unit is used for generating a corresponding fault notification according to the fault information and the configuration information of the target device and feeding back the fault notification.
In one practical application of the above embodiment, it is first detected whether the device generates a crash log and/or an application non-response log: if the crash log and/or the application non-response log are generated, the log files need to be uploaded, file analysis and in-file duplicate removal are carried out, and a fault header and fault information to be submitted are obtained. And entering a test fault submitting stage after the resolution is finished, accessing a fault list of the jira before the fault list is submitted, detecting whether a repeated fault title exists under the current version number, and removing the duplicate again. After the duplication removal is finished and the fault information passes, the fault sponsor corresponding to the target application program is inquired according to the application program id, the equipment information, the application program information, the fault title and the fault text are spliced into the fault information and submitted to the fault sponsor, and the monkey test is convenient and fast. Meanwhile, developers can receive repeated faults as little as possible, and time cost and communication cost of testers and development are reduced.
It can be understood that after the log processing module is finished running, the function switch of the auxiliary program needs to be restored to avoid the interference that the volume cannot be turned on and the notification bar cannot be called when the tester is normally used.
In some embodiments of the present application, the test recording module 005 further comprises:
and the generating module is used for generating a corresponding test record at the starting time of the monkey test.
And the updating module is used for updating the test record in the continuous process of the monkey test and after the monkey test is finished.
The test record comprises corresponding information of the target device, application program information corresponding to the monkey test, duration of the monkey test, fault information and a corresponding log file.
In a practical application of the above embodiment, a monkey test is started to generate a monkey test record, and the monkey test record is updated after the monkey test is ended. The test record management module may include, but is not limited to, the following information: device information (model, brand and system version), application information (application id, version number, sub-version number), start and end times, number and links of failures, log links, provide send mail, terminate test and manually collect log buttons.
In some embodiments of the present application, the servitized android monkey testing system may further include;
and the storage module is used for storing the detection result and the test record corresponding to each monkey test.
And the visualization module is used for visually presenting the detection result and the test record corresponding to each monkey test.
In one practical application of the above embodiment, the user can click on the failure and log file icon in the visual interface to directly access the target failure link and log. The monkey test is visualized and is convenient to manage. The test record page can also provide buttons for sending mails, terminating tests and manually collecting logs, so that the problems that the monkey test lacks dockable test reports, the test cannot be terminated and the test records are inconvenient to manage when the test is abnormal are solved.
In some embodiments of the present application, fig. 2 illustrates a served android monkey testing method, which is applied to any one of the served android monkey testing systems provided in the foregoing embodiments. Specifically, as shown in fig. 2, the method specifically includes:
step 100: and connecting the android monkey testing system with the target device.
Step 200: under the condition that the android monkey test system is connected with the target device, the configuration file required by monkey test is sent to the target device, and the test environment required by monkey test is configured in the target device.
Step 300: and executing the monkey test according to the test instruction.
Step 400: and after the monkey test is finished, collecting the log files, and analyzing the collected log files to obtain a detection result corresponding to the monkey test. And
step 500: and generating and updating a test record corresponding to the monkey test.
It can be understood that the above steps 100 to 500 are consistent and corresponding to the functional modules of the servitized android monkey test system provided in the foregoing embodiment, and are not described herein again.
In some embodiments of the present application, an electronic device is also provided. The electronic device comprises a memory and a processor, wherein the memory is used for storing a processing program, and the processor executes the processing program according to instructions. When the processor executes the processing program, the method for testing the android monkey service in the foregoing embodiment is realized.
In some embodiments of the present application, a readable storage medium is also provided, which may be a non-volatile readable storage medium or a volatile readable storage medium. The readable storage medium has stored therein instructions that, when executed on a computer, cause an electronic device containing such readable storage medium to implement the aforementioned provided serviced android test method.
It is understood that the aforementioned servitized android monkey testing system, if implemented in software functional modules and sold or used as a stand-alone product, can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a 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 readable storage 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.
The program code in which aspects disclosed herein are implemented may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The embodiments of the present disclosure are described in detail above with reference to the drawings, but the present disclosure is not limited to the above embodiments. Even if various changes are made to the present disclosure, the changes are still within the scope of the present disclosure if they fall within the scope of the claims of the present disclosure and their equivalents.
In summary, according to the technical scheme provided by the application, a service-oriented android monkey testing system is provided. The technical scheme adopts a service deployment mode, a user does not need to master adb commands, build an environment and upgrade by himself, and a portable and lightweight monkey testing tool which is beneficial to management and supports continuous integration is provided for small and medium-sized enterprises which do not have conditions for establishing a special monkey testing machine room through an API (application programming interface) interface calling mode.
Further, the technical scheme provided by the application also designs a time compensation mechanism. When the actual running time is smaller than the expected time due to the running interruption, the difference value between the actual time and the expected time is automatically used as the expected time of the next test for retry, and the problem of the monkey test terminal caused by the instability of the network is avoided.
In addition, the technical scheme provided by the application also provides a visual test result feedback design, and the test result feedback design is presented through a test record management page and a bug trend chart page: on the test record management page, a user can see the start-stop time, the duration, the equipment information, the application program information, the ANR, the crash information, the bug link, the event coverage rate and other information of each test; on the bug trend chart page, a user can see the monkey test duration of each version, the found quantities of crash and ANR, model coverage conditions of each version and other information, and the use experience of the monkey test system for the user is improved.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (10)
1. A serviced android monkey testing system, comprising:
the connection module is used for realizing the connection between the android monkey test system and the target equipment;
the initialization module is used for sending a configuration file required by the monkey test to the target equipment and configuring a test environment required by the monkey test in the target equipment under the condition that the android monkey test system is connected with the target equipment;
the running module is used for executing the monkey test according to the test instruction;
the log module is used for collecting log files after the monkey test is finished, and analyzing the collected log files to obtain a detection result corresponding to the monkey test;
and the test record module is used for generating and updating the test record corresponding to the monkey test.
2. The serviced android monkey test system of claim 1, the connection module further comprising a first detection unit;
the first detection unit is used for detecting whether the monkey test in operation exists in the target equipment;
and under the condition that the operating monkey test does not exist in the target equipment, realizing the connection between the android monkey test system and the target equipment.
3. The serviced android monkey test system of claim 1, the initialization module further comprising:
the acquisition unit is used for acquiring configuration parameters of the target equipment, and the configuration parameters are used for configuring a monkey test environment corresponding to the target equipment;
the second detection unit is used for detecting whether the android monkey test system obtains the USB debugging authorization of the target device;
and the pushing unit is used for pushing jar files required by the monkey test, so files required by self-learning in the monkey test and related configuration files to the target equipment under the condition that the android monkey test system obtains the USB debugging authorization.
4. The serviced android monkey test system of claim 1, the run module further comprising:
the instruction receiving unit is used for receiving the test instruction, and the test instruction comprises application program identity information needing to execute the monkey test and test time corresponding to the monkey test;
the time compensation unit is used for executing reconnection operation under the condition that communication interruption occurs in the monkey test until the reconnection times are exhausted or the duration of the monkey test is equal to the test time;
and the state circulation unit is used for executing circulation of the running state according to the real-time running condition of the monkey test, wherein the running state comprises running failure, running success, manual termination, retry failure, manual collection and termination failure.
5. The serviced android monkey test system of claim 1, the logging module further comprising:
the judging unit is used for judging whether the target equipment generates a crash log and/or an application non-response log after the monkey test;
the extraction unit is used for extracting the corresponding log file under the condition that the crash log and/or the application non-response log exist;
the analysis unit is used for executing duplicate removal operation and analysis operation on the extracted log file so as to acquire corresponding fault information;
and the notification unit is used for generating a corresponding fault notification according to the fault information and the configuration information of the target equipment and feeding back the fault notification.
6. The serviced android monkey test system of claim 1, the test logging module further comprising:
the generating module is used for generating the corresponding test record at the starting moment of the monkey test;
the updating module is used for updating the test record in the continuous process of the monkey test and after the monkey test is finished;
the test record comprises corresponding information of the target device, application program information corresponding to the monkey test, duration of the monkey test, fault information and a corresponding log file.
7. The serviced android monkey test system of claim 1, further comprising;
the storage module is used for storing the detection result and the test record corresponding to the monkey test each time;
and the visualization module is used for visually presenting the detection result and the test record corresponding to the monkey test each time.
8. A method for servitized android monkey testing, applied to the servitized android monkey testing system of any one of claims 1 to 7, comprising:
connecting the android monkey test system with target equipment;
under the condition that the android monkey test system is connected with the target equipment, sending a configuration file required by monkey test to the target equipment, and configuring a test environment required by monkey test in the target equipment;
executing the monkey test according to the test instruction;
collecting log files after the monkey test is finished, and analyzing the collected log files to obtain a detection result corresponding to the monkey test; and
and generating and updating a test record corresponding to the monkey test.
9. An electronic device, comprising:
a memory for storing a processing program;
a processor that, when executing the handler, implements the serviced android monkey test system of any of claims 1 to 7.
10. A readable storage medium having stored thereon a processing program which, when executed by a processor, implements the serviced android monkey test system of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210212513.3A CN114546878A (en) | 2022-03-04 | 2022-03-04 | Service-based android monkey testing system and method, electronic device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210212513.3A CN114546878A (en) | 2022-03-04 | 2022-03-04 | Service-based android monkey testing system and method, electronic device and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114546878A true CN114546878A (en) | 2022-05-27 |
Family
ID=81661368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210212513.3A Pending CN114546878A (en) | 2022-03-04 | 2022-03-04 | Service-based android monkey testing system and method, electronic device and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114546878A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760301A (en) * | 2016-02-24 | 2016-07-13 | 惠州Tcl移动通信有限公司 | Automatic testing method and system based on Monkey command |
CN108108296A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(北京)有限公司 | A kind of cloud test method, server and client |
-
2022
- 2022-03-04 CN CN202210212513.3A patent/CN114546878A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760301A (en) * | 2016-02-24 | 2016-07-13 | 惠州Tcl移动通信有限公司 | Automatic testing method and system based on Monkey command |
CN108108296A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(北京)有限公司 | A kind of cloud test method, server and client |
Non-Patent Citations (1)
Title |
---|
杨欣: "Andriod应用自动化测试系统的设计与实现", 《中国优秀硕士学位论文全文数据库》, no. 2018, 15 July 2018 (2018-07-15), pages 138 - 769 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110162977B (en) | Android vehicle-mounted terminal system vulnerability detection system and method | |
KR101008977B1 (en) | Method of testing OSGi service platform and test tool thereof | |
CN106598835B (en) | Application testing method, device and system | |
CN106294102B (en) | Application program testing method, client, server and system | |
US7149928B2 (en) | User transparent software malfunction detection and reporting | |
US20160026547A1 (en) | Generating predictive diagnostics via package update manager | |
US9585033B2 (en) | System and method for enhanced diagnostics on mobile communication devices | |
CN106294176B (en) | The method and system that application failure positions in Mac OS systems | |
CN106959866A (en) | A kind of log collection client and its upgrade method | |
CN106330599B (en) | Android application program network flow multithreading acquisition system and method | |
CN111382048B (en) | Management method and device for mobile equipment on true machine test platform | |
CN110119280A (en) | The method and device of more firmware upgrades | |
CN108628739A (en) | A kind of method that Lua scripts are debugged, client, server and debugger | |
CN111813646A (en) | Method and device for injecting application probe in docker container environment | |
CN112765028A (en) | Android application program testing method and system based on group control mechanism | |
CN107153539B (en) | File interface system | |
CN112543478B (en) | WiFi module automatic test method and device, computer equipment and storage medium | |
CN110928787B (en) | Automatic test script recording and playback method, device, equipment and storage medium | |
CN110134558B (en) | Method and device for detecting server | |
CN115454856B (en) | Multi-application security detection method, device, medium and electronic equipment | |
CN114546878A (en) | Service-based android monkey testing system and method, electronic device and readable storage medium | |
CN107220174B (en) | Automatic testing method and device | |
CN112596750B (en) | Application testing method and device, electronic equipment and computer readable storage medium | |
CN111797016B (en) | Application program testing method, device, storage medium and device | |
CN107220149B (en) | Method and system for capturing debugging data of wireless communication module in Linux system under Windows |
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 |