当前位置:网站首页>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 |
边栏推荐
- Cloud native: cloud computing technology is upgraded again to open an era of comprehensive cloud development
- Is it reliable for securities companies to register and open accounts? Is it safe?
- How to insert a single quotation mark into a table as a data type in Oracle pl/sql
- Study notes 22/1/19 and 22/1/20
- Kubernetes theoretical basis
- Kubernetes理论基础
- MySQL row format parsing
- 【js】-【DFS、BFS应用】-学习笔记
- ROS notes (09) - query and setting of parameters
- 【js】-【节流、防抖函数】
猜你喜欢

三角变换公式

Redis one master multi slave cluster setup

Jacobian matrix J commonly used in slam

Configuring multiple instances of MySQL under Linux

Hash slot of rediscluster cluster cluster implementation principle

SQL master-slave replication setup

城联优品向英德捐赠抗洪救灾爱心物资

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

Doris学习笔记之介绍、编译安装与部署

MySQL two table connection principle (understand join buf)
随机推荐
The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition
图像翻译:UVCGAN: UNET VISION TRANSFORMER CYCLE-CONSISTENT GAN FOR UNPAIRED IMAGE-TO-IMAGE TRANSLATION
Update pip to the latest version
Study notes 22/1/18
Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
ACM notes
Explanation and application of instr() function in Oracle
Study notes 22/1/11
asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
Unity UI shadow component
Helloword routine for ROS
A single node obtains the lock lock of the order number
Redis cluster deployment and application scenarios
MySQL implements transaction persistence using redo logs
Eslint syntax monitoring off
[JS] - [throttling and anti shake function]
Is it reliable to open a new bond registration account? Is it safe?
Soft exam -- software designer -- afternoon question data flow diagram DFD
kubernetes集群命令行工具kubectl
HJ character count