当前位置:网站首页>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 |
边栏推荐
猜你喜欢
![[JS] - [DFS, BFS application] - learning notes](/img/77/6f8d4ebe1d0b3ba036aea9358de793.png)
[JS] - [DFS, BFS application] - learning notes

Eslint syntax monitoring off

Airflow2.1.1 ultra detailed installation document

Soft test -- software designer -- database design of afternoon questions

SQL analysis (query interception analysis for SQL optimization)

A single node obtains the lock lock of the order number

Jacobian matrix J commonly used in slam

Unity-UI-shadow组件

Flex layout

sql分析(查询截取分析做sql优化)
随机推荐
ROS 笔记(08)— 服务数据的定义与使用
flex布局
sql分析(查询截取分析做sql优化)
LeetCode之三步问题
HJ score ranking
Jacobian matrix J commonly used in slam
【js】-【节流、防抖函数】
Airflow2.1.1 ultra detailed installation document
Idea package together, using compact middle packages to solve &
Conversion between HJ integer and IP address
HJ21 简单密码
Introduction to Devops Basics
【js】-【DFS、BFS应用】-学习笔记
Jenkins' common build trigger and hook services (V)
Redis one master multi slave cluster setup
图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换
Co process, asyncio, asynchronous programming
Install haproxy
Section 8: DMA of zynq
HJ整数与IP地址间的转换