当前位置:网站首页>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 |
边栏推荐
- Idea package together, using compact middle packages to solve &
- SQL Master slave Replication Build
- asp. Net datalist to display product information and pictures
- Study notes 22/1/17
- Upgrade HDP spark to spark 2.4.8 without upgrading ambari
- asp. Net upload image path and image name
- 十大券商注册开户靠谱吗?安全吗?
- 图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换
- asp. Net to search products and realize paging function
- Section VI UART of zynq
猜你喜欢
![[JS] - [DFS, BFS application] - learning notes](/img/77/6f8d4ebe1d0b3ba036aea9358de793.png)
[JS] - [DFS, BFS application] - learning notes

SOC timer and interrupt configuration

Software testing and quality final review

ROS 笔记(08)— 服务数据的定义与使用

Do you know TCP protocol (1)?

Section 8: DMA of zynq

Airflow2 configuration windows azure SSO details based on oauth2 protocol

GPIO configuration of SOC

asp. Net datalist to display product information and pictures

Redis implements distributed locks
随机推荐
Kubernetes理论基础
HJ整数与IP地址间的转换
Image translation /transformer:ittr: unpaired image to image translation with transformers
A single node obtains the lock lock of the order number
Estimation of SQL execution cost by MySQL query optimizer
Ambari (V) ---ambari integrated Azkaban (valid for personal test)
HJ base conversion
HJ explicit random number
Connaissez - vous le protocole TCP (2)?
Activity隐式跳转
LeetCode之三步问题
HJ score ranking
asp. Net datalist when there are multiple data displays
打新债注册开户靠谱吗?安全吗?
Buffer pool in MySQL
Idea package together, using compact middle packages to solve &
Es data export CSV file
ROS 笔记(08)— 服务数据的定义与使用
Unity 获取当前物体正前方,一定角度、距离的坐标点
Introduction to kubernetes (I)