Search code examples
androidmonkeyrunner

How to run monkey runner script?


i am new to automating the android app.I heard that from Monkeyrunner we can automate..

I have seen some sample code..

How to run this? what is the extension for saving the code?

Do I need to connect device and run from the cmd prompt?

Please tell me as i am very new to this.


Solution

  • You run monkeyrunner from your development computer with the device connected or emulator running.

    Like:

    $ monkeyrunner myscript.mr
    

    If you are using Linux or OS X you can use a she-bang including this as the first line in the script

    #! /usr/bin/env monkeyrunner
    

    providing that monkeyrunner is in your PATH.