Monkey log分析说明
运行命令:
adb shell monkey -p com.crazyhornets.MyHokageAndroidZSY -v -v -v 20 -- throttle 1000
Log:
:Monkey: seed=0 count=20 //伪随机种子为0,事件总数20
:AllowPackage: com.crazyhornets.MyHokageAndroidZSY //包名
:IncludeCategory: android.intent.category.LAUNCHER //包含的类别
:IncludeCategory: android.intent.category.MONKEY
// Selecting main activities from category android.intent.category.LAUNCHER //选择主activities
// - NOT USING main activity com.miui.barcodescanner.activity.CaptureActivity (from package com.miui.barcodescanner)//这些都不是指定的包的activity
// - NOT USING main activity com.android.browser.BrowserActivity (from package com.android.browser)
// - NOT USING main activity com.android.calculator2.Calculator (from package com.android.calculator2)
// - NOT USING main activity com.android.calendar.AllInOneActivity (from package com.android.calendar)
// - NOT USING main activity com.android.camera.Camera (from package com.android.camera)
// - NOT USING main activity com.android.contacts.activities.PeopleActivity (from package com.android.contacts)
// - NOT USING main activity com.android.contacts.activities.TwelveKeyDialer (from package com.android.contacts)
// - NOT USING main activity com.android.deskclock.DeskClockTabActivity (from package com.android.deskclock)
// - NOT USING main activity com.android.email.activity.Welcome (from package com.android.email)
// - NOT USING main activity com.android.fileexplorer.FileExplorerTabActivity (from package com.android.fileexplorer)
// - NOT USING main activity com.miui.gallery.app.Gallery (from package com.miui.gallery)
// - NOT USING main activity com.android.mms.ui.MmsTabActivity (from package com.android.mms)
// - NOT USING main activity com.android.settings.MiuiSettings (from package com.android.settings)
// - NOT USING main activity com.android.thememanager.ThemeResourceTabActivity (from package com.android.thememanager)
// - NOT USING main activity com.miui.weather2.ActivityWeatherCycle (from package com.miui.weather2)
……//中间的省略,从这也可以看出你手机上都安装了哪些应用
// + Using main activity com.crazyhornets.MyHokage.MyHokageActivity (from package com.crazyhornets.MyHokageAndroidZSY) //这个就是我们指定的包的activity
// Selecting main activities from category android.intent.category.MONKEY
// - NOT USING main activity com.miui.home.launcher.Launcher (from package com.miui.home)
// - NOT USING main activity com.android.settings.Settings$RunningServicesActivity (from package com.android.settings)
// - NOT USING main activity com.android.settings.Settings$StorageUseActivity (from package com.android.settings)
// - NOT USING main activity com.android.settings.applications.ManageApplicationsActivity (from package com.android.settings)
// Seeded: 0 //种子为0
// Event percentages: //事件百分比
// 0: 15.0%
// 1: 10.0%
// 2: 2.0%
// 3: 15.0%
// 4: -0.0%
// 5: 25.0%
// 6: 15.0%
// 7: 2.0%
// 8: 2.0%
// 9: 1.0%
// 10: 13.0%
//表示跳转到com.crazyhornets.MyHokageAndroidZSY包中的com.crazyhornets.MyHokage.MyHokageActivity里
:Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=com.crazyhornets.MyHokag
eAndroidZSY/com.crazyhornets.MyHokage.MyHokageActivity;end
//允许此Intent跳转
// Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.crazyhornets.MyHokageAndroidZSY/com.cr
azyhornets.MyHokage.MyHokageActivity } in package com.crazyhornets.MyHokageAndroidZSY
//以下就是事件间的延迟和发送的各种事件
Sleeping for 0 milliseconds
:Sending Key (ACTION_DOWN): 22 // KEYCODE_DPAD_RIGHT
:Sending Key (ACTION_UP): 22 // KEYCODE_DPAD_RIGHT
Sleeping for 0 milliseconds
:Sending Key (ACTION_DOWN): 23 // KEYCODE_DPAD_CENTER
:Sending Key (ACTION_UP): 23 // KEYCODE_DPAD_CENTER
Sleeping for 0 milliseconds
:Sending Flip keyboardOpen=false
Sleeping for 0 milliseconds
:Sending Key (ACTION_DOWN): 20 // KEYCODE_DPAD_DOWN
:Sending Key (ACTION_UP): 20 // KEYCODE_DPAD_DOWN
Sleeping for 0 milliseconds
:Sending Touch (ACTION_DOWN): 0:(313.0,419.0)
:Sending Touch (ACTION_UP): 0:(313.19876,419.49512)
Sleeping for 0 milliseconds
:Sending Key (ACTION_DOWN): 82 // KEYCODE_MENU
:Sending Key (ACTION_UP): 82 // KEYCODE_MENU
Sleeping for 0 milliseconds
:Sending Touch (ACTION_DOWN): 0:(427.0,730.0)
:Sending Touch (ACTION_UP): 0:(432.7109,728.9021)
Sleeping for 0 milliseconds
:Sending Trackball (ACTION_MOVE): 0:(-1.0,-1.0)
:Sending Trackball (ACTION_MOVE): 0:(-5.0,0.0)
:Sending Trackball (ACTION_MOVE): 0:(3.0,4.0)
:Sending Trackball (ACTION_MOVE): 0:(0.0,4.0)
:Sending Trackball (ACTION_MOVE): 0:(3.0,-5.0)
:Sending Trackball (ACTION_MOVE): 0:(-2.0,0.0)
Events injected: 20 //注入事件20
:Sending rotation degree=0, persist=false //发送屏幕翻转 度=0,存留=假
:Dropped: keys=0 pointers=0 trackballs=0 flips=0 rotations=0 //丢弃:键=0,指针=0,轨迹球=0,键盘轻弹=0,屏幕翻转=0
## Network stats: elapsed time=265ms (0ms mobile, 265ms wifi, 0ms not connected) //网络状态:占用时间=265ms(手机0ms,wifi265ms,未连接0ms)
// Monkey finished //Monkey测试完成
从例子中可以看出,该程序在这次测试中没有问题,若程序出现问题终端将打印出异常供程序员查找错误。
以下内容为android系统中的keycode值,在以后的调试中会经常需要查询:
KEYCODE_UNKNOWN=0;
KEYCODE_SOFT_LEFT=1;
KEYCODE_SOFT_RIGHT=2;
KEYCODE_HOME=3;
KEYCODE_BACK=4;
KEYCODE_CALL=5;
KEYCODE_ENDCALL=6;
KEYCODE_0=7;
KEYCODE_1=8;
KEYCODE_2=9;
KEYCODE_3=10;
KEYCODE_4=11;
KEYCODE_5=12;
KEYCODE_6=13;
KEYCODE_7=14;
KEYCODE_8=15;
KEYCODE_9=16;
KEYCODE_STAR=17; //-----------------------------------
KEYCODE_POUND=18;
KEYCODE_DPAD_UP=19;
KEYCODE_DPAD_DOWN=20;
KEYCODE_DPAD_LEFT=21;
KEYCODE_DPAD_RIGHT=22;
KEYCODE_DPAD_CENTER=23;
KEYCODE_VOLUME_UP=24;
KEYCODE_VOLUME_DOWN=25;
KEYCODE_POWER=26;
KEYCODE_CAMERA=27;
KEYCODE_CLEAR=28; //-----------------------------------
KEYCODE_A=29;
KEYCODE_B=30;
KEYCODE_C=31;
KEYCODE_D=32;
KEYCODE_E=33;
KEYCODE_F=34;
KEYCODE_G=35;
KEYCODE_H=36;
KEYCODE_I=37;
KEYCODE_J=38;
KEYCODE_K=39;
KEYCODE_L=40;
KEYCODE_M=41;
KEYCODE_N=42;
KEYCODE_O=43;
KEYCODE_P=44;
KEYCODE_Q=45;
KEYCODE_R=46;
KEYCODE_S=47;
KEYCODE_T=48;
KEYCODE_U=49;
KEYCODE_V=50;
KEYCODE_W=51;
KEYCODE_X=52;
KEYCODE_Y=53;
KEYCODE_Z=54;
KEYCODE_COMMA=55; //-----------------,------------------
KEYCODE_PERIOD=56; //-----------------.------------------
KEYCODE_ALT_LEFT=57;
KEYCODE_ALT_RIGHT=58;
KEYCODE_SHIFT_LEFT=59;
KEYCODE_SHIFT_RIGHT=60;
KEYCODE_TAB=61;
KEYCODE_SPACE=62;
KEYCODE_SYM=63;
KEYCODE_EXPLORER=64; //-----------------------------------
KEYCODE_ENVELOPE=65; //---------------信封--------------------
KEYCODE_ENTER=66;
KEYCODE_DEL=67;
KEYCODE_GRAVE=68; //---------------坟墓--------------------
KEYCODE_MINUS=69; //---------------负--------------------
KEYCODE_EQUALS=70; //--------------等于(=)---------------------
KEYCODE_LEFT_BRACKET=71; //----------------------------
KEYCODE_RIGHT_BRACKET=72; //----------------------------
KEYCODE_BACKSLASH=73; //-------------反斜线\---------------
KEYCODE_SEMICOLON=74; //--------------;--------------
KEYCODE_APOSTROPHE=75; //---------------’-------------
KEYCODE_SLASH=76; //--------------/?--------------
KEYCODE_AT=77; //------------------@---------------
KEYCODE_NUM=78;
KEYCODE_HEADSETHOOK=79; //----------------------------
KEYCODE_FOCUS=80;//*Camera*focus
KEYCODE_PLUS=81; //------------+----------------
KEYCODE_MENU=82;
KEYCODE_NOTIFICATION=83; //----------------------------
KEYCODE_SEARCH=84;
KEYCODE_MEDIA_PLAY_PAUSE=85;
KEYCODE_MEDIA_STOP=86;
KEYCODE_MEDIA_NEXT=87;
KEYCODE_MEDIA_PREVIOUS=88;
KEYCODE_MEDIA_REWIND=89; //------------倒带----------------
KEYCODE_MEDIA_FAST_FORWARD=90;
KEYCODE_MUTE=91; //-----------静音-----------------
Monkey log分析说明的更多相关文章
- Monkey log分析说明
运行命令: adb shell monkey -p com.crazyhornets.MyHokageAndroidZSY -v -v -v 20 -- throttle 1000 Log: :Mon ...
- Monkey log异常分析说明
以下主要针对在Android-Phone项目中进行Monkey log进行分析和说明,可以对bug提交作为参考. 要求熟悉,应用的包名.也就是说那个应用包出现问题,该属于那个模块,应用包名是判断依据. ...
- 老李推荐:第6章4节《MonkeyRunner源码剖析》Monkey原理分析-事件源-事件源概览-翻译命令字串
老李推荐:第6章4节<MonkeyRunner源码剖析>Monkey原理分析-事件源-事件源概览-翻译命令字串 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜任自 ...
- 老李推荐:第6章2节《MonkeyRunner源码剖析》Monkey原理分析-事件源-事件源概览-获取命令字串
老李推荐:第6章2节<MonkeyRunner源码剖析>Monkey原理分析-事件源-事件源概览-获取命令字串 从上一节的描述可以知道,MonkeyRunner发送给Monkey的命令 ...
- Monkey框架(测试方法篇) - monkey日志分析
Monkey日志分析是Monkey测试中非常重要的一个环节,通过日志分析,可以获取当前测试对象在测试过程中是否会发生异常,以及发生的概率,同时还可以获取对应的错误信息,帮助开发定位和解决问题.介绍日志 ...
- android 常见死机问题--log分析
http://blog.csdn.net/fangchongbory/article/details/7645815 android 常见死机问题--log分析============ ...
- Apache的Access.log分析总结
Apache的Access.log分析总结 #查看80端口的tcp连接 #netstat -tan | grep "ESTABLISHED" | grep ":80&q ...
- 老李推荐:第6章8节《MonkeyRunner源码剖析》Monkey原理分析-事件源-事件源概览-小结
老李推荐:第6章8节<MonkeyRunner源码剖析>Monkey原理分析-事件源-事件源概览-小结 本章我们重点围绕处理网络过来的命令的MonkeySourceNetwork这个事 ...
- 老李推荐:第6章7节《MonkeyRunner源码剖析》Monkey原理分析-事件源-事件源概览-注入按键事件实例
老李推荐:第6章7节<MonkeyRunner源码剖析>Monkey原理分析-事件源-事件源概览-注入按键事件实例 poptest是国内唯一一家培养测试开发工程师的培训机构,以学员能胜 ...
随机推荐
- 【Android开发笔记】Android Splash Screen 启动界面
public class SplashActivity extends Activity { @Override protected void onCreate(Bundle savedInstanc ...
- 360、IE等浏览器对bootstrap的影响
笔者开发的web程序部署上线后发现,bootstrap的菜单不显示,开发时候用chrome没有发现问题,在360浏览器上跑,发现360默认的是兼容模式,切换到极速模式就能够显示菜单了. 但是这样的用户 ...
- webpack打包过程如何调试?
本文适用于已经会使用webpack的前端开发人员,但是想进一步了解webpack细节和进阶. 首先请读者按照我前一篇文章 Webpack 10分钟入门介绍的步骤,在本地搭建一个webpack的hell ...
- 5.1 Object类型
创建Object实例的方式有两种 ① 使用new操作符跟Object构造函数 var person = new Object(); person.name = "Tom"; pei ...
- 课时5.什么是URL(理解)
其实浏览器的地址栏中输入的地址就是一个URL. http://127.0.0.1/index.html(浏览器会自动添加:80) http://127.0.0.1:80/index.html(这是浏览 ...
- 课时21.img标签(掌握)
1.img标签中的img其实是英文image的缩写,所以img标签的作用,就是告诉浏览器我们需要显示一张图片 2.img标签格式:<img src=" "> img是 ...
- HDU 1423 Greatest Common Increasing Subsequence(LCIS)
Greatest Common Increasing Subsequenc Problem Description This is a problem from ZOJ 2432.To make it ...
- 使用shell脚本添加用户
该文演示如何使用shell脚本完成添加用户,首先进行一个判断,如果用户存在,提示该用户已经存在,否则进行添加新的用户. 示例代码如下: #!/bin/bash grep_user() { R=`gre ...
- 【转载】MQTT的学习之Mosquitto集群搭建
本文出自:http://www.cnblogs.com/yinyi521/p/6087215.html 文章钢要: 1.进行双服务器搭建 2.进行多服务器搭建 一.Mosquitto的分布式集群部署 ...
- python3 练习题100例 (七)
题目七:将一个列表的数据复制到另一个列表中. #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 题目七:将一个列表的数 ...