Automated monkey testing
Last modified on Fri 22 Jul 2022

What does a logger say before he cuts down a tree? Let the chimps fall where they may.

Automated monkey testing

Monkey testing is a type of testing where you send random inputs to application while checking behavior, or seeing whether the application or system will crash.

Here's how to get it up and running on any Android device:

  1. Install ADB (Android Debug Bridge)

  2. Install an application you want to Monkey test on any Android device

  3. Connect the Android device with your Mac and click "Trust"

  4. Open terminal and run adb devices to confirm the device is properly connected (this command should list all connected devices)

  5. If you can see the connected device, run adb shell pm list packages -f > packages.txt to create "packages.txt" file with all app packages on your Android device.

  6. Locate the "packages.txt" file in your home directory and open it

  7. Search the name of the application you want to test (e.g. "QA Adventure")

  8. If the Facebook" application is installed on your device, you'll probably see something similar to this


  9. Copy the string that starts with the "co", this is the package name we need:


  10. Open terminal again and run adb shell monkey -p -v 5000 or, in my case adb shell monkey -p co.infinum.qaadventure.staging -v 5000

  11. This will send 5000 random events to the QA Adventure application.

Follow this link if you need more information.