Enabling Cost-Effective UI Automation Testing with Retrieval-Based LLMs: A Case Study in WeChat

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Feng, Sidong, Lu, Haochuan, Jiang, Jianqin, Xiong, Ting, Huang, Likun, Liang, Yinglin, Li, Xiaoqin, Deng, Yuetang, Aleti, Aldeida
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913498542374912
author Feng, Sidong
Lu, Haochuan
Jiang, Jianqin
Xiong, Ting
Huang, Likun
Liang, Yinglin
Li, Xiaoqin
Deng, Yuetang
Aleti, Aldeida
author_facet Feng, Sidong
Lu, Haochuan
Jiang, Jianqin
Xiong, Ting
Huang, Likun
Liang, Yinglin
Li, Xiaoqin
Deng, Yuetang
Aleti, Aldeida
contents UI automation tests play a crucial role in ensuring the quality of mobile applications. Despite the growing popularity of machine learning techniques to generate these tests, they still face several challenges, such as the mismatch of UI elements. The recent advances in Large Language Models (LLMs) have addressed these issues by leveraging their semantic understanding capabilities. However, a significant gap remains in applying these models to industrial-level app testing, particularly in terms of cost optimization and knowledge limitation. To address this, we introduce CAT to create cost-effective UI automation tests for industry apps by combining machine learning and LLMs with best practices. Given the task description, CAT employs Retrieval Augmented Generation (RAG) to source examples of industrial app usage as the few-shot learning context, assisting LLMs in generating the specific sequence of actions. CAT then employs machine learning techniques, with LLMs serving as a complementary optimizer, to map the target element on the UI screen. Our evaluations on the WeChat testing dataset demonstrate the CAT's performance and cost-effectiveness, achieving 90% UI automation with $0.34 cost, outperforming the state-of-the-art. We have also integrated our approach into the real-world WeChat testing platform, demonstrating its usefulness in detecting 141 bugs and enhancing the developers' testing process.
format Preprint
id arxiv_https___arxiv_org_abs_2409_07829
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enabling Cost-Effective UI Automation Testing with Retrieval-Based LLMs: A Case Study in WeChat
Feng, Sidong
Lu, Haochuan
Jiang, Jianqin
Xiong, Ting
Huang, Likun
Liang, Yinglin
Li, Xiaoqin
Deng, Yuetang
Aleti, Aldeida
Software Engineering
UI automation tests play a crucial role in ensuring the quality of mobile applications. Despite the growing popularity of machine learning techniques to generate these tests, they still face several challenges, such as the mismatch of UI elements. The recent advances in Large Language Models (LLMs) have addressed these issues by leveraging their semantic understanding capabilities. However, a significant gap remains in applying these models to industrial-level app testing, particularly in terms of cost optimization and knowledge limitation. To address this, we introduce CAT to create cost-effective UI automation tests for industry apps by combining machine learning and LLMs with best practices. Given the task description, CAT employs Retrieval Augmented Generation (RAG) to source examples of industrial app usage as the few-shot learning context, assisting LLMs in generating the specific sequence of actions. CAT then employs machine learning techniques, with LLMs serving as a complementary optimizer, to map the target element on the UI screen. Our evaluations on the WeChat testing dataset demonstrate the CAT's performance and cost-effectiveness, achieving 90% UI automation with $0.34 cost, outperforming the state-of-the-art. We have also integrated our approach into the real-world WeChat testing platform, demonstrating its usefulness in detecting 141 bugs and enhancing the developers' testing process.
title Enabling Cost-Effective UI Automation Testing with Retrieval-Based LLMs: A Case Study in WeChat
topic Software Engineering
url https://arxiv.org/abs/2409.07829