Android - Monkey throttling not working as specified

  • I'm using Monkey to stress test one of my company's Android applications. However, the --throttle switch does not seem to work as specified.

    For example, I set Monkey to inject an input event every 500 milliseconds. While the Monkey runner id noticeably slow down, it would still sometimes send multiple events in rapid succession. I then set the throttling to 5,000 milliseconds, but the issue would persist.

    Am I doing something wrong?

  • I had faced the same issue.

    What I was using:
    ./adb shell monkey -p -v 50 --throttle 1000

    Correct syntax:
    ./adb shell monkey -p -v --throttle 1000 50

    According to the syntax mentioned here, all options should be before the event-count.

    If you are already using this correctly, the "multiple events in rapid succession" should be the key, trackball events. For e.g.

    :Sending Trackball (ACTION_MOVE): 0:(-3.0,3.0)
    :Sending Trackball (ACTION_MOVE): 0:(-5.0,-2.0)
    :Sending Trackball (ACTION_MOVE): 0:(2.0,2.0)
    :Sending Trackball (ACTION_MOVE): 0:(-1.0,1.0)
    :Sending Trackball (ACTION_MOVE): 0:(0.0,-1.0)


    :Sending Key (ACTION_DOWN): 19 // KEYCODE_DPAD_UP
    :Sending Key (ACTION_UP): 19 // KEYCODE_DPAD_UP

    are grouped together (without the throttle delay), but are still counted towards the event count as 5 and 2 resp.

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2