Table of Contents
Fetching ...

Test2VA: Reusing GUI Test Cases for Voice Assistant Features Development in Mobile Applications

Garrett Weaver, Xue Qin

TL;DR

Test2VA addresses the challenge of embedding voice assistant capabilities into existing mobile apps by reusing an app's GUI test scripts to automatically generate VA task methods. It introduces a mutation-based Dynamic Mutant Detector to identify mutable GUI events and a Task Method Generator to produce general, parameterized VA methods, backed by a Testing Script Parser that translates test scripts into a uniform representation. In an evaluation across eight real-world Android apps and 48 test cases, Test2VA achieves a mutable-event detection rate of $75.68\%$ and generates $33$ robust VA methods, with most executions passing manual validation. The approach reduces developer workload, enables maintainable VA code derived from GUI tests, and is released for open access, highlighting a path toward scalable VA development for millions of apps.

Abstract

Voice Assistant (VA) in smartphones has become very popular with millions of users nowadays. A key trend is the rise of custom VA embedding, which enables users to perform the customized tasks of their favorite app through voice control. However, with such a great demand, little effort has been made to support app developers in VA development. Moreover, many user-oriented VA control approaches even increase the programming burden on developers. To reduce the workload and improve code efficiency, in this paper, we propose a novel approach, Test2VA, that reuses the test code of an application to support its VA development. Specifically, Test2VA extracts the task completion pattern from the GUI test code and then generates an execution method to perform the same task in general. To identify the pattern, Test2VA uses a mutation-based exploration to detect the mutable GUI event in the test case and later parameterize it in the VA method. We conducted an evaluation on 48 test cases from eight real-world applications. The results show that Test2VA correctly detects 75.68% of the mutable events from 48 original test cases and then generates 33 methods and have them successfully executed and manually examined.

Test2VA: Reusing GUI Test Cases for Voice Assistant Features Development in Mobile Applications

TL;DR

Test2VA addresses the challenge of embedding voice assistant capabilities into existing mobile apps by reusing an app's GUI test scripts to automatically generate VA task methods. It introduces a mutation-based Dynamic Mutant Detector to identify mutable GUI events and a Task Method Generator to produce general, parameterized VA methods, backed by a Testing Script Parser that translates test scripts into a uniform representation. In an evaluation across eight real-world Android apps and 48 test cases, Test2VA achieves a mutable-event detection rate of and generates robust VA methods, with most executions passing manual validation. The approach reduces developer workload, enables maintainable VA code derived from GUI tests, and is released for open access, highlighting a path toward scalable VA development for millions of apps.

Abstract

Voice Assistant (VA) in smartphones has become very popular with millions of users nowadays. A key trend is the rise of custom VA embedding, which enables users to perform the customized tasks of their favorite app through voice control. However, with such a great demand, little effort has been made to support app developers in VA development. Moreover, many user-oriented VA control approaches even increase the programming burden on developers. To reduce the workload and improve code efficiency, in this paper, we propose a novel approach, Test2VA, that reuses the test code of an application to support its VA development. Specifically, Test2VA extracts the task completion pattern from the GUI test code and then generates an execution method to perform the same task in general. To identify the pattern, Test2VA uses a mutation-based exploration to detect the mutable GUI event in the test case and later parameterize it in the VA method. We conducted an evaluation on 48 test cases from eight real-world applications. The results show that Test2VA correctly detects 75.68% of the mutable events from 48 original test cases and then generates 33 methods and have them successfully executed and manually examined.
Paper Structure (24 sections, 2 equations, 6 figures, 3 tables, 2 algorithms)

This paper contains 24 sections, 2 equations, 6 figures, 3 tables, 2 algorithms.

Figures (6)

  • Figure 1: Motivation Example of Android Application Another notes app
  • Figure 2: Test2VA Approach Overview
  • Figure 3: A Parsed Test Script Event
  • Figure 4: Candidate Selection of event $e_3$ and $e_4$
  • Figure 5: method of Task 1
  • ...and 1 more figures