The invention provides an automatic
package capturing method for an
Android application. The automatic
package capturing method comprises the following steps: automatically downloading an installationpackage to the local according to a provided installation
package downloading link, analyzing signature information of the installation package and then installing the installation package to mobileequipment; opening an app through the atx
service layer and communicating with the app; after entering the
home page, automatically analyzing structural information of the page, wherein the structureinformation comprises a top equipment information boundary, a head page description information boundary and a bottom menu element boundary of a
home page, and a top equipment information boundary, ahead page description information boundary and a middle page boundary of a secondary page; analyzing first-level menu elements at the bottom boundary of the
home page, comprehensively analyzing and obtaining second-level elements at the middle boundary based on attribute, position and size information, and storing the second-level elements into a
queue; and clicking the elements one by one according to a depth-first strategy, analyzing the new pages, obtaining the new elements and adding the new elements into the
queue until all the pages are traversed. According to the automatic package capturing method for an
Android application, the accuracy and timeliness of test work are greatly improved.