CN112612698A - Application program crash test method and related product - Google Patents

Application program crash test method and related product Download PDF

Info

Publication number
CN112612698A
CN112612698A CN202011500285.7A CN202011500285A CN112612698A CN 112612698 A CN112612698 A CN 112612698A CN 202011500285 A CN202011500285 A CN 202011500285A CN 112612698 A CN112612698 A CN 112612698A
Authority
CN
China
Prior art keywords
processing
page
crash
application program
path
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
Application number
CN202011500285.7A
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011500285.7A priority Critical patent/CN112612698A/en
Publication of CN112612698A publication Critical patent/CN112612698A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

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 application discloses an application program crash testing method and a related product thereof, which are applied to electronic equipment, wherein the method comprises the following steps: the electronic equipment firstly acquires page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.

Description

Application program crash test method and related product
Technical Field
The application relates to the technical field of electronic equipment, in particular to an application program crash testing method and a related product.
Background
Nowadays, various application programs are more and more, and the test of the application program refers to the test of the mobile application, including automatic test, manual test and the like; when testing the application program, function verification is mainly performed on the business process, but the exception of the application program often includes crash exception in addition to the function exception, for example, the application program is flashed back due to pointer exception. When an application program crashes, a flash back phenomenon occurs, so that user experience is reduced, or a tester detects the program crash, but a developer cannot well reproduce the problem of the crash due to various reasons. Therefore, in order to improve the running stability of the application and further improve the user experience, it is necessary to locate the cause of the application crash.
In the related art, since the problem causing the application program crash is difficult to expose in the development and test stage of the application program, after the application program is generally released online, a developer locates the cause of the application program crash according to the crash log reported by each user terminal, and then repairs the problem causing the application program crash in the application program of the next version. Due to the relationship between project period, time and manpower, the project group is often not tested and verified for the faults of the system level. We desire an automated verification scheme that can address these crash exceptions.
Disclosure of Invention
The embodiment of the application program crash testing method and the related product are provided, so that the high efficiency and convenience of the application program crash testing are improved.
In a first aspect, an embodiment of the present application provides an application crash testing method, which is applied to an electronic device; the method comprises the following steps:
acquiring page information of an application program;
determining a page data file according to the page information;
determining a plurality of processing paths according to the page data file;
and respectively testing each processing path in the plurality of processing paths to determine a crash test result.
In a second aspect, an embodiment of the present application provides an application crash testing apparatus, which is applied to an electronic device; the application crash testing device comprises a processing unit, a communication unit and a storage unit, wherein,
the processing unit is used for acquiring page information of the application program; and is used for confirming the page data file according to the said page information; and determining a plurality of processing paths according to the page data file; and the system is used for respectively testing each processing path in the plurality of processing paths and determining the crash test result
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods in the second aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in any one of the methods of the second aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an application crash testing method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating another method for crash testing of an application according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating another method for crash testing of an application according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a block diagram illustrating functional units of an apparatus for testing application crash according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiment of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, which have wireless communication functions, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like.
The following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an application crash testing method applied to an electronic device according to an embodiment of the present disclosure; the method comprises the following steps:
s101, the electronic equipment acquires page information of an application program;
the page information comprises control elements, a resource identification code label item of each control element, text attributes and position information of the control elements in the page.
S102, the electronic equipment determines a page data file according to the page information;
the page data file comprises the relevance among a plurality of control elements and the number of other control elements related to each control element.
And the number of other control elements associated with each control element can be used for determining the number of traversal layers.
S103, the electronic equipment determines a plurality of processing paths according to the page data file;
wherein the processing path includes the control element and other control elements associated with the control element.
And S104, the electronic equipment respectively tests each processing path in the plurality of processing paths to determine a crash test result.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
In one possible example, the electronic device obtains page information of an application program, including: the electronic equipment acquires at least one control element in a page; and the electronic equipment extracts the resource identification code mark information corresponding to the control element, the text attribute information corresponding to the control element and the position information of the control element in the page.
The control elements comprise buttons, pictures, characters or audio files and the like.
In the specific implementation, the control elements of the video application playing page are acquired to include a "playing control", "returning control" and a "comment control", a resource identification code marking information playing button corresponding to the "playing control", corresponding text attribute information "playing" and position information Q1 in the playing page are further extracted, a resource identification code marking information returning button corresponding to the "returning control", corresponding text attribute information "returning" and position information Q2 in the playing page are extracted, and a resource identification code marking information comment button corresponding to the "comment control", corresponding text attribute information "comment" and position information Q3 in the playing page are extracted.
As can be seen, in this example, the electronic device obtains at least one control element in a page, and then extracts resource identifier tag information corresponding to the control element, text attribute information corresponding to the control element, and position information of the control element in the page; and the method can prepare for the subsequent crash test of the application program more comprehensively, and is favorable for improving the accuracy of the crash test of the application program.
In one possible example, the electronic device determines a page data file according to the page information, including: the electronic equipment determines at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information; the electronic equipment configures the number of traversal layers of each page to be traversed; and the electronic equipment performs traversal processing on each page to be traversed according to the number of the traversal layers to determine a page data file.
The page to be traversed comprises the page and other pages associated with the page.
The step of configuring the traversal layer number of each page to be traversed comprises configuring the traversal layer number according to actual conditions, wherein the higher the layer number configuration is, the longer the crash test time is but the higher the scene composition index is, the lower the layer number configuration is, the shorter the crash test time is but the lower the scene fullness index is.
When the page data file is determined, when part of the interface exists, such as a control in a reverse direction of return, the position information can be used for carrying out blacklist configuration through the characteristics of the position information, and the page data file is removed when being generated, so that the page data file is removed from a click path, and a program is prevented from being trapped in click dead loop.
Specifically, when a path "desktop-app a chart-app a homepage-user details-modification user name" is detected, it is found that the user returns directly to "app a homepage" when "modification user name" is detected, at this time, the position information O of the page element "modification user name" is recorded, the position information O is configured in the blacklist table, and at the same time, the control element "modification user name" is deleted when the page data file is generated, so that the "modification user name" is removed from the click path.
Wherein, the traversal processing includes that when the number of traversal layers is not 1, the control element of the page and other pages after click-to-jump need to be tested, and the page data file is
Figure BDA0002843324570000051
Figure BDA0002843324570000061
The traversal processing comprises that when the number of traversal layers is 1, only the control element of the page needs to be tested, other pages after click jump do not need to be verified, and the page data file is
Figure BDA0002843324570000062
Figure BDA0002843324570000071
In the specific implementation, according to resource identification code marking information 'comment button', text attribute information 'comment' and position information 'Q3', determining a page to be traversed 'play page', 'selected comment page', 'all comment pages' and 'edit comment page', and then configuring the number of traversal layers of each page to be traversed, wherein the number of traversal layers of the 'play page' is 4, the number of traversal layers of the 'selected comment page' is 2, the number of traversal layers of the 'all comment pages' is 3, and the number of traversal layers of the 'edit comment page' is 1; and the electronic equipment performs traversal processing on each page to be traversed according to the number of the traversal layers to determine a page data file.
In this example, the electronic device determines at least one page to be traversed according to the resource identifier tag information, the text attribute information, and the location information, then the electronic device configures the number of traversal layers for each page to be traversed, and finally the electronic device performs traversal processing on each page to be traversed according to the number of traversal layers to determine a page data file; the crash test method is beneficial to meeting the crash test of different application programs in diversified scenes and improving the comprehensiveness of the crash test of the application programs.
In one possible example, the step of the electronic device testing each processing path of the plurality of processing paths respectively to determine a crash test result includes: the electronic equipment sequentially carries out cyclic click processing on each processing path in the multiple processing paths, and determines a cyclic click processing result corresponding to each processing path; and the electronic equipment generates a crash test result according to the circular click processing result corresponding to each processing path.
The electronic equipment sequentially carries out circular clicking processing on each processing path in the multiple processing paths, and acquires a screenshot of each clicking moment in the process of carrying out the circular clicking processing by the electronic equipment; and the electronic equipment determines central processor information, memory information, current electric quantity information and action hotspot information corresponding to each screenshot.
And if the processing path exists, the page data file is directly accessed to be used as a control traversal result, so that after the repair is finished, retesting can be carried out on the processing path to verify the repair result.
In the specific implementation, the electronic device sequentially performs circular click processing on each processing path in a processing path 1 of "play page-selected comment page-all comment page-edit comment page" and a processing path 2 of "play page-homepage", "selected comment page-all comment page-edit comment page", determines that a circular click processing result corresponding to each processing path is that the processing path 1 is a normal circular path, and determines that the processing path 2 is a normal circular path.
As can be seen, in this example, the electronic device performs the circular click processing on each processing path in the multiple processing paths in sequence, determines a circular click processing result corresponding to each processing path, and then generates a crash test result according to the circular click processing result corresponding to each processing path; the crash test result is determined by summarizing the circular click processing result of each processing path, so that the accuracy of the crash test of the application program is improved.
In one possible example, after the electronic device performs the circular click processing on each processing path of the plurality of processing paths in sequence, the method further includes: the electronic equipment collects abnormal circular paths and generates crash logs; and the electronic equipment clicks any abnormal circular path in the crash log and plays back a screenshot corresponding to the any abnormal circular path.
The crash log comprises an abnormal cyclic path and a page data file corresponding to the abnormal cyclic path, so that a developer is assisted to locate a crash reason and repair a crash problem.
In the specific implementation, the electronic equipment collects abnormal cyclic paths of 'application homepage-payment page', 'application homepage-balance page', 'application homepage-personal data-modified personal data', and generates a crash log; and the electronic equipment clicks the abnormal circular paths in the crash log, namely application homepage-personal data-modified personal data, and plays back the screenshots corresponding to any abnormal circular path.
As can be seen, in this example, the electronic device collects the abnormal circular paths and generates a crash log; the electronic equipment clicks any abnormal circular path in the crash log, and a screenshot corresponding to the any abnormal circular path is played back; when a developer checks the crash log, the screenshots corresponding to the click path can be played back sequentially, the developer is assisted in locating and repairing the crash reason, and the efficiency and the accuracy of the crash test of the application program are improved.
In one possible example, the electronic device performs a circular click process on each of the plurality of processing paths in turn, including: the electronic equipment detects the running state of the application program when clicking operation is performed each time; if the electronic equipment detects that the application program runs normally, marking the current detected processing path as a normal circulating path, and continuing to carry out circulating click processing on each processing path which is not detected in the plurality of processing paths; if the electronic equipment detects that the application program crashes, marking the current detected processing path as an abnormal circular path, and restarting the application program to continue to carry out circular click processing on each processing path which is not detected in the plurality of processing paths.
In a specific implementation, the electronic device detects the running state of the application program when each click operation is performed, detects a path "application homepage-payment page", finds that the running state is normal running, detects a next path "application homepage-personal data-modified personal data", finds that the application crashes due to surge of memory when jumping to the "payment page", and marks that the path is an abnormal path, and restarts the application program to detect the next path "application homepage-balance page".
In a specific implementation, the electronic device detects the running state of the application program when each click operation is performed, detects a path "application home page-payment page", finds that the application crashes due to surge of memory when jumping to the "payment page", and marks that the path is abnormal, and restarts the application program to detect the next path "application home page-personal data-modified personal data".
As can be seen, in this example, the electronic device detects an operating state of the application program when performing each click operation, if the electronic device detects that the application program is operating normally, marks the currently detected processing path as a normal circular path, and continues to perform circular click processing on each processing path that is not detected in the multiple processing paths, and if the electronic device detects that the application program is crashed, marks the currently detected processing path as an abnormal circular path, and restarts the application program to continue to perform circular click processing on each processing path that is not detected in the multiple processing paths; and the running state of each processing path is detected, so that the accuracy of the crash test of the application program is improved.
In one possible example, when the electronic device detects that the application program crashes, the method further includes: the electronic equipment captures the base class activity of the application program and generates a crash test report; and the electronic equipment positions and analyzes the crash reason according to the crash test report.
The method comprises the steps that base class activities of the application program are captured, a crash test report is generated, the crash test report comprises a hook event which is exposed to a developer by the electronic equipment, the developer can realize own business behavior in the event method, when a system is abnormally crashed, the event is triggered to be executed, namely, when the accumulated activities of the application program cause crash, the event is triggered to be executed to generate the crash test report.
In specific implementation, when the electronic device runs the application A and the application B at the same time, and the main interface of the application B is crashed, the abnormality is captured, and a crash test report is uploaded and generated to assist a tester to analyze reasons for repair.
As can be seen, in this example, the electronic device captures the base class activity of the application program to generate a crash test report, and then the electronic device locates and analyzes the crash reason according to the crash test report; through the automatic verification of the crash scene of the application program, the mechanical operation of a tester is avoided, the labor cost is saved, and the improvement of the high efficiency of the crash test of the application program is facilitated.
Referring to fig. 2, fig. 2 is a schematic flowchart of another method for testing application crash, which is applied to an electronic device, according to an embodiment of the present disclosure; as shown in the figure, the application crash testing method includes:
s201, the electronic equipment acquires at least one control element in a page;
s202, the electronic equipment extracts resource identification code mark information corresponding to the control element, text attribute information corresponding to the control element and position information of the control element in the page;
s203, the electronic equipment determines a page data file according to the resource identification code marking information, the text attribute information and the position information;
s204, the electronic equipment determines a plurality of processing paths according to the page data file;
s205, the electronic equipment respectively tests each processing path in the plurality of processing paths and determines a crash test result.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
In addition, the electronic equipment acquires at least one control element in a page, and then extracts resource identification code mark information corresponding to the control element, text attribute information corresponding to the control element and position information of the control element in the page; and the method can prepare for the subsequent crash test of the application program more comprehensively, and is favorable for improving the accuracy of the crash test of the application program.
Referring to fig. 3, fig. 3 is a schematic flowchart of another method for testing application crash, which is applied to an electronic device, according to the embodiment of the present application, and is consistent with the embodiment shown in fig. 1; as shown in the figure, the application crash testing method includes:
s301, electronic equipment acquires at least one control element in a page;
s302, the electronic equipment extracts resource identification code mark information corresponding to the control element, text attribute information corresponding to the control element and position information of the control element in the page;
s303, the electronic equipment determines at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information;
s304, the electronic equipment configures the number of traversal layers of each page to be traversed;
s305, the electronic equipment performs traversal processing on each page to be traversed according to the number of traversal layers to determine a page data file;
s306, the electronic equipment determines a plurality of processing paths according to the page data file;
s307, the electronic equipment respectively tests each processing path in the plurality of processing paths and determines a crash test result.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
In addition, the electronic equipment determines at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information, then the electronic equipment configures the number of traversal layers of each page to be traversed, and finally the electronic equipment performs traversal processing on each page to be traversed according to the number of traversal layers to determine a page data file; the crash test method is beneficial to meeting the crash test of different application programs in diversified scenes and improving the comprehensiveness of the crash test of the application programs.
Consistent with the embodiments shown in fig. 1, fig. 2, and fig. 3, please refer to fig. 4, and fig. 4 is a schematic structural diagram of an electronic device 400 provided in an embodiment of the present application, as shown in the figure, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, where the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for performing the following steps;
acquiring page information of an application program;
determining a page data file according to the page information;
determining a plurality of processing paths according to the page data file;
and respectively testing each processing path in the plurality of processing paths to determine a crash test result.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
In one possible example, the obtaining of the page information of the application program includes: acquiring at least one control element in a page; and extracting the resource identification code mark information corresponding to the control element, the text attribute information corresponding to the control element and the position information of the control element in the page.
In a possible example, the determining of the page data file according to the page information includes: determining at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information; configuring the number of traversal layers of each page to be traversed; and according to the traversal layer number, performing traversal processing on each page to be traversed, and determining a page data file.
In a possible example, the testing is performed on each processing path of the plurality of processing paths, and a crash test result is determined, where an instruction in the program is specifically configured to perform the following operations: sequentially carrying out circular click processing on each processing path in the plurality of processing paths, and determining a circular click processing result corresponding to each processing path; and generating a crash test result according to the circular click processing result corresponding to each processing path.
In a possible example, after the circular click processing is performed on each processing path in the plurality of processing paths in sequence, the instructions in the program are further specifically configured to perform the following operations: collecting abnormal circular paths and generating crash logs; clicking any abnormal circular path in the crash log, and playing back a screenshot corresponding to the any abnormal circular path.
In a possible example, the circular click processing is performed on each processing path in the plurality of processing paths in sequence, and the instruction in the program is specifically configured to perform the following operations: detecting the running state of the application program when each click operation is carried out; if the application program is detected to run normally, marking the current detected processing path as a normal circulating path, and continuing to carry out circulating click processing on each processing path which is not detected in the plurality of processing paths; if the crash of the application program is detected, marking the current detected processing path as an abnormal circular path, and restarting the application program to continue to carry out circular click processing on each processing path which is not detected in the plurality of processing paths.
In a possible example, when the application program is detected to be crashed, the instructions in the program are further specifically configured to: capturing base class activity of the application program and generating a crash test report; and positioning and analyzing the crash reason according to the crash test report.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 is a block diagram of functional units of the application crash test apparatus 500 according to the embodiment of the present application. The application crash testing apparatus 500 is applied to an electronic device, and includes a processing unit 501, a communication unit 502, and a storage unit 503, wherein,
the processing unit 501 is configured to obtain page information of an application; and is used for confirming the page data file according to the said page information; and determining a plurality of processing paths according to the page data file; and the crash testing module is used for respectively testing each processing path in the plurality of processing paths and determining a crash testing result.
It can be seen that, in the embodiment of the present application, a method for testing application crash is provided, which is applied to an electronic device; the method comprises the following steps: the method comprises the steps that firstly, the electronic equipment obtains page information of an application program, determines a page data file according to the page information, then determines a plurality of processing paths according to the page data file, and then tests each processing path in the plurality of processing paths respectively to determine a crash test result; by the method, the processing path is formed according to the page data file, then the loop processing is carried out, the abnormal path is found, the high efficiency and the accuracy of the crash test of the application program are improved, the reason for the crash of the application program is acquired, and the crash problem of the application program is solved more effectively.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
In a possible example, the processing unit 501 is specifically configured to, in acquiring page information of an application program: acquiring at least one control element in a page; and extracting the resource identification code mark information corresponding to the control element, the text attribute information corresponding to the control element and the position information of the control element in the page.
In a possible example, the determining a page data file according to the page information includes: determining at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information; configuring the number of traversal layers of each page to be traversed; and according to the traversal layer number, performing traversal processing on each page to be traversed, and determining a page data file.
In a possible example, the testing is performed on each processing path of the multiple processing paths, and a crash test result is determined, where the processing unit 501 is specifically configured to: sequentially carrying out circular click processing on each processing path in the plurality of processing paths, and determining a circular click processing result corresponding to each processing path; and generating a crash test result according to the circular click processing result corresponding to each processing path.
In a possible example, after performing the circular click processing on each processing path in the plurality of processing paths in sequence, the processing unit 501 is further specifically configured to: collecting abnormal circular paths and generating crash logs; clicking any abnormal circular path in the crash log, and playing back a screenshot corresponding to the any abnormal circular path.
In a possible example, the processing unit 501 is specifically configured to perform circular click processing on each of the plurality of processing paths in sequence, and: detecting the running state of the application program when each click operation is carried out; if the application program is detected to run normally, marking the current detected processing path as a normal circulating path, and continuing to carry out circulating click processing on each processing path which is not detected in the plurality of processing paths; if the crash of the application program is detected, marking the current detected processing path as an abnormal circular path, and restarting the application program to continue to carry out circular click processing on each processing path which is not detected in the plurality of processing paths.
In a possible example, when the application crash is detected, the processing unit 501 is further specifically configured to: capturing base class activity of the application program and generating a crash test report; and positioning and analyzing the crash reason according to the crash test report.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several 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 above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An application crash test method is characterized by being applied to electronic equipment; the method comprises the following steps:
acquiring page information of an application program;
determining a page data file according to the page information;
determining a plurality of processing paths according to the page data file;
and respectively testing each processing path in the plurality of processing paths to determine a crash test result.
2. The method of claim 1, wherein the obtaining page information of the application program comprises:
acquiring at least one control element in a page;
and extracting the resource identification code mark information corresponding to the control element, the text attribute information corresponding to the control element and the position information of the control element in the page.
3. The method of claim 2, wherein determining a page data file from the page information comprises:
determining at least one page to be traversed according to the resource identification code marking information, the text attribute information and the position information;
configuring the number of traversal layers of each page to be traversed;
and according to the traversal layer number, performing traversal processing on each page to be traversed, and determining a page data file.
4. The method of claim 3, wherein the separately testing each of the plurality of processing paths to determine the crash test result comprises:
sequentially carrying out circular click processing on each processing path in the plurality of processing paths, and determining a circular click processing result corresponding to each processing path;
and generating a crash test result according to the circular click processing result corresponding to each processing path.
5. The method of claim 4, wherein after performing the circular click processing on each of the plurality of processing paths in sequence, the method further comprises:
collecting abnormal circular paths and generating crash logs;
clicking any abnormal circular path in the crash log, and playing back a screenshot corresponding to the any abnormal circular path.
6. The method according to claim 4, wherein the performing a circular click process on each of the plurality of processing paths in sequence comprises:
detecting the running state of the application program when each click operation is carried out;
if the application program is detected to run normally, marking the current detected processing path as a normal circulating path, and continuing to carry out circulating click processing on each processing path which is not detected in the plurality of processing paths;
if the crash of the application program is detected, marking the current detected processing path as an abnormal circular path, and restarting the application program to continue to carry out circular click processing on each processing path which is not detected in the plurality of processing paths.
7. The method of claim 6, wherein upon detecting the application crash, the method further comprises:
capturing base class activity of the application program and generating a crash test report;
and positioning and analyzing the crash reason according to the crash test report.
8. An application crash testing device is characterized by being applied to electronic equipment; the application crash testing device comprises a processing unit, a communication unit and a storage unit, wherein,
the processing unit is used for acquiring page information of the application program; and is used for confirming the page data file according to the said page information; and determining a plurality of processing paths according to the page data file; and the crash testing module is used for respectively testing each processing path in the plurality of processing paths and determining a crash testing result.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202011500285.7A 2020-12-17 2020-12-17 Application program crash test method and related product Pending CN112612698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011500285.7A CN112612698A (en) 2020-12-17 2020-12-17 Application program crash test method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011500285.7A CN112612698A (en) 2020-12-17 2020-12-17 Application program crash test method and related product

Publications (1)

Publication Number Publication Date
CN112612698A true CN112612698A (en) 2021-04-06

Family

ID=75240417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011500285.7A Pending CN112612698A (en) 2020-12-17 2020-12-17 Application program crash test method and related product

Country Status (1)

Country Link
CN (1) CN112612698A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037663A (en) * 2022-05-26 2022-09-09 深圳前海微众银行股份有限公司 Application system update test method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461900A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 User interface testing method, center control server, test terminal and system
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal
CN107402877A (en) * 2016-05-19 2017-11-28 福建天晴数码有限公司 APP method of testings and system based on Android ends
CN107943685A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of traverse path generation method, device, server and storage medium
CN108595330A (en) * 2018-04-23 2018-09-28 北京潘达互娱科技有限公司 A kind of application testing method and device
CN109086204A (en) * 2018-07-20 2018-12-25 北京小米移动软件有限公司 The foundation of node relationships tree, page marks and recognition methods, device and storage medium
CN109408361A (en) * 2018-08-15 2019-03-01 中国平安人寿保险股份有限公司 Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN110069407A (en) * 2019-04-03 2019-07-30 广州云测信息技术有限公司 A kind of function test method and device of application program
KR20200080541A (en) * 2018-12-27 2020-07-07 아주대학교산학협력단 Apparatus and method for detecting vulnerability of software

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461900A (en) * 2014-12-19 2015-03-25 北京奇虎科技有限公司 User interface testing method, center control server, test terminal and system
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal
CN107402877A (en) * 2016-05-19 2017-11-28 福建天晴数码有限公司 APP method of testings and system based on Android ends
CN107943685A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of traverse path generation method, device, server and storage medium
CN108595330A (en) * 2018-04-23 2018-09-28 北京潘达互娱科技有限公司 A kind of application testing method and device
CN109086204A (en) * 2018-07-20 2018-12-25 北京小米移动软件有限公司 The foundation of node relationships tree, page marks and recognition methods, device and storage medium
CN109408361A (en) * 2018-08-15 2019-03-01 中国平安人寿保险股份有限公司 Monkey tests restored method, device, electronic equipment and computer readable storage medium
KR20200080541A (en) * 2018-12-27 2020-07-07 아주대학교산학협력단 Apparatus and method for detecting vulnerability of software
CN110069407A (en) * 2019-04-03 2019-07-30 广州云测信息技术有限公司 A kind of function test method and device of application program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037663A (en) * 2022-05-26 2022-09-09 深圳前海微众银行股份有限公司 Application system update test method and device
CN115037663B (en) * 2022-05-26 2023-07-18 深圳前海微众银行股份有限公司 Application system updating test method and device

Similar Documents

Publication Publication Date Title
CN109871326B (en) Script recording method and device
CN110221983B (en) Test method, test device, computer readable storage medium and computer equipment
US20150378876A1 (en) Visual graphical user interface verification
CN109710508A (en) Test method, test device, test equipment and computer readable storage medium
CN108717393A (en) A kind of applied program testing method and mobile terminal
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN112732587B (en) Automatic test log acquisition method and device, electronic equipment and storage medium
CN106776319B (en) Automatic test method and device
CN108804299A (en) Application exception processing method and processing device
CN109803152A (en) Violation checking method, device, electronic equipment and storage medium
CN106874763B (en) Android software malicious behavior triggering system and method for simulating user behavior
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN110891197A (en) Video advertisement putting condition detection method and device, electronic equipment and storage medium
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN113448834A (en) Buried point testing method and device, electronic equipment and storage medium
CN109101412B (en) Test file generation method, test file generation device, test file testing method, test file testing device, storage medium and computer equipment
CN112612698A (en) Application program crash test method and related product
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN116909800A (en) Method and device for locating crash information and storage medium
CN110688173A (en) Positioning method and device of components in cross-platform interface framework and electronic equipment
CN110389897A (en) SDK logic test method, device, storage medium and server
CN110889116A (en) Advertisement blocking method and device and electronic equipment
CN111813648A (en) Automatic testing method and device applied to App, storage medium and electronic equipment
CN113868137A (en) Method, device and system for processing buried point data and server

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