Action-Based Test Carving for Android Apps

Alessio Gambi, Hemant Gouni, Daniel Berreiter, Vsevolod Tymofyeyev, Mattia Fazzini

Publikation: Beitrag in Buch/Bericht/KonferenzbandKonferenzbeitragBegutachtung

Abstract

The test suites of an Android app should take advantage of different types of tests including end-to-end tests, which validate user flows, and unit tests, which provide focused executions for debugging. App developers have two main options when creating unit tests: create unit tests that run on a device (either physical or emulated) or create unit tests that run on a development machine's Java Virtual Machine (JVM). Unit tests that run on a device are not really focused, as they use the full implementation of the Android framework. Moreover, they are fairly slow to execute, requiring the Android system as the runtime. Unit tests that run on the JVM, instead, are more focused and run more efficiently but require developers to suitably handle the coupling between the app under test and the Android framework. To help developers in creating focused unit tests that run on the JVM, we propose a novel technique called ARTISAN based on the idea of test carving. The technique (i) traces the app execution during end-to-end testing on Android devices, (ii) identifies focal methods to test, (iii) carves the necessary preconditions for testing those methods, (iv) creates suitable test doubles for the Android framework, and (v) synthesizes executable unit tests that can run on the JVM. We evaluated ARTISAN using 152 end-to-end tests from five apps and observed that ARTISAN can generate unit tests that cover a significant portion of the code exercised by the end-to-end tests (i.e., 45% of the starting statement coverage on average) and does so in a few minutes.

OriginalspracheEnglisch
TitelProceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2023
Herausgeber (Verlag)Institute of Electrical and Electronics Engineers Inc.
Seiten107-116
Seitenumfang10
ISBN (elektronisch)9798350333350
DOIs
PublikationsstatusVeröffentlicht - 20 Apr. 2023
Veranstaltung16th IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2023 - Dublin, Irland
Dauer: 16 Apr. 202320 Apr. 2023

Publikationsreihe

NameProceedings - 2023 IEEE 16th International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2023

Konferenz

Konferenz16th IEEE International Conference on Software Testing, Verification and Validation Workshops, ICSTW 2023
Land/GebietIrland
OrtDublin
Zeitraum16/04/2320/04/23

Fingerprint

Untersuchen Sie die Forschungsthemen von „Action-Based Test Carving for Android Apps“. Zusammen bilden sie einen einzigartigen Fingerprint.

Dieses zitieren