InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Android development tutorials

  • Android - Show top processes using adb
  • Android studio keyboard shortcuts
  • Disable sleep during android usb debugging
  • Download apk using AirDroid
  • Enable usb debugging
  • Exerciser monkey tutorial
  • Find top processes by memory/cpu on Android using Adb
  • Find used ports by an app on Android using Adb
  • Install Android 8 on Pixel 2
  • Root Android pixel 2 using Magisk and boot image patching
  • Transfer android apk using adb
  • Using Google analytics SDK v2 for android app real time tracking
  • View Desktop Site
  • adb tutorial
 
  • Home
  • > Tutorials
  • > Android Development

How to use exerciser monkey tool for android stress testing

By admin | Last updated on Mar 15, 2016

Exerciser monkey tool can be used to generate pseudo-random streams of user events such as clicks, touches, gestures and system-level events. This can be used to stress test an app on android mobile phone or emulator. For the purpose of this article, I’ll use chrome app on android phone connected to Macbook.

Here are the quick steps to run exerciser monkey tool.

Ensure phone is recognized by adb

Assuming you have enabled USB debugging in your mobile and android sdk installed on your Mac (or other machine), run the following command to ensure that your device is recognized.

$adb devices
List of devices attached 
[SOMEID]	device

You should see your device id as outcome if your device us detected.

Run monkey tool for chrome

Run monkey tool for chrome with 100 random events

$ adb shell monkey -p com.android.chrome -v 100

In case there are multiple devices use -s deviceid

$ adb -s [DEVIDE_ID] shell monkey -p com.android.chrome -v 100

To add throttle to evens use –throttle [milliseconds]

$ adb  shell monkey -p com.android.chrome -v --throttle 10000 10

To provide a seed to pseudo-random number generator use -s [seed]. This will make it re-runnable with same sequence of events for same seed.

$ adb  shell monkey -p com.android.chrome -v -s 101 --throttle 1000 100

To control percentage of specific events e.g. touch events use –pct-touch

$ adb  shell monkey -p com.android.chrome -v -s 101 --pct-touch  50 --throttle 1000 100

Suggested posts:

  1. Mac terminal – how to close shell on exit
  2. Linux – number of cpus (lscpu)
  3. Android – install android 8, 9 from OTA images on pixel 2
  4. How to download apk from mobile using AirDroid
  5. Root Android pixel 2 using Magisk and boot image patching
  6. How to take screenshot on android phone
  7. Install Android 8 on Pixel 2
  8. Find top processes by memory/cpu on Android using Adb
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Android Development, Mac, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress