CN113360373A - Test method for full traversal of Activity page of mobile application - Google Patents

Test method for full traversal of Activity page of mobile application Download PDF

Info

Publication number
CN113360373A
CN113360373A CN202110575758.8A CN202110575758A CN113360373A CN 113360373 A CN113360373 A CN 113360373A CN 202110575758 A CN202110575758 A CN 202110575758A CN 113360373 A CN113360373 A CN 113360373A
Authority
CN
China
Prior art keywords
component
exported
authority
page
android
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
CN202110575758.8A
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.)
Shanghai Manxi Technology Co ltd
Original Assignee
Shanghai Manxi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Manxi Technology Co ltd filed Critical Shanghai Manxi Technology Co ltd
Priority to CN202110575758.8A priority Critical patent/CN113360373A/en
Publication of CN113360373A publication Critical patent/CN113360373A/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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses a method for testing full traversal of an Activity page of a mobile application, which comprises the following steps: s1, obtaining a sample to be analyzed; s2, mounting on the target machine; s3, acquiring and storing the name attribute value of android in activity nodes by analyzing the android Man i fet. xml configuration files in the samples, acquiring the exported value of android, and judging whether the components are exported; s4, for the component of which the exported component is "true", the component can be directly started by an am start packageName/activityName command by using the common authority; s5, for the component that is not exported, the component can still be started in step S4 on the machine with API ═ 19, and for the machine with API >19, the component can be directly started by am start PackageName/ActivityName command under the corresponding authority; s6, through the steps S4 and S5, the components analyzed in the step S3 are traversed, and the page can be completely traversed. The method provided by the invention aims at the mobile APP automatic test to perform full-page traversal: high compatibility and high reusability.

Description

Test method for full traversal of Activity page of mobile application
Technical Field
The invention relates to the technical field of information security and mobile security application, in particular to a method for testing full traversal of an Activity page of a mobile application.
Background
With the development of science and technology, a large number of mobile APP are put into the market and widely applied to various fields of social life. In the field of software testing of mobile APP, how to avoid tedious repeated labor, so as to save time and reduce cost becomes a big problem faced by enterprise research and development, an automatic testing technology can effectively improve software testing efficiency and accelerate software development and version iteration, and in the existing mobile application testing, the interface testing of the application has two expression forms, namely, firstly, a script program is written to enable the script program to execute page operation according to a specified sequence, so that the purpose of testing a certain path is achieved. Secondly, some open source testing tools such as monkey are utilized, the tools have the characteristics that the tools do not depend on interfaces excessively like scripts, can run in any application or even across applications, and carry out random click on pages in main operation, so that the compatibility is high and the reusability is strong. However, since the testing tool randomly clicks in the interface, the accuracy and coverage are difficult to be guaranteed, and therefore a full traversal testing technology capable of traversing the Activity page of the mobile application is needed.
Disclosure of Invention
The invention aims to provide a method for testing full traversal of an Activity page of a mobile application, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a test method for full traversal of an Activity page of a mobile application comprises the following steps:
s1, obtaining a sample to be analyzed;
s2, mounting on the target machine;
s3, acquiring and storing the name attribute value of android in activity nodes by analyzing the android Manifest xml configuration file in the sample, acquiring the exported value of android, and judging whether the component is exported;
s4, for the component of which the exported component is "true", the component can be directly started by an am start packageName/activityName command by using the common authority;
s5, for the component that is not exported, the component can still be started in step S4 on the machine with API ═ 19, and for the machine with API >19, the component can be directly started by am start PackageName/ActivityName command under the corresponding authority;
s6, through the steps S4 and S5, the components analyzed in the step S3 are traversed, and the page can be completely traversed.
Preferably, the general authority in step S4 is hell (uid ═ 2000) authority or user authority (uid > 2000).
Preferably, the corresponding authority in step S5 is root (uid equals 0) or system (uid equals 1000) authority.
Compared with the prior art, the invention has the beneficial effects that:
the method provided by the invention aims at the mobile APP automatic test to perform full-page traversal: the compatibility is high, the reusability is strong, and full-page traversal can be performed on all mobile applications; traversing the activity pages which are not exported; the activity page traversal can be performed fully automatically.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Referring to fig. 1, the present invention provides a technical solution: a test method for full traversal of an Activity page of a mobile application comprises the following steps:
s1, obtaining a sample to be analyzed;
and S2, mounting the target machine.
And S3, acquiring and storing the attribute values of android and name in the activity node by analyzing the android Manifest xml configuration file in the sample, acquiring the attribute values of android and exported, and judging whether the component is exported or not.
S4, for the component with exported component, i.e. android, exported or "true", the component can be directly started by am start packageaname/ActivityName command using the common authority, i.e. shell (uid 2000) authority or user authority (uid > 2000).
S5, for un-exported components, the components can still be started through step four on the machine with API ═ 19, and for the machine with API >19, the components can be directly started through am start PackageName/ActivityName command under root (uid ═ 0) and system (uid ═ 1000) authority
S6, through the steps S4 and S5, the components analyzed in the step S3 are traversed, and the page can be completely traversed.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (3)

1. A test method for full traversal of an Activity page of a mobile application is characterized by comprising the following steps:
s1, obtaining a sample to be analyzed;
s2, mounting on the target machine;
s3, acquiring and storing the name attribute value of android in activity nodes by analyzing the android Manifest xml configuration file in the sample, acquiring the exported value of android, and judging whether the component is exported;
s4, for the component of which the exported component is "true", the component can be directly started by an am start packageName/activityName command by using the common authority;
s5, for the component that is not exported, the component can still be started in step S4 on the machine with API ═ 19, and for the machine with API >19, the component can be directly started by am start PackageName/ActivityName command under the corresponding authority;
s6, through the steps S4 and S5, the components analyzed in the step S3 are traversed, and the page can be completely traversed.
2. The method for testing full traversal of an Activity page of a mobile application according to claim 1, wherein: the normal authority in step S4 is hell (uid ═ 2000) authority or user authority (uid > 2000).
3. The method for testing full traversal of an Activity page of a mobile application according to claim 1, wherein: the corresponding authority in step S5 is root (uid ═ 0) or system (uid ═ 1000) authority.
CN202110575758.8A 2021-05-26 2021-05-26 Test method for full traversal of Activity page of mobile application Pending CN113360373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110575758.8A CN113360373A (en) 2021-05-26 2021-05-26 Test method for full traversal of Activity page of mobile application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110575758.8A CN113360373A (en) 2021-05-26 2021-05-26 Test method for full traversal of Activity page of mobile application

Publications (1)

Publication Number Publication Date
CN113360373A true CN113360373A (en) 2021-09-07

Family

ID=77527597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110575758.8A Pending CN113360373A (en) 2021-05-26 2021-05-26 Test method for full traversal of Activity page of mobile application

Country Status (1)

Country Link
CN (1) CN113360373A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120107193A (en) * 2011-03-21 2012-10-02 엔에이치엔비즈니스플랫폼 주식회사 System and method for executing test with respect to web service automatically based on keyword
CN105740144A (en) * 2016-01-27 2016-07-06 浪潮(北京)电子信息产业有限公司 Automated testing method and system for Android mobile Terminal
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal
CN108090355A (en) * 2017-11-28 2018-05-29 西安交通大学 A kind of APK automatic triggers instrument
CN112560090A (en) * 2020-12-15 2021-03-26 建信金融科技有限责任公司 Data detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120107193A (en) * 2011-03-21 2012-10-02 엔에이치엔비즈니스플랫폼 주식회사 System and method for executing test with respect to web service automatically based on keyword
CN105740144A (en) * 2016-01-27 2016-07-06 浪潮(北京)电子信息产业有限公司 Automated testing method and system for Android mobile Terminal
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal
CN108090355A (en) * 2017-11-28 2018-05-29 西安交通大学 A kind of APK automatic triggers instrument
CN112560090A (en) * 2020-12-15 2021-03-26 建信金融科技有限责任公司 Data detection method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WEIXIN_39673051: "android默认exported_AndroidManifest.xml文件中exported属性解析", 《CSDN HTTPS://BLOG.CSDN.NET/WEIXIN_39673051/ARTICLE/DETAILS/111517625》 *

Similar Documents

Publication Publication Date Title
US9274923B2 (en) System and method for stack crawl testing and caching
US8286149B2 (en) Apparatus for and method of implementing feedback directed dependency analysis of software applications
CN110008113B (en) Test method and device and electronic equipment
US7900198B2 (en) Method and system for parameter profile compiling
US10133871B1 (en) Method and system for identifying functional attributes that change the intended operation of a compiled binary extracted from a target system
CN103186463B (en) Determine the method and system of the test specification of software
US9116714B2 (en) Methods and systems for file processing
WO2015003452A1 (en) Methods and systems for file processing
CN115357898A (en) Dependency analysis method, device and medium for JAVA component
CN109063040B (en) Client program data acquisition method and system
CN107038117B (en) Web automatic testing method based on definition-reference between event processing functions
CN111221721A (en) Automatic recording and executing method and device for unit test cases
CN112631704A (en) Interface element identification method and device, storage medium and electronic equipment
Wang et al. Fast reproducing web application errors
CN116841543A (en) Development method for dynamically generating cross-platform multi-terminal application based on Flutter
US20220334955A1 (en) Automated unit testing in a mainframe cics environment
CN112861138A (en) Software security analysis method and analysis device, electronic device, and storage medium
CN116578282A (en) Code generation method, device, electronic equipment and medium
CN113360373A (en) Test method for full traversal of Activity page of mobile application
CN108121658B (en) Method for testing LINUX end tested software based on WINDOWS end testing tool
CN115407997A (en) Agile development application method and system based on low codes
CN113220586A (en) Automatic interface pressure test execution method, device and system
US9032372B2 (en) Runtime environment and method for non-invasive monitoring of software applications
CN113031964A (en) Management method, device, equipment and storage medium for big data application
CN109857636A (en) A kind of methods and applications positioning App homepage in Android client UI automation process

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210907