Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run monkeyrunner without the phone plugged to the PC

i want to run a python stability test-case with monkeyrunner

however i want to run the script without having the mobile plugged to the PC (because what is measuring is battery life)

Normally I use "monkeyrunner mytest.py "

So the idea would be executing the py script with a monkeyrunner inside the phone.Is that possible?

like image 853
user1734654 Avatar asked Nov 03 '22 12:11

user1734654


1 Answers

You can use two approaches:

  1. To use monkey command locally on Android device and write your own script (the syntax for this command differs from monkeyrunner syntax)
  2. You can use the approach proposed by @Gabriel Porumb . But you should use the command in the following way:

At first you should run command:

adb tcpip <port>

Then on your device you should check what ip address is assigned to your device (you can check this in the Settings).

After that you have to execute command:

adb connect <your_ip>:<port>

And now you can run your monkeyrunner script.

like image 148
Yury Avatar answered Nov 09 '22 16:11

Yury