Introduction

Ensuring the quality of mobile applications is key to the ecological construction of mobile operating systems. The existing mobile application testing and analysis techniques commonly used in the industry (such as manual/script testing, static analysis techniques, interface testing techniques) have limitations such as high labor costs, weak error detection capabilities, and a lack of awareness of functional scenarios, making it difficult to automate the functionality testing of mobile applications. Therefore, how to achieve automated functional testing of mobile applications has always been a challenging issue.

Property-Based Testing (PBT) theory was proposed in the field of functional programming in 2000. This theoretical method uses the properties that the system under test should satisfy as test assertions, and verifies whether these properties hold true under various circumstances by automatically generating a large amount of random input data. Compared to traditional testing, property-based testing can efficiently and effectively cover the input space of the system under test and its boundary conditions, thus discovering deep-seated functional defects.

Kea is the first automated functional testing tool for mobile applications designed and developed based on property-based testing theory, currently supporting automated functional testing for Harmony (OpenHarmony/HarmonyOS) and Android applications. Kea has designed: (1) a property description language for mobile applications (which supports users in writing application functional properties primarily in the forms of preconditions, interaction scenarios, and postconditions), (2) three page exploration strategies: random traversal, main path-based traversal, and large model-guided path traversal (automatically generating event sequences to reach deeper states of the application, effectively covering the exploration space of mobile application events).