zoukankan      html  css  js  c++  java
  • 安卓APP性能测试的一些方面

    1. 启动速度

    测试方法:

    1)录屏:(准确率高)

    前提:杀掉应用进程,有必要时重启手机;没有开屏广告

    工具:高速相机/手机,调整拍摄帧率为120~240帧/s

    分析软件:Avidemux

    起点:手指离开屏幕的前一帧;终点:界面占满屏幕/界面元素开始显示的第一帧

    #自动化:机械手操作

    影响因素:手机配置(高配/中配/低配)

    2)读取回调:(不依赖手工)

    应用开始启动,启动完成,代码分别写一个广播,使用脚本抓取回调,确认启动及完成时间

    2. 点击/滑动等事件响应速度

    点击响应速度:参照“启动速度”

    打开二级页面响应速度,二级页面包括普通页面及纯图片网页

    滑动事件:

    滑动事件分为慢滑和快滑,滑动速率使用机械手能够较为精准的控制

    起点:手指接触屏幕并开始滑动的第一帧;终点:界面开始响应的第一帧

    影响因素:机型/机器配置/手机内存占用多少都会有较大影响

    3. 下载速度

    4. 界面流畅程度,比较帧率

    adb shell dumpsys gfxinfo < PACKAGE_NAME > framestats

    D:AndroidSdkplatform-toolssystrace>python systrace.py --time=10 -o mynewtrace.html sched gfx view wm am webview -a <appname>

    5. 耗电量测试

    powermonitor

    6. 流量测试

    7. 内存泄漏

    adb shell dumpsys meminfo 包名

    使用Monitors或者DDMS

    8. CPU

    adb shell dumpsys cpuinfo 包名

    9. Monkey

    adb -s FJH5T18702020515 shell monkey -p com.android.browser  --throttle 500 --pct-touch 43 --pct-motion 23 --pct-pinchzoom 5 --pct-appswitch 5 --pct-syskeys 5 --pct-nav 1 --pct-flip 1 --pct-anyevent 17 --monitor-native-crashes --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --kill-process-after-error --bugreport -v -v -v 999999999 >C: ovaB.txt

    Monkey跑出anr后抓取trace:adb pull /data/anr/traces.txt D:123

    10. MTBF

    11. 压力测试?

    12. Javascript 性能:

    1. JetStream: http://browserbench.org/JetStream/
    2. sunspider-越低越好: https://webkit.org/perf/sunspider/sunspider.html

    13. HTML5 HTML5Test https://html5test.com

    14. CSS3 CSS3test https://css3test.com

    15. 图形性能:

    1. MotionMark-越高越好 https://browserbench.org/MotionMark1.1/
    2. WebGL Aquarium 3D-越高越好 https://webglsamples.org/aquarium/aquarium.html
  • 相关阅读:
    NDOC中文支持及入门用法
    网页代码常用小技巧
    SOCKET通讯点滴
    自动备份程序目录
    MySql.Data.dll Microsoft.Web.UI.WebControls.dll下载
    c#:获取IE地址栏中的URL
    比较好的单例登录模式(参考网友)
    FreeTextBox使用详解
    2005自定义控件显示基准线
    连接字符串大全
  • 原文地址:https://www.cnblogs.com/Q10B/p/9397668.html
Copyright © 2011-2022 走看看