I \'ve got a Quiz app using Realm db. Every time the user selects an answer she clicks a button and new text for Question appears. Thats it until she reaches the end where
First, see this question : Android Monkey Runner
Then you can see these guides :Monkey Runner
It makesyou usePython to test your android activity outside of your source. So, you can trigger things and get to specific activitiesl like this :
#! /usr/bin/env monkeyrunner
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from random import randint
print "get device"
device = MonkeyRunner.waitForConnection()
package = 'my.packaget'
activity = 'my.package.activity'
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"
save it and then run : monkeyrunner test.py