Hi All i am a new bie to use monkey script. Can anybody tell me what I have to do to test the whol application. ALL the click and specially how to wring log file for out put. I tried code so far but it couldnt test my whole app. I have two activities in my app one is main LEt suppose A and other is B which is setting screen. Can anybody tell me the script and what command I should put in my xxx.py to test for whole features. What I tried so far is.
! /usr/bin/env monkeyrunner
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from random import randint
print "get device"
device = MonkeyRunner.waitForConnection()
package = 'xx.xxxx.xxxx'
activity = 'xxx.exampleactivity
runComponent = package + '/' + activity
device.startActivity(component=runComponent)
#use commands like device.touch and device.drag to simulate a navigation and open my activity
#with your activity opened start your monkey test
print "start monkey test"
for i in range(1, 1000):
#here i go emulate only simple touchs, but i can emulate swiper keyevents and more... :D
device.touch(randint(0, 1000), randint(0, 800), 'DOWN_AND_UP')
print "end monkey test"