日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【转】Monkey测试6-Monkey Test Log

發布時間:2025/7/14 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【转】Monkey测试6-Monkey Test Log 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Moneky Test Log 分析:  
首先用一個最簡單的例子分析:
monkey --pct-trackball 0 --throttle 100 -v 500
/*p參數: 表示指定測試的程序
/*v參數: 表示查看monkey生成的一些詳細的隨機的事件名*/
/*數字100: 表示測試事件數為100*/

結果如下:

:Monkey: seed=0 count=100
:AllowPackage: com.example.android.apis
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY

/*各種事件所占的比例及各數字分別表示:*/
/* Event percentages:*/?
[--pct-touch PERCENT]    0: 15.0%?
[--pct-motion PERCENT]    1: 10.0%?
[--pct-trackball PERCENT]    2: 15.0%?
[--pct-syskeys PERCENT]    3: 25.0%?
[--pct-nav PERCENT]    4: 15.0%?
[--pct-majornav PERCENT]    5: 2.0%?
[--pct-appswitch PERCENT]    6: 2.0%?
[--pct-flip PERCENT]    7: 1.0%?
[--pct-anyevent PERCENT]    8: 15.0%?

:Switch:

/*表示跳轉到com.example.android.apis 里面的ApiDemos這一個Activity里。*/
#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.example.android.apis/.ApiDemos;end

/*允許此Intent跳轉。*/
// Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.apis/.ApiDemos } in package com.example.android.apis

/*發送的一些動作,如點擊按下,點擊放開,移動。*/
:Sending Pointer ACTION_MOVE x=-4.0 y=2.0
:Sending Pointer ACTION_UP x=0.0 y=0.0
:Sending Pointer ACTION_DOWN x=207.0 y=282.0
:Sending Pointer ACTION_UP x=189.0 y=289.0
:Sending Pointer ACTION_DOWN x=95.0 y=259.0
:Sending Pointer ACTION_UP x=95.0 y=259.0
:Sending Pointer ACTION_DOWN x=295.0 y=223.0
:Sending Pointer ACTION_UP x=290.0 y=213.0
:Sending Pointer ACTION_MOVE x=-5.0 y=3.0
:Sending Pointer ACTION_MOVE x=0.0 y=-5.0

/*拒絕此跳轉,因為它是跳轉到非它自己的包的Activity,本測試中是指寫測試它程序所在的包,此跳轉是跳出本程序,進入到桌面。*/
// Rejecting start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] cmp=com.android.launcher/.Launcher } in package com.android.launcher

/*繼續發送動作。8/
:Sending Pointer ACTION_DOWN x=74.0 y=201.0
:Sending Pointer ACTION_UP x=74.0 y=201.0
:Sending Pointer ACTION_MOVE x=3.0 y=-2.0
:Sending Pointer ACTION_UP x=0.0 y=0.0
:Sending Pointer ACTION_MOVE x=-4.0 y=2.0
Events injected: 100

/*丟棄的,鍵=0,指針=0,軌跡球=0,翻轉=0。*/
:Dropped: keys=0 pointers=0 trackballs=0 flips=0

/*網絡統計經過時間為4202ms,其中4202ms是用于在手機上的,0ms用于無線網絡上,沒有連接的時間為0ms。*/

DOS窗口中顯示的?
// CRASH: com.android.speechrecorder (pid 2101) /*顯示發生ForceClose_crash的應用程序名。*/?
// Short Msg: java.lang.NullPointerException /*下面的我暫時還不知道是什么意思。*/?
// Long Msg: java.lang.NullPointerException?
// Build Label: generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys?
// Build Changelist: 43546?
// Build Time: 1277931480000?
// java.lang.NullPointerException?
// at com.android.speechrecorder.SpeechRecorderActivity$4.run(SpeechRecorderActivity.java:192)

總結

以上是生活随笔為你收集整理的【转】Monkey测试6-Monkey Test Log的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。