当前位置:网站首页>Appium automation test foundation - Supplement: app package name and appactivity
Appium automation test foundation - Supplement: app package name and appactivity
2022-06-28 02:10:00 【Test - Eight Precepts】
1、 Package name
Package name (appPackage) stay Android In the system, it is a judgment App Unique identification of , Different App Can have the same name , But its package name cannot be the same .
For example, I can compile and generate a App Also called “ WeChat ”, But I App The package name of cannot be com.tencent.mm( Wechat package name ), If the package name I specified is consistent with wechat , Then only these two can be installed on a mobile phone App One of them .
- Speaking of this, many people will have questions , As like as two peas, WeChat will be the same as anyone who has done the same thing. App, The name and package name are the same as wechat , How can I tell ?
Android In order to prevent this , Also made a thing called signature , Generally, we don't have a wechat signature , So it can be identified by signature App Whose is it , If you are interested, you can learn about the signature , I won't go into that here .
Here are several ways to view package names :
(1) Look at the source code
Usually we test App All from their own companies App, So when the source code , We can easily know its package name .
Find... In the project directory “AndroidManifest.xml” The file of ( Is the configuration file in the project ), After opening , Here's the picture :

So that we can find package This item can be viewed .
(2) View mobile system settings
Let me introduce Google native system here , Some other millet 、 Meizu and other customized systems also have similar viewing methods .
Operation steps :“ Set up ” -> “ application ” -> “ Running ”( This step needs attention )-> Select the app you want to view .
This time you can see , Here's the picture :

(3) see /data/data/ Catalog
When we install an app , The system will be in /data/data/ Create a directory under the directory , And the file name is the package name of the current application , Let's take a look at the files in this directory on the mobile phone :

If you know what you want to see App A keyword in the package name , It will find the package name of your application faster , Otherwise, it is recommended to use other methods . This method requires root.
(4)GT Software
GT The interface comes with this function , Download from app GT, Then select an application under test , You can see , Here's the picture :

2、 Start name
Start name (appActivity) It can also be called the startup page .
In a nutshell appActivity Refers to App The page we see in , A page is a appActivity, Usually the page that starts on the first page is called “ Startup page ”.
We're doing automated testing , Usually the first step is to start the application under test , And the way to start is to use “ Package name / Startup page ”, Therefore, we usually need to know this in the process of testing appActivity The name of .
Let me introduce several ways to view the startup page appActivity Methods .
(1) Look at the source code
Similarly, in the source code, we can directly find the start page Activity The name of . Here you need to find the project directory AndroidManifest.xml Configuration files , The file contains category The value of is android.intent.category.LAUNCHER” Of appActivity That's what we're looking for :

When we know the startup page appActivity after , You can enter the command directly :adb shell am start com.bryan.testbattery/com.bryan.testbattery.activity.MainActivity
Pull up the application .
(2)Logcat
close App, open Logcat, Then start your App, Look carefully at this time log journal , commonly tag by ActivityManager I'll record such a paragraph log, And here is the start page appActivity, Here's the picture :

(3)dump package Package name
After using the command to view , The same is to find that contains category.LAUNCHER Wording appActivity that will do .

(4)Monkey
Monkey You can set the detail level of the log , When we specify -VVV When , And specify the simulated random event as once , You can view it :

a key : Supporting learning materials and video teaching
So here I have carefully prepared the detailed information of the above outline in The link below is as follows


边栏推荐
- LMSOC:一种对社会敏感的预训练方法
- Modular development
- Supervised, unsupervised and semi supervised learning
- pytorch_lightning.utilities.exceptions.MisconfigurationException: You requested GPUs: [1] But...
- The research group of Xuyong and duanwenhui of Tsinghua University has developed an efficient and accurate first principles electronic structure deep learning method and program
- TIA botu_ Concrete method of making analog input and output Global Library Based on SCL language
- 数据库的新选择 Amazon Aurora
- 引用层reboot后的大体流程
- 利用redis bitmap实现人员在线情况监控
- Numpy----np. meshgrid()
猜你喜欢

Chapitre 4: redis

Numpy----np.reshape()

数据库查询优化:主从读写分离及常见问题

TIA botu_ Concrete method of making analog input and output Global Library Based on SCL language

Intranet penetration with FRP

Review of drug discovery-02-prediction of molecular properties

Machine learning notes - time series as features

How to understand query, key and value in transformer

Jenkins - Groovy Postbuild 插件丰富 Build History 信息

树莓派实现温控风扇智能降温
随机推荐
Numpy----np. Tile() function parsing
Ten MySQL locks, one article will give you full analysis
The practice of dual process guard and keeping alive in IM instant messaging development
Adobe Premiere Basics - general operations for editing material files (offline files, replacing materials, material labels and grouping, material enabling, convenient adjustment of opacity, project pa
How to understand query, key and value in transformer
Intranet penetration with FRP
LMSOC:一种对社会敏感的预训练方法
Drug interaction prediction based on learning size adaptive molecular substructure
[embedded foundation] memory (cache, ram, ROM, flash)
Arrays. Aslist() pit
Ten thousand words long article understanding business intelligence (BI) | recommended collection
Numpy----np.meshgrid()
对比学习中的4种经典训练模式
General process after reference layer reboot
类的初始化与回调的用法
评价——秩和比综合评价
Appium自动化测试基础 — ADB常用命令(一)
PV操作原语
TD Hero 线上发布会|7月2日邀你来
mysql面试百题集