HmTest: Automated Testing of HarmonyOS Apps via Model-Driven Navigation and Reinforcement Learning


연구 분야: Verification



학회: Journal of Computer Science and Technology


초록

HarmonyOS is a new all-scenario operating system for smart devices. As its software ecosystem expands rapidly, how to conduct automated testing of HarmonyOS apps for quality assurance has become a crucial task. This paper presents HmTest, an automated testing framework for HarmonyOS apps, which consists of two complementary modules: targeted exploration and reinforcement learning (RL)-based exploration. Targeted exploration performs white-box testing, leveraging static analysis to construct a page transition graph (PTG). By systematically traversing PTGs to guide testing, HmTest can quickly achieve high page coverages. On the other hand, RL-based exploration performs black-box testing, utilizing reinforcement learning to achieve a comprehensive exploration of app states. Additionally, an automaton-based mechanism is employed to efficiently recover and restart the testing process when reinforcement learning encounters stagnation. We have evaluated HmTest on nine HarmonyOS NEXT apps and compared it with two official HarmonyOS app testing tools. The experimental results demonstrate that targeted exploration can generate highly-precise PTGs and help achieve high page coverages within a few minutes. RL-based exploration can significantly outperform other methods in terms of finer-grained statement coverage on the majority of the tested apps and benefits from the recovery mechanism. To facilitate future research, we have made HmTest open-source at https://github.com/sqlab-sustech/hmtest and provided a video demo at https://jcst.ict.ac.cn/news/361.


Author Profile
Yi-Ge Chen (陈一戈)

Research Institute of Trustworthy Autonomous Systems Southern University of Science and Technology Shenzhen 518000 China

Andorra
Author Profile
Yu-Jia Fan (樊宇佳)

Department of Computer Science and Engineering Southern University of Science and Technology Shenzhen 518000 China

Andorra
Author Profile
Si-Nan Wang (王斯南)

Research Institute of Trustworthy Autonomous Systems Southern University of Science and Technology Shenzhen 518000 China

Andorra

📄 논문 정보

발행 연도 2025년
인용수 0
출판 국가 Andorra
사이트 Springer
좋아요 수 0

연관 논문 목록 (84건)