Skip to content

A lightweight test input generator for Android. Similar to Monkey, but with more intelligence and cool features!

License

Notifications You must be signed in to change notification settings

ebarsallo/droidbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DroidBot UTG

DroidBot

About

DroidBot is a lightweight test input generator for Android. It can send random or scripted input events to an Android app, achieve higher test coverage more quickly, and generate a UI transition graph (UTG) after testing. A sample UTG is shown here.

It has the following advantages as compared with other input generators:

  1. It does not require system modification or app instrumentation;
  2. Events are based on a GUI model (instead of random);
  3. It is programmable (can customize input for certain UI);
  4. It can produce UI structures and method traces for analysis.

Reference

Li, Yuanchun, et al. "DroidBot: a lightweight UI-guided test input generator for Android." In Proceedings of the 39th International Conference on Software Engineering Companion (ICSE-C '17). Buenos Aires, Argentina, 2017.

Prerequisite

  1. Python version 2.7
  2. Java version 1.7
  3. Android SDK
  4. Add platform_tools directory and tools directory in Android SDK to PATH

How to install

Clone this repo and intall with pip:

git clone https://github.com/honeynet/droidbot.git
pip install -e droidbot

If successfully installed, you should be able to execute droidbot -h.

How to use

  1. Make sure you have:

    • .apk file path of the app you want to analyze.
    • A device or an emulator connected to your host machine via adb.
    • Get the serial number (e.g. emulator-5554) of target device using adb devices.
  2. Start DroidBot:

    droidbot -d <serial> -a <path_to_apk> -policy dfs
    

Test strategy

DroidBot uses an app model to generate test input. Currently, DroidBot support following three strategies:

  1. random -- Generate random input events;
  2. dfs/bfs -- Explore the UI states using a depth-first/breadth-first strategy;
  3. script -- Use a script to customize input for certain states. HOW.

Evaluation

We have conducted several experiments to evaluate DroidBot by testing apps with DroidBot and Monkey. The results can be found at DroidBot Posts. A sample evaluation report can be found here.

Acknowledgement

  1. AndroidViewClient
  2. Androguard
  3. The Honeynet project
  4. Google Summer of Code

Useful links

About

A lightweight test input generator for Android. Similar to Monkey, but with more intelligence and cool features!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.1%
  • JavaScript 3.8%
  • Other 1.1%