First, the preliminary analysis method:
After the monkey test error occurs , the general error steps are the following:
1. Find out which part of the monkey is wrong
2, check the monkey inside the error before some event action , and manually perform the action
3, if the above steps are not found , you can use the previously executed Monkey command to execute again , Note that the seed value is the same
General test Results Analysis:
1.ANR Problem: Search for "ANR" in the log
2. Crash: Search for "Exception" in the log
Second, detailed analysis Monkey log:
First we need to see if there is a ANR or an exception in the monkey Test , as described above. will be executedMonkey generated log, exported from the phone and opened to view the log; at the very beginning of log, the seed value, the number of executions, and the package name of the test monkey executed. Specific methods as described above.
And then we're going to analyzeThe specific information in log is as follows:
ViewThe first of the logSwitch, which is primarily to viewMonkey is doing that one.Activity, such as the followingLog, perform theCom.tencent.smtt.SplashActivity, in the nextSwtich, if a crash or other exception occurs, you canFind the problem in your activity.
: Switch: #Intent; action=android.intent.action.main;category=android.intent.category.launcher;launchflags= 0x10000000;component=com.tencent.smtt/. Splashactivity;end
Allowing start of Intent {Act=android.intent.action.main cat=[android.intent.category.launcher]cmp= com.tencent.smtt/. Splashactivity} in the package COM.TENCENT.SMTT
In the followingLog,Sending Pointer Action_down andSending Pointer ACTION_UP represents a single click operation that is currently performed;
Sleeping for milliseconds this sentenceLog is the executionMonkey Test,Throttle set interval time, each occurrence, represents an event.
Sendkey (Action_down)//keycode_dpad_down represents the current execution of a click-down navigation key operation;
Sending Pointer Action_move represents an operation that currently performs a sliding interface.
: Sending Pointer Action_down x=47.0 y=438.0
: Sending Pointer action_up x=47.0 y=438.0
Sleeping for milliseconds
: Sendkey (Action_down)://keycode_dpad_down
: Sendkey (action_up)://keycode_dpad_down
Sleeping for milliseconds
: Sending Pointer action_move x=-2.0 y=3.0
: Sending Pointer action_move x=4.0 y=-3.0
: Sending Pointer action_move x=-5.0 y=-3.0
: Sending Pointer action_move x=3.0 y=4.0
: Sending Pointer action_move x=-4.0 y=1.0
: Sending Pointer action_move x=-1.0 y=-1.0
: Sending Pointer action_move x=-2.0 y=-4.0
IfThe Monkey test completes successfully, and at the end of the log, the number of times the current execution event is printed and the time spent;//Monkey finished represents execution completion. Monkey execution Interrupt, at the end of log can also see the current number of executions. Monkey execution completed log is as follows:
Events injected:6000
:D ropped:keys=0 pointers=9 trackballs=0 flips=0
# # Network stats:elapsed time=808384ms (0ms Mobile, 808384ms WiFi, 0msnot connected)
Monkey finished
Monkey Monkey Log Analysis