Skill-Adpative Imitation Learning for UI Test Reuse

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wu, Mengzhou, Wang, Hao, Ren, Jun, Cao, Yuan, Li, Yuetong, Jiang, Alex, Ran, Dezhi, Hu, Yitao, Yang, Wei, Xie, Tao
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916402737184768
author Wu, Mengzhou
Wang, Hao
Ren, Jun
Cao, Yuan
Li, Yuetong
Jiang, Alex
Ran, Dezhi
Hu, Yitao
Yang, Wei
Xie, Tao
author_facet Wu, Mengzhou
Wang, Hao
Ren, Jun
Cao, Yuan
Li, Yuetong
Jiang, Alex
Ran, Dezhi
Hu, Yitao
Yang, Wei
Xie, Tao
contents To alleviate the substantial cost of manually crafting user interface (UI) test cases, UI test migration aims to automatically generate test cases for a target mobile application (app) by adapting those from a source app that shares similar functionalities. Traditionally, this process has been approached as a sequential UI-event-mapping problem, where events in the source app are mapped to those in the target one based on their textual descriptions. Prior research has extensively focused on enhancing the event-mapping accuracy of NLP models. Although the advent of large language models (LLMs) with impressive NLP capabilities suggests the potential for near-perfect event-mapping, our study demonstrates that even the highly accurate event-mapping of LLMs is insufficient to address the implementation discrepancies between the source and the target apps, reducing the overall effectiveness of LLM-driven solutions for UI test migration. To address this challenge, in this paper, we propose SAIL, a skill-adaptive imitation learning framework designed to enhance the effectiveness of UI test migration through two key designs. First, SAIL leverages the source test cases as demonstrations and employs a multi-level abstraction of test cases' underlying skills, so as to extract the testing information from source test cases as the knowledge base for the subsequent test generation on the target app. Second, SAIL selectively reuses a subset of the learned skills to guide the generation of test cases for the target app with its novel context- and history-aware skill adaptation. While SAIL can be instantiated with any imitation learning techniques, we utilize the in-context learning capabilities of LLMs to instantiate SAIL. Evaluations results show that SAIL substantially improves the effectiveness of UI test migration, with 149\% higher success rate than state-of-the-art approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2409_13311
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Skill-Adpative Imitation Learning for UI Test Reuse
Wu, Mengzhou
Wang, Hao
Ren, Jun
Cao, Yuan
Li, Yuetong
Jiang, Alex
Ran, Dezhi
Hu, Yitao
Yang, Wei
Xie, Tao
Software Engineering
To alleviate the substantial cost of manually crafting user interface (UI) test cases, UI test migration aims to automatically generate test cases for a target mobile application (app) by adapting those from a source app that shares similar functionalities. Traditionally, this process has been approached as a sequential UI-event-mapping problem, where events in the source app are mapped to those in the target one based on their textual descriptions. Prior research has extensively focused on enhancing the event-mapping accuracy of NLP models. Although the advent of large language models (LLMs) with impressive NLP capabilities suggests the potential for near-perfect event-mapping, our study demonstrates that even the highly accurate event-mapping of LLMs is insufficient to address the implementation discrepancies between the source and the target apps, reducing the overall effectiveness of LLM-driven solutions for UI test migration. To address this challenge, in this paper, we propose SAIL, a skill-adaptive imitation learning framework designed to enhance the effectiveness of UI test migration through two key designs. First, SAIL leverages the source test cases as demonstrations and employs a multi-level abstraction of test cases' underlying skills, so as to extract the testing information from source test cases as the knowledge base for the subsequent test generation on the target app. Second, SAIL selectively reuses a subset of the learned skills to guide the generation of test cases for the target app with its novel context- and history-aware skill adaptation. While SAIL can be instantiated with any imitation learning techniques, we utilize the in-context learning capabilities of LLMs to instantiate SAIL. Evaluations results show that SAIL substantially improves the effectiveness of UI test migration, with 149\% higher success rate than state-of-the-art approaches.
title Skill-Adpative Imitation Learning for UI Test Reuse
topic Software Engineering
url https://arxiv.org/abs/2409.13311