Contents: Guide
-
- foreword
- 1. From entry to mastery of Python programming
- 2. Interface automation project actual combat
- 3. Actual Combat of Web Automation Project
- 4. Actual Combat of App Automation Project
- 5. Resume of first-tier manufacturers
- 6. Test and develop DevOps system
- 7. Commonly used automated testing tools
- Eight, JMeter performance test
- 9. Summary (little surprise at the end)
foreword
adb simulates key input commands
grammatical format
input [<source>] <command> [<arg>...]
physical key
# 电源键
adb shell input keyevent 26
# 菜单键
adb shell input keyevent 82
# HOME 键
adb shell input keyevent 3
# 返回键
adb shell input keyevent 4
# 音量+
adb shell input keyevent 24
# 音量-
adb shell input keyevent 25
# 静音
adb shell input keyevent 164
media control
# 播放/暂停
adb shell input keyevent 85
# 停止播放
adb shell input keyevent 86
# 播放下一首
adb shell input keyevent 87
# 播放上一首
adb shell input keyevent 88
# 恢复播放
adb shell input keyevent 126
# 暂停播放
adb shell input keyevent 127
Turn on/off the screen
# 点亮屏幕
adb shell input keyevent 224
# 熄灭屏幕
adb shell input keyevent 223
触击屏幕
# x,y为坐标位置
adb shell input tap <X> <Y>
Sliding screen
Four parameters: start point x coordinate start point y coordinate end point x coordinate end point y coordinate
# 向上滑动
adb shell input swipe 300 1000 300 500
# 向下滑动
adb shell input swipe 300 100 300 1000
# 向左滑动
adb shell input swipe 1000 500 200 500
# 向右滑动
adb shell input swipe 200 500 1000 500
adb other functions and commands
Screenshots:
adb exec-out screencap -p > sc.pn
The screenshot is saved to the directory where the command is executed on the computer.
If the specified file name ends with .png, the -p parameter can be omitted.
Note: If the adb version is older and the exec-out command cannot be used, it is recommended to update the adb version
It can also be done with the following steps
# 先截图保存到设备里
adb shell screencap -p /sdcard/sc.png
# 然后将 png 文件导出到电脑
adb pull /sdcard/sc.png
record screen
# 录制屏幕以 mp4 格式保存到 /sdcard
adb shell screenrecord /sdcard/filename.mp4
# 导出到电脑
adb pull /sdcard/filename.mp4
需要停止时按 Ctrl-C,默认录制时间和最长录制时间都是 180 秒
view wifi password
adb shell cat /data/misc/wifi/*.conf
Delete the system default APP
Find the package name to be deleted
adb shell pm list packages -s
Get the address of the package name
adb shell pm path 包名
For example: adb shell pm path com.seewo.rainbow.pro
Get root privileges
adb root adb remount
Mount system read and write permissions
adb shell rm 包名地址
delete package
adb shell rm -r /data/app/com.seewo.rainbow.pro-1
reboot
adb reboot
The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled |
1. From entry to mastery of Python programming
2. Interface automation project actual combat
3. Actual Combat of Web Automation Project
4. Actual Combat of App Automation Project
5. Resume of first-tier manufacturers
6. Test and develop DevOps system
7. Commonly used automated testing tools
Eight, JMeter performance test
9. Summary (little surprise at the end)
Work hard, and only with unremitting efforts can we paint a brilliant chapter in life. No matter how many difficulties and challenges you encounter, you must go forward bravely, believe in your own abilities, and never stop chasing your dreams. Every effort is a precious opportunity to be one step closer to success.
Years are like tides, and time flies. Only by unremitting struggle can we surpass ourselves; we can achieve great things by bravely facing challenges and having dreams in mind. May you move forward firmly every step of the way and write a wonderful life!
Only with unremitting and indomitable efforts can we create our own brilliant life, not be afraid of difficulties, pursue our dreams, and let every struggle lighten the way forward and achieve the splendor of the future.