Comparative Study on Code Complexity Metric to Guide Action Selection of Automated GUI Testing based on Q-Learning Algorithm
DOI:
https://doi.org/10.37934/sej.8.1.2336bKeywords:
Android, automated GUI Testing, code complexity metrics, Q-learningAbstract
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