0

I have to make an application that tests an android application using MonkeyRunner tool.I have read android developer documentation.but still dont know how to work with monkey runner.please help me.

I have installed the application on emulator via command line.now I have to start monkey runner and need to generate random touches and inputs. And also need screenshots.

3 Answers3

0

If you ask any specific questions regarding the MonkeyRunner, I am sure people would love to help you. But please avoid asking general broad-range questions that can be easily found by doing some research online.

gbudan
  • 889
  • 7
  • 17
0

This is a basic script can start with:

from com.android.monkeyrunner import MonkeyDevice, MonkeyRunner, MonkeyView, MonkeyImage

my_device = MonkeyRunner.waitForConnection()

print("Touching coordinate(x=300,y=750)")
my_device.touch(300,750, MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(20)

save it in c:\myscript.py and run it with: monkeyrunner c:\myscript.py

Empario
  • 402
  • 6
  • 19
0

You need UI/Application Exerciser Monkey not MonkeyRunner to generates pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system-level events. Event types and frequencies can be specified in the command line.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134