user1734654
user1734654

Reputation: 103

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?

Upvotes: 5

Views: 1870

Answers (2)

Yury
Yury

Reputation: 20936

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.

Upvotes: 2

Gabriel Porumb
Gabriel Porumb

Reputation: 1691

The monkeyrunner script runs on the PC only. However, if you don't want to connect the phone to the PC via cable, you could try connecting via wifi. Use:

adb connect 192.168.x.x

Or something like that to connect to the phone.

Upvotes: 0

Related Questions