3 minutes

Quality Assurance Tools for Stability/Stress Testing for Android

What do we do to ensure high quality of your mobile applications? What tools does the Lemberg QA team use to check the stability of your Android apps?

SEE ALSO: Main Quality Assurance Tools for Mobile Apps Testing

TestFairy with UI / Application Exerciser Monkey

We use ​ UI/Application Exerciser Monkey and ​ TestFairy to test Android apps. They allow emulating ​ pseudo­random streams of user events such as clicks, touches or gestures​ . ​ The Monkey acts as a stress test on an app, and you launch it with a simple command in a console that will direct the Monkey.

This is an example of the UI/Application Exerciser Monkey command: ​ adb shell monkey ­p com.your.package ­-v 5000 -­s 1000 ­­--pct-­touch 20 --­­pct-­motion 20 --­­pct-­nav 40 ­­--pct-­majornav 60 ­­--pct-­syskeys 20 ­­--pct-­appswitch 50. ​All command options are described ​ here​.

Also, there is a way to make a *.bat script for Windows which allows running this command again and again to capture more crash results.

Bath Script template​ :

To trace TestFairy crashes, memory leaks, etc., you should first upload the apk file to TestFairy. After that, download it and install on a device. Once the script has been executed , monkey testing begins.

screenshot TestFairy with UI / Application Exerciser Monkey

One benefit of Test Fairy is ​ a full report of discovered issues including ​ logs, video and screenshots of the latest actions, which resulted in a crash, test device details with graphs of Memory and CPU performance, Network Throughput, Phone Signal, Battery Performance and Wifi Signal. You can also add testers and create your own groups for testing.

Another plus is that TestFairy has been free so far. It is rapidly developing and soon there will also be a possibility to test iOS applications.​ It is currently in the beta testing phase.

Device: Android Developer Options

The Developer Options menu in Android is a hidden menu with a variety of advanced options. In Android 4.2+, the Developer Options menu and USB Debugging option have been hidden. To enable them go to ​ Settings > About phone > Build number ​and ​ tap on the section ​ 7 times​ . These options are intended for developers, but many of them will be interesting to QAs:

  • Show Always­On­Top CPU Usage: You can view the CPU usage data by toggling the Show CPU usage option to On. This information will appear on top of the app you’re using.
  • Don't keep activities: When this option is enabled, the Android OS will destroy an activity as soon as it stops. It is intended to help developers debug their apps. For example, it can simulate a case when Android kills an activity in the background due to memory pressure.
  • Process Stats: ​ Android 4.4 includes a new developer option to make it easier to analyse your app's memory profile while it's running on a device or an emulator.

 Android Developer Options


TestFairy and UI/Application Exerciser Monkey is an excellent combination of emulating pseudo-random streams of user events, simple scripts directing the actions of the Monkey, and a detailed issue report including logs, video and screenshots of the latest actions. As a result, this approach saves your time and what you need to do ’is edit the script for your app, connect the device to a PC and run a bat file.


Article Contents: