美文网首页
APP Crash事件测试monkey

APP Crash事件测试monkey

作者: iTsung | 来源:发表于2016-09-13 13:49 被阅读0次

         中午组长给我发了一个预发版本,让用monkey测试记录一下crash的log,之前没有用过,上网搜了一下

    先在手机设备或者模拟器 ,执行adb install Test.apk安装app

    主要命令:

    adb shell monkey -p com.xxxx.xxx(包名)  -v 1000(1000个events)

    第一次提示没有activity on running,其实只需要把包名改成主包名(manifest中的那个包名)就可以。

    一般程序被某些事件触发发生crash之后,继续的event就不能触发程序了,所以有如下命令,可以在app crash之后,依然执行命令进行点击

    adb shell monkey -p com.xxxx.xxx(包名) –ignore-crashes 1000

    另外在次数较大时候,log会形成覆盖,为了便于记录,可以将 log写入txt文件中,命令如下:

    adb shell monkey -p com.xxxx.xxx(包名) –ignore-crashes 1000 > D:\monkeyTest.txt

    更完整的命令,包含崩溃忽略,事件类型百分比设置

    adb shell monkey -p com.xxxx.xxx(包名) --ignore-crashes  --ignore-security-exception --ignore-timeouts --monitor-native-crashes --pct-touch 80 --pct-majornav 20 -v -v 10000 > D:\monkeyTest.txt

    还有一些命令,比如触摸,点击,导航事件所占的百分比等等,详细见

    Android命令Monkey压力测试,详解

    相关文章

      网友评论

          本文标题:APP Crash事件测试monkey

          本文链接:https://www.haomeiwen.com/subject/wvumettx.html