Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing

Researchers have proposed automated testing tools to minimise the effort and resources spent on testing GUIs. A relatively simple strategy employed by the proposed tools thus far is the observe-select-execute approach, where all of a GUI’s actions on its current state are observed, one action is...

Full description

Bibliographic Details
Main Author: Goh, Kwang Yi
Format: Thesis
Language:English
Published: 2023
Subjects:
Online Access:http://psasir.upm.edu.my/id/eprint/119867/
http://psasir.upm.edu.my/id/eprint/119867/1/119867.pdf
_version_ 1848868071993769984
author Goh, Kwang Yi
author_facet Goh, Kwang Yi
author_sort Goh, Kwang Yi
building UPM Institutional Repository
collection Online Access
description Researchers have proposed automated testing tools to minimise the effort and resources spent on testing GUIs. A relatively simple strategy employed by the proposed tools thus far is the observe-select-execute approach, where all of a GUI’s actions on its current state are observed, one action is selected, and the selected action is executed on the software. The strategy’s key function is to select an action that may achieve new and desirable GUI states. Due to difficulties in comparing actions, most existing test generators ignore this step and randomly select an action. However, a randomly selected action has limitations. It does not test most parts of a GUI within a reasonable amount of time and there is a high probability that the same actions are re-selected. This reduces code coverage, thereby resulting in undetected failures. To overcome this limitation, the Q-Learning algorithm was proposed by several researchers to minimise randomness. The idea was to change the probability distribution over the sequence space. Instead of making purely random selections, the least frequently executed action is selected so that the GUI can be further explored. Q-Learning improve the overall exploration strategy, but it also presented a weakness. Q-Learning’s reward function assigns the highest value to the least frequently executed action without taking into consideration its potential ability in detecting failures. Furthermore, the proposed techniques based on the QLearning algorithm do not consider context-based actions. Thus, these techniques are unable to detect failures that occur due to the improper use of context data, which is becoming an increasingly common issue in mobile applications nowadays. We enhanced the Q-Learning algorithm for action selection based on potential action abilities and proposed a tool, namely CrashDroid, that allows the automation of testing context-aware Android applications. We utilized the enhanced Q-Learning algorithm to compare actions, including context-based actions, to effectively achieve higher code coverage. An experiment was carried out, and the results collected were analyzed using a nonparametric statistical test, the Mann-Whitney U test, which indicates the level of significance between the distributions of data collection. The experimental results showed that CrashDroid, which employs the technique considering the code complexity of the action and the use of context data during the test, was more effective than the other automated Android testing tool, AutoDroid, which did not consider the mentioned metrics.
first_indexed 2025-11-15T14:46:34Z
format Thesis
id upm-119867
institution Universiti Putra Malaysia
institution_category Local University
language English
last_indexed 2025-11-15T14:46:34Z
publishDate 2023
recordtype eprints
repository_type Digital Repository
spelling upm-1198672025-10-09T04:17:48Z http://psasir.upm.edu.my/id/eprint/119867/ Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing Goh, Kwang Yi Researchers have proposed automated testing tools to minimise the effort and resources spent on testing GUIs. A relatively simple strategy employed by the proposed tools thus far is the observe-select-execute approach, where all of a GUI’s actions on its current state are observed, one action is selected, and the selected action is executed on the software. The strategy’s key function is to select an action that may achieve new and desirable GUI states. Due to difficulties in comparing actions, most existing test generators ignore this step and randomly select an action. However, a randomly selected action has limitations. It does not test most parts of a GUI within a reasonable amount of time and there is a high probability that the same actions are re-selected. This reduces code coverage, thereby resulting in undetected failures. To overcome this limitation, the Q-Learning algorithm was proposed by several researchers to minimise randomness. The idea was to change the probability distribution over the sequence space. Instead of making purely random selections, the least frequently executed action is selected so that the GUI can be further explored. Q-Learning improve the overall exploration strategy, but it also presented a weakness. Q-Learning’s reward function assigns the highest value to the least frequently executed action without taking into consideration its potential ability in detecting failures. Furthermore, the proposed techniques based on the QLearning algorithm do not consider context-based actions. Thus, these techniques are unable to detect failures that occur due to the improper use of context data, which is becoming an increasingly common issue in mobile applications nowadays. We enhanced the Q-Learning algorithm for action selection based on potential action abilities and proposed a tool, namely CrashDroid, that allows the automation of testing context-aware Android applications. We utilized the enhanced Q-Learning algorithm to compare actions, including context-based actions, to effectively achieve higher code coverage. An experiment was carried out, and the results collected were analyzed using a nonparametric statistical test, the Mann-Whitney U test, which indicates the level of significance between the distributions of data collection. The experimental results showed that CrashDroid, which employs the technique considering the code complexity of the action and the use of context data during the test, was more effective than the other automated Android testing tool, AutoDroid, which did not consider the mentioned metrics. 2023-07 Thesis NonPeerReviewed text en http://psasir.upm.edu.my/id/eprint/119867/1/119867.pdf Goh, Kwang Yi (2023) Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing. Masters thesis, Universiti Putra Malaysia. http://ethesis.upm.edu.my/id/eprint/18481 Software testing Mobile applications - Testing Machine learning - Applications
spellingShingle Software testing
Mobile applications - Testing
Machine learning - Applications
Goh, Kwang Yi
Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title_full Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title_fullStr Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title_full_unstemmed Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title_short Enhanced Q-Learning algorithm for potential actions selection in automated graphical user interface testing
title_sort enhanced q-learning algorithm for potential actions selection in automated graphical user interface testing
topic Software testing
Mobile applications - Testing
Machine learning - Applications
url http://psasir.upm.edu.my/id/eprint/119867/
http://psasir.upm.edu.my/id/eprint/119867/
http://psasir.upm.edu.my/id/eprint/119867/1/119867.pdf