android 稳定性测试工具,Android 稳定性测试工具 Monkey(4) - 分析测试结果

通过一系列参数和事件的了解,我们也看到了用 monkey 进行稳定性测试其实很简单。但是经过 monkey 测试后,要如何去分析测试的结果呢?怎么才知道应用是否稳定?

要获取 monkey 的执行结果,最好的方式是分析 monkey 执行过程中产生的日志。

获取 monkey 日志

要获取 monkey 日志的话,通过重定向命令即可。

示例:

adb shell monkey -p com.huomaotv.mobile --pct-appswitch 20

--pct-rotation 20 --pct-touch 30 --pct-motion 20

--ignore-crashes --ignore-timeouts --monitor-native-crashes 10000 > d:/monkey.log

在命令的最后,加上>重定向到本地文件。d:/monkey.log放在 d 盘的根目录。

分析日志

那么对于 monkey 跑完之后,我们要如何去确认有没有出现 bug 呢?

最直观简单的方式就是通过搜索以下关键字:

程序无响应的情况:搜索关键字ANR in

崩溃的情况1:搜索关键字CRASH

崩溃的情况2:搜索关键字Exception

如下,为一个 Crash 的例子:

procrank:

// CRASH: com.huomaotv.mobile (pid 3071)

// Short Msg: Native crash

// Long Msg: Native crash: Aborted

// Build Label: Android/vbox86p/vbox86p:6.0/MRA58K/91:userdebug/test-keys

// Build Changelist: 91

// Build Time: 1526948635000

// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

// Build fingerprint: 'Android/vbox86p/vbox86p:6.0/MRA58K/91:userdebug/test-keys'

// Revision: '0'

// ABI: 'x86'

// pid: 3071, tid: 3193, name: RenderThread >>> com.huomaotv.mobile <<<

// signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

// Abort message: 'Encountered EGL error 12291 EGL_BAD_ALLOC during rendering'

// eax 00000000 ebx 00000bff ecx 00000c79 edx 00000006

// esi dbb3f980 edi 00000004

// xcs 00000023 xds 0000002b xes 0000002b xfs 00000107 xss 0000002b

// eip f73196c6 ebp 00000c79 esp dbb3f150 flags 00200206

// backtrace:

// #00 pc 000836c6 /system/lib/libc.so (tgkill+22)

// #01 pc 00081728 /system/lib/libc.so (pthread_kill+70)

// #02 pc 00027255 /system/lib/libc.so (raise+36)

// #03 pc 00020a34 /system/lib/libc.so (abort+80)

// #04 pc 0000cbd3 /system/lib/libcutils.so (__android_log_assert+128)

// #05 pc 00023759 /sys

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值