This is the instruction for the paper AndroidExplore: Testing Android App with Curiosity-Driven Reinforcement Learning for ICSE.
This project requires Python, Xposed, UIAutomator2 and Jacoco, and it was tested on the following versions:
Python 3.8
Xposed 3.1.1
UIAutomator2 2.16.19
Jacoco 0.8.10
We run project "Dump" and applications in Android Studio. More details about installation steps can be found at: https://developer.android.google.cn/codelabs/basic-android-kotlin-compose-install-android-studio
We run project "Q_Learning" in PyCharm. More details about installation steps can be found at: https://www.jetbrains.com/help/pycharm/installation-guide.html
We install "Dump" and apps in Android emulator. More details about installation steps can be found at: https://www.memuplay.com/support.html. The emulator needs to have Xposed installed in order for the "Dump" module to work.
- Open the "Dump" app and the application under test and start the "Dump" module in Xposed.
- Forward the data from port 8888 on PC to port 8888 on Android.
adb forward tcp:8888 tcp:8888
- Enter the necessary parameter AUT (i.e. the package name of the tested app) in
/Q_Learning/main/DataBase.py
. - Run
/Q_Learning/main/run_this.py
to start the test.
adb pull /sdcard/appName.ec destination_address\\appName.ec
java -jar jacococli.jar report appName.ec --classfiles classfile_directory --sourcefiles sourcefile_directory --html report_html
The code coverage result in file "index.html" of "report_html"
We collect system-level failures from Android Studio console. It is important to note that in cases where the system has lower robustness, user-level failures may also lead to system-level failures. For example, if user-level failures are effectively handled (e.g., through rigorous input field validation), system-level failures do not occur. Otherwise, AndroidExplore triggers and captures these failures. It's worth emphasizing that all failures reported in the console are manually inspected to ensure that the thrown exceptions and errors are real failures.
Hidden due to paper submission.