EFSM Model-Based Testing for Android Applications
-
Published:2023-12-20
Issue:
Volume:
Page:1-25
-
ISSN:0218-1940
-
Container-title:International Journal of Software Engineering and Knowledge Engineering
-
language:en
-
Short-container-title:Int. J. Soft. Eng. Knowl. Eng.
Author:
Wang Weiwei12ORCID,
Guo Junxia1ORCID,
Li Beite1ORCID,
Shang Ying1ORCID,
Zhao Ruilian1ORCID
Affiliation:
1. College of Information Science and Technology, Beijing University of Chemical Technology, Beijing 100029, P. R. China
2. College of Information Engineering, Beijing Institute of Petrochemical Technology, Daxing District, Beijing 102699, P. R. China
Abstract
Model-based testing provides an effective means for ensuring the quality of Android apps. Nevertheless, existing models that focus on event sequences and abstract them into Finite State Machines (FSMs) may lack precision and determinism because of the different data values of events that can result in various states of Android applications. To address this issue, a novel model based on Extended Finite State Machines (EFSMs) for Android apps is proposed in this paper. The approach leverages machine learning to infer data constraints on events and annotates them on state transitions, leading to a more precise and deterministic model. Additionally, a state abstraction strategy is presented to further refine the model. Besides, test diversity plays a vital role in enhancing test suite effectiveness. To achieve high coverage and fault detection, test cases are generated from the EFSM model with the help of a Genetic Algorithm (GA), guided by test diversity. To evaluate the effectiveness of our approach, this paper carries out experiments on 93 open-source apps. The results show that our approach performs better in code coverage and crash detection than the existing open-source model-based testing tools. Particularly, the 19 unique crashes that involve complex data constraints are detected by our approach.
Funder
National Natural Science Foundation of China
Publisher
World Scientific Pub Co Pte Ltd
Subject
Artificial Intelligence,Computer Graphics and Computer-Aided Design,Computer Networks and Communications,Software