0

I am trying to write a monkeyrunner program that has some dependencies which are all nicely set-up in a virtualenv.

Unfortunately, I can't seem to get monkeyrunner to be set-up with the right system path set-up to find the dependencies I need. I can even notice by printing out sys.path that monkeyrunner is not even picking up PYTHONPATH entries.

I can see that monkeyrunner is using jython under the covers, but I don't have enough background to understand how this works out.

Are there any tricks that can be done in order to get monkeyrunner to pass along whatever information is necessary to its bundled jython so that it will use the virtualenv settings?

Any hints would be greatly appreciated.

Julian Cerruti
  • 1,918
  • 2
  • 16
  • 16

1 Answers1

0

You should try AndroidViewClient/culebra as a replacement. As it's 100% python you won't have any problem with your virtualenv.

Furthermore, as AndroidViewClient/culebra solves several monkeyrunner problems or limitations (i.e. connecting to multiple devices concurrently) you will be at a better position changing. This blog has a lot of articles and examples of most common use cases.

Culebra GUI and the upcoming CulebraTester are two different UI alternatives to automatically generate python (and other languages too) script and test cases.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • Thank you for looking into my issue and I appreciate the work you've put into AndroidViewClient. I would suggest though that when proposing your tool you clarify also that you are the owner of the library, so that people are aware that the suggestion is coming from the author. Also, this doesn't answer my question. – Julian Cerruti Dec 13 '16 at 21:25
  • AVC is a monkeyrunner drop-in replacement in 99% of cases, so I think it's a valid answer to your question. – Diego Torres Milano Dec 13 '16 at 23:03
  • I am sorry but I disagree. My question was: "how to pass a python environment to monkeyrunner", not "are there alternatives to monkeyrunner". In my particular case I cannot change monkeyrunner for another tool, so this was not helpful. In addition, my comment about the inappropriateness of recommending a tool without the disclaimer that you are the author stands. – Julian Cerruti Dec 15 '16 at 01:27
  • 1
    It's an Open Source project, so it's me and 16 other people: https://github.com/dtmilano/AndroidViewClient/graphs/contributors – Diego Torres Milano Dec 15 '16 at 04:08