0

I'm a huge fan of python/jython's -i switch, as in

$ jython -i set_up_my_stuff.py
..
..sets up object1
..sets up object2
>>> object1.do_stuff()

I'm wondering if there is an equivalent for monkeyrunner? Doesn't seem to be a ./monkeyrunner -i option.

This way, I can set up my tests with a script, then explore with the phone afterwards with an interactive prompt.

Thanks!!

ether_joe
  • 1,068
  • 1
  • 13
  • 32
  • I've been looking at solving the problem another way, by starting the interactive prompt, then importing my desired code once the prompt is active. However the way monkeyrunner starts itself, using the java -jar command (see $ANDROID_HOME/tools/monkeyrunner), seems to restrict what is available to import in the classpath. Still digging :P – ether_joe Oct 24 '12 at 00:59

1 Answers1

1

If you invoke monkeyrunner without any arguments, it itself present you an interactive environment, and you can enter your monkeyrunner commands manually and work with it. Up/down keys are working, so having something is better than nothing.

But if this is not what you meant, and you want to debug monkeyrunner scripts interactively, you can setup Eclipse to work with monkeyrunner, where you can step through the script, watch variables etc. It is documented here

And to answer to your question, there is no way to interactively run a script by using monkey runner (As far as I know)

Durairaj Packirisamy
  • 4,635
  • 1
  • 21
  • 27
  • Thanks, I'm familiar with the standard monkeyrunner interactive interface. What I'm looking for is to be able to use that interface with some state pre-loaded. – ether_joe Oct 24 '12 at 00:57