LeakDroid: Systematic Testing for Resource Leaks in Android Applications

The use of mobile devices and the complexity of their software continue to grow rapidly. This growth presents significant challenges for software correctness and performance. In addition to traditional defects, a key consideration are defects related to the limited resources available on these devices. Resource leaks in an application, due to improper management of resources, can lead to slowdowns, crashes, and negative user experience. Despite a large body of existing work on leak detection, testing for resource leaks remains a challenging problem. We propose a novel and comprehensive approach for systematic testing for resource leaks in Android software. Similar to existing testing techniques, the approach is based on a GUI model, but is focused specifically on coverage criteria aimed at resource leak defects. These criteria are based on neutral cycles: sequences of GUI events that should have a "neutral" effect and should not lead to increases in resource usage.

In [ISSRE13], we defined several test coverage criteria based on different categories of neutral cycles in the GUI model. This approach is informed by knowledge of typical causes of resource leaks in Android software. We have also developed LeakDroid, a tool that generates test cases to trigger repeated execution of neutral cycles. When the test cases are executed, resource usage is monitored for suspicious behaviors. The approach has been evaluated on several Android applications. The evaluation demonstrates that the proposed test generation effectively uncovers a variety of resource leaks. This page contains the implementation of LeakDroid, as well as the applications, models, and test cases used in our experiments. Follow-up work developed a neutral-cycle test generator based on static analysis of the application's code [AST16] as well as approach to profile the application's responsiveness using resource amplification [MOBILESoft'16].


People


Publications


Download (Version 1.0, released on 10/15/2013)

The software release contains the LeakDroid source code, the programs used in the experiments, and the corresponding GUI models and test cases. Release 1.0 can be downloaded from here. Please see the included README file for usage instructions. For questions or comments, please contact Prof. Atanas Rountev.

Acknowledgments

This material is based upon work supported by the U.S. National Science Foundation under grants CCF-1017204 and CCF-1319695, and by a Google Faculty Research Award. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation or Google Inc.
This page was last updated on July 20, 2016.