当前位置:网站首页>App automated testing appium tutorial 2 - ADB command
App automated testing appium tutorial 2 - ADB command
2022-06-28 08:07:00 【zhizhi0920】
adb command
Teaching video reference b Station courses , This article is a learning record
( Free wool , It's time to collect , Bobbins ~)
Zero foundation entry mobile automation test ——Appium Frame video ( Black horse programmer ) Broadcast address
ADB brief introduction
- Introduce
ADB:android debug bridge, Is a debugging tool , Developers need to master ,
Testers do Android application testing , Need to use - Composition and working principle
- Client End : client , Running on the development computer , send out adb command
- Daemon Daemon : Running in debugging equipment , Mobile phone or Simulator , Used to receive and execute adb command
- Server End : The server , Running on the development computer , Used to manage Client End sum Daemon Communication between

Get the package name and interface name
Tell the computer which application and which interface to open , A parameter that must be used to write code
Package name ( package): Determine the uniqueness of the program ( Not the name of the application )
Interface name (activity)( Start name ): An interface name , Corresponding to an interface
cmd Enter the command :adb shell dumpsys window | findstr mCurrentFocus
Example :
- Open in the simulator or mobile phone “ Set up ” Program
- Enter the command of the corresponding platform
result :
cmd Enter the command :mCurrentFocus=Window{fe389cf u0 com.android.settings( Package name )/com.android.settings.homepage.SettingsHomepageActivity( Interface name )}
File transfer
- Send files to your phone
adb push Computer file path Folder path of mobile phone
Example :
cmd Enter the command :adb push C:\Users\zhizhi\Desktop\a.txt /sdcard
- Pull files from your phone
adb push File path of mobile phone The folder path of the computer
Example :
cmd Enter the command :adb pull /sdcard/a.txt C:\Users\zhizhi\Desktop
obtain app Starting time
cmd Enter the command :adb shell am start -W Package name / Start name
cmd Enter the command :adb shell am start -W com.android.settings/.Settings
Get three values : Milliseconds
- ThisTime: The interface (activity) Time to start
- TotalTime: It takes time to start the application itself =ThisTime+ application application And so on
- WaitTime: It takes time for the system to start the application =TotalTime+ System resource start time

Get phone logs 【 application 】
When a crash occurs , Log information can be sent to developers , Easy for quick positioning bug
Handle : You need to find the... In the log at Signature , The first character is E The error message is
Use steps :
- Open the application to be tested
- Find the trigger bug The location of
- Use the view log command
cmd Enter the command :adb logcat
- Trigger bug
- Get log information

other adb command
| Serial number | command | explain |
|---|---|---|
| 01 | adb install route /xx.apk | install app To mobile phone |
| 02 | adb uninstall Package name | Uninstall the app, You need to specify a package name |
| 03 | adb devices | Get the connected device and corresponding device number of the current computer |
| 04 | adb shell | Go to the inside of Android phone linux In the system command line |
| 05 | adb start-server | start-up adb Server side , Out bug You can restart the server when using , Turn off and then start |
| 06 | adb kill-server | close adb Server side , Out bug You can restart the server when using , Turn off and then start |
| 07 | adb --help | see adb help , When you can't remember the command clearly, you can use |
边栏推荐
- Study notes 22/1/18
- Ambari (VI) -- ambari API use
- HJ prime factor
- asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
- Activity隐式跳转
- Kubernetes cluster command line tool kubectl
- Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
- 22/02/15 study notes
- Section 5: zynq interrupt
- 券商注册开户靠谱吗?安全吗?
猜你喜欢

NLP sequence can completely simulate human brain intelligence

Redis cluster deployment and application scenarios

图像翻译:UVCGAN: UNET VISION TRANSFORMER CYCLE-CONSISTENT GAN FOR UNPAIRED IMAGE-TO-IMAGE TRANSLATION

你了解TCP協議嗎(二)?

Jacobian matrix J commonly used in slam

ROS 笔记(09)— 参数的查询和设置

Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)

SOC timer and interrupt configuration

三角变换公式

Prometheus deployment alarm docking QQ mailbox
随机推荐
At 19:00 on Tuesday evening, the 8th live broadcast of battle code Pioneer - how to participate in openharmony's open source contribution in multiple directions
Update pip to the latest version
nlp序列完全可以模拟人脑智能
[JS] - [throttling and anti shake function]
Dataset filling data, and the use of rows and columns
Estimation of SQL execution cost by MySQL query optimizer
软件测试与质量期末复习
Three step problem of leetcode
Is it reliable to open a new bond registration account? Is it safe?
SLAM中常用的雅克比矩阵J
Configuring multiple instances of MySQL under Linux
ROS 笔记(08)— 服务数据的定义与使用
Prometheus monitoring (I)
同花顺注册开户靠谱吗?安全吗?
Porting ucosiii to stm32f429
Introduction to kubernetes (I)
HJ整数与IP地址间的转换
Prometheus deployment alarm docking QQ mailbox
Introduction to Devops Basics
图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换