Sentinel: generating GUI tests for sensor leaks in Android and Android wear apps

被引:0
作者
Haowei Wu
Hailong Zhang
Yan Wang
Atanas Rountev
机构
[1] Google Inc.,
[2] Ohio State University,undefined
来源
Software Quality Journal | 2020年 / 28卷
关键词
Android; GUI; Android Wear; Smartwatch; Energy; Sensor; Static analysis; Testing;
D O I
暂无
中图分类号
学科分类号
摘要
Due to the widespread use of Android devices and apps, it is important to develop tools and techniques to improve app quality and performance. Our work focuses on a problem related to hardware sensors on Android devices: the failure to disable unneeded sensors, which leads to sensor leaks and thus battery drain. We propose the Sentinel testing tool to uncover such leaks. The tool performs static analysis of app code and produces a model which maps GUI events to callback methods that affect sensor behavior. Edges in the model are labeled with symbols representing the acquiring/releasing of sensors and the opening/closing of UI windows. The model is traversed to identify paths that are likely to exhibit sensor leaks during run-time execution based on two context-free languages over the symbol alphabet. The reported paths are then used to generate test cases. The execution of each test case tracks the run-time behavior of sensors and reports observed leaks. This approach has been applied to both open-sourced and closed-sourced regular Android applications as well as watch faces for Android Wear smartwatches. Our experimental results indicate that Sentinel effectively detects sensor leaks, while focusing the testing efforts on a very small subset of possible GUI event sequences.
引用
收藏
页码:335 / 367
页数:32
相关论文
共 29 条
  • [1] Amalfitano D(2015)MobiGUITAR: automated model-based testing of mobile apps IEEE Software 32 53-59
  • [2] Fasolino A(2012)What’s app?: a wide-scale measurement study of smart phone markets ACM SIGMOBILE Mobile Computing and Communications Review 16 16-27
  • [3] Tramontana P(2001)A framework for call graph construction algorithms TOPLAS 23 685-746
  • [4] Ta B(2017)Static analysis of Android apps: a systematic literature review IST 88 67-95
  • [5] Memon A(2014)Greendroid: automated diagnosis of energy inefficiency for smartphone applications TSE 40 911-940
  • [6] d’Heureuse N(2017)Robotic testing of mobile apps for truly black-box automation IEEE Software 34 11-16
  • [7] Huici F(1998)Program analysis via graph reachability IST 40 701-726
  • [8] Arumaithurai M(undefined)undefined undefined undefined undefined-undefined
  • [9] Ahmed M(undefined)undefined undefined undefined undefined-undefined
  • [10] Papagiannaki K(undefined)undefined undefined undefined undefined-undefined