错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Finding Deep-Hidden Bugs in Android Apps via Functional Semantics Guided Exploration

  • Siyi Gu,
  • Xiaoqiang Liu,
  • Hui Guo,
  • Bochun Cao,
  • Baiyan Li,
  • Lizhi Cai,
  • Hu Yun

摘要

As Android apps get more complicated, current automated testing techniques are not sufficient for discovering deep-hidden bugs. The deep-hidden bugs are triggered by sequential Data Manipulation Functions(DMFs), which often represents functional semantics (Create, Read, Update, Delete and Search). The Data Manipulation Function Sequence (DMFSQ) is composed of DMFs. Testing by DMFSQs can closely mirror real user interactions, and provide a more in-depth evaluation of the app’s functions. Therefore, to find the deep-hidden bugs, we propose a novel functional semantics guided exploration strategy based on DMFs and DMFSQs. Our idea is that we can (1) extract DMFs from the apps, and (2) use functional semantics of DMFs in the execution trace to guide the test exploration. To achieve this idea, we conducted a study on the GUI of various apps’ DMFs to identify accurate and universal GUI patterns as the extraction rule. With the rule, an algorithm is developed to extract DMFs from apps while detecting regular bugs during depth-first test exploration. Based on extracted DMFs, we design a exploration strategy based on Q-learning, a classic reinforcement learning algorithm for detecting deep-hidden bugs. We have implemented our idea as an automated testing tool \({\textsc {DmsDroid}}\) . \({\textsc {DmsDroid}}\) can not only discover regular bugs, but also generate meaningful DMFSQs to detect deep-hidden bugs. The evaluation results of \({\textsc {DmsDroid}}\) on 16 real-world apps shows that \({\textsc {DmsDroid}}\) outperforms the state-of-practice Android testing techniques in terms of code coverage and bug detection. So far, 7 of our reported bugs have been confirmed.