home

2011년 2월 15일 화요일

[android] Monkey tool script

1. make a txt file.

<pre>
   type= raw data
   count=10
   speed= 250
   start data >>



# Start Setting app
    LaunchActivity(com.android.settings,com.android.settings.Settings)
    UserWait(2000)

# touch
    DispatchPointer(0, 0, 0, 210, 300, 0,0,0,0,0,0,0)  //touch 0, x 210, y 300
    DispatchPointer(0, 0, 1, 210, 300, 0,0,0,0,0,0,0)  //release 1. x 210, y 300
    UserWait(2000)  // wait.

# Home key
    captureDispatchKey(0,0,0,3,0,0,0,0)  //push 0, home 3
    captureDispatchKey(0,0,1,3,0,0,0,0)  //release 1, home 3

* key info
http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK

2. adb push script file
> adb push script.txt /where

3. go~ 10 times.
> adb shell monkey  -f /where/script.txt 10

댓글 없음:

댓글 쓰기