Comparative Study on Code Complexity Metric to Guide Action Selection of Automated GUI Testing based on Q-Learning Algorithm

Authors

  • Nor Hayati Abd Razak Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia
  • Salmi Baharom Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia
  • Goh Kwang Yi Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia

DOI:

https://doi.org/10.37934/sej.8.1.2336b

Keywords:

Android, automated GUI Testing, code complexity metrics, Q-learning

Abstract

Poor-quality mobile applications will disappoint users, resulting in their uninstallation of the applications. Due to mobile applications' event-driven and gesture-based nature, several researchers have proposed GUI testing as an alternative to system testing. Furthermore, since GUI testing calls for mimicking user actions on the application, automation is essential for replicating how humans would interact with the GUI widgets. The observe-select-execute strategy is used in automated GUI testing tools to observe all GUI actions in their current state, select one, and execute it. In the observe-select-execute strategy, few researchers have proposed a Q-Learning algorithm to guide the exploration of GUIs. However, the exploration solely looks at the least frequent action without considering the action's potential ability to detect failures. We propose a method that compares actions by their weight to improve GUIs exploration, leading to effectively detecting crashes and achieving a higher code coverage. This paper describes a comparative study of code complexity metrics to identify the potential action. The results statistically demonstrate that the code complexity metric can improve the exploration of GUIs based on the percentage of AUT code coverage collected. The combination of RFC and CYC metrics outperforms the other four metrics under comparison

Author Biographies

Nor Hayati Abd Razak, Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia

hayati.razak@gmail.com

Salmi Baharom, Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia

salmi@upm.edu.my

Goh Kwang Yi, Faculty of Engineering Technology, Universiti Tun Hussein Onn Malaysia, Pagoh Campus KM 1, Jln Panchor, 86400 Pagoh, Johor, Malaysia

gohkwangyi@gmail.com

Downloads

Published

2025-05-09

Issue

Section

Articles