整理吧-Android测试
来源:互联网 发布:疯狂java讲义百度云 编辑:程序博客网 时间:2024/06/05 17:04
1. adb logcat
a. priority(优先级别)
i. V — 明细 (最低优先级)
ii. D — 调试
iii. I — 信息
iv. W — 警告
v. E — 错误
vi. F — 严重错误
vii. S — 无记载 (最高优先级, 在这个级别上不会打印任何信息
2. adb install
3. adb push
4. adb pull
5. 获取包名的方式
a. adb shell dumpsys window w | findstr \/ | findstr name=
b. appt dump bedging your-path -to-apk
PS:http://blog.csdn.net/jane1229/article/details/39937015
6. 无线调试
a. adb tcpip 5555
b. adb connect 192.168.203.238
7. 赋予包所需权限
a. adb shell pm grant com.guoying.smscode android.permission.READ_SMS
b. aapt d permissions /your-path/app-debug.apk
8. 清除数据
adb shell pm clear package-name
9. 端口被占用时的解决方法
a. windows:
i. netstat -ano | findstr "5037"
ii. kill -9 pid
b. mac:
i. lsof -i:5037
ii. kill -9 pid
10. 截图
a. adb shell screencap /sdcard/a.png
11. 录视频
a. adb shell screenrecord /sdcard/demo.mp4
PS:https://developer.android.com/studio/command-line/adb.html?hl=zh-cn
2、monkey 命令行
基本参数https://developer.android.com/studio/test/monkey.html
3、appium Android
1. 环境搭建
2. Appium-doctor
3. 获取h5 元素
4. Uiautomatorviewer获取原生元素
5. PS:
https://anikikun.gitbooks.io/appium-girls-tutorial/content/2_install_appium.html
https://github.com/appium/sample-code
4、Charles安装配置
1. 安装配置
a. http://zhangmingwei.iteye.com/blog/2035602
2. 限制网络
a. ios自带限制网路:http://www.jianshu.com/p/6949c2ecb401
5、番外篇
1. CPU 的查看
a. http://blog.csdn.net/kittyboy0001/article/details/38562515
2. 内存的查看
a. https://my.oschina.net/shaorongjie/blog/128442
3. 启动时间的查看
a. adb shell am start -W -n your-pakcage-name/your-activity-name(需要root)
b. 开发在程序里插log,adb logcat里看log
c. 拿计时器,自己记时间
阅读全文
0 0
- 整理吧-Android测试
- Android测试基础整理篇
- android 单元测试之dialog测试链接整理
- Android APP专项测试整理-启动速度
- Android 性能测试相关文章整理
- 测试整理
- Android开发者参加Android开发培训初级测试题整理
- [整理]Android测试日志文件抓取与分析
- Android InstrumentationTestRunner 链接整理(白盒测试)
- [整理]Android测试日志文件抓取与分析
- android app自动化测试框架Appium资料整理
- android 手机app应用压力测试整理(一)
- Android APP专项测试整理-电量(使用batterystats)
- Android APP专项测试整理-流量(net)
- Android APP专项测试整理-内存及cpu
- Android 测试CTS,GTS目录及脚本整理
- 博客测试功能整理
- 测试相关工具整理
- 深入理解Python中的字符编码、文件处理和函数
- vector
- Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
- html设置图像与文字的对齐方式
- .NET 类库研究必备参考 添加微软企业库源码
- 整理吧-Android测试
- 删除链表的中间节点
- jvm Local Variables ,Operand Stacks
- Qt下载地址
- MyEclipse初次使用的配置步骤
- html为图像添加提示文字
- map
- eclipse-web.xml is missing and <failOnMissingWebXml> is set to true问题处理
- 泛型边界控制Class<? extends Object>