arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.13311cs.SE
收藏

面向UI测试复用的技能自适应模仿学习

Skill-Adaptive Imitation Learning for UI Test Reuse

Peking University(北京大学);UC Berkeley(加州大学伯克利分校);University of Texas at Dallas(德克萨斯大学达拉斯分校);The University of Chicago(芝加哥大学);Shanghai High School International Division(上海中学国际部);Key Lab of HCST (PKU), MOE(北京大学计算机科学与技术系;教育部高性能计算技术重点实验室);SCS, Peking University

Mengzhou Wu, Hao Wang, Jun Ren, Yuan Cao, Yuetong Li, Alex Jiang, Dezhi Ran, Yitao Hu, Wei Yang, Tao Xie

AI总结:

针对UI测试迁移中事件映射不足以解决实现差异的问题,提出SAIL技能自适应模仿学习框架,通过多层次技能抽象和上下文历史感知的技能重用,利用LLM实例化,成功率提升149%。

摘要:

为缓解手工编写用户界面(UI)测试用例的高昂成本,UI测试迁移旨在通过适配具有相似功能的目标移动应用(app)的测试用例,自动生成目标应用的测试用例。传统上,这一过程被视为一个顺序的UI事件映射问题,即根据源应用中的事件与目标应用中事件的文本描述进行映射。先前的研究广泛关注于提升NLP模型的事件映射准确性。尽管具备强大NLP能力的大型语言模型(LLMs)的出现预示着近乎完美的事件映射潜力,但我们的研究表明,即使LLMs的事件映射高度准确,也不足以解决源应用与目标应用之间的实现差异,从而降低了基于LLM的UI测试迁移解决方案的整体有效性。为解决这一挑战,本文提出了SAIL,一个技能自适应模仿学习框架,通过两个关键设计来增强UI测试迁移的有效性。首先,SAIL利用源测试用例作为示范,并采用测试用例底层技能的多层次抽象,从而从源测试用例中提取测试信息,作为后续在目标应用上生成测试的知识库。其次,SAIL选择性地重用所学技能的子集,通过其新颖的上下文和历史感知技能自适应来指导目标应用测试用例的生成。虽然SAIL可以实例化为任何模仿学习技术,我们利用LLMs的上下文学习能力来实例化SAIL。评估结果表明,SAIL显著提升了UI测试迁移的有效性,成功率比最先进的方法高出149%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑