arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.21263cs.SE
收藏

从自然语言到可执行属性:用于移动应用基于属性测试的可执行属性

From Natural Language to Executable Properties for Property-based Testing of Mobile Apps

East China Normal University(华东师范大学);University of Electronic Science and Technology of China(电子科技大学);Nanjing University(南京大学);ETH Zurich(苏黎世联邦理工学院)

Yiheng Xiong, Ting Su, Jingling Sun, Jue Wang, Qin Li, Geguang Pu, Zhendong Su

AI总结:

本文提出了一种新的结构化属性合成方法,将自然语言属性描述自动转换为可执行属性,并通过iPBT工具验证,展示了其在提升测试效率和鲁棒性方面的贡献。

摘要:

属性基于测试(PBT)是一种流行的软件测试方法,有效验证移动应用的功能。然而,其实际应用受限于手动工作和技术专家需求。本文提出了一种新的结构化属性合成方法,将自然语言属性描述自动转换为可执行属性,并在iPBT工具中实现。该方法分解为UI语义基础和可执行属性合成。首先通过多模态LLM构建丰富的widget上下文,对视觉元素与功能语义对齐;然后利用具有上下文学习的LLM生成框架特定的可执行属性。通过封闭源LLM(GPT-4o)和开源LLM(DeepSeek-V3)在124个多样化的属性描述上评估iPBT,iPBT在两者上均达到95.2%的准确性。值得注意的是,消融研究显示,丰富的widget上下文贡献了20.2%的绝对提升(从75.0%到95.2%)。10名参与者的用户研究显示,iPBT将编写可执行属性的时间减少了56%,表明显著降低的手动工作。此外,对1,180种语言多样化的变体评估显示iPBT的鲁棒性(87.6%的准确性),表明其处理各种表达的能力。

英文摘要:

Property-based testing (PBT) is a popular software testing methodology and is effective in validating the functionality of mobile applications (apps for short). However, its adoption in practice remains limited, largely due to the manual effort and technical expertise required to specify executable properties. In this experience paper, we propose a novel structured property synthesis approach that automatically translates property descriptions in natural language into executable properties, and implement it in a tool named iPBT. Our approach decomposes the problem into UI semantic grounding and executable property synthesis. It first builds an enriched widget context via multimodal LLMs to align visual elements with their functional semantics, and then uses an LLM with in-context learning to generate framework-specific executable properties. We evaluate iPBT with a closed-source LLM (GPT-4o) and an open-source LLM (DeepSeek-V3) on 124 diverse property descriptions derived from an existing benchmark dataset. iPBT achieves 95.2% (118/124) accuracy on both LLMs. Notably, an ablation study reveals that the enriched widget context contributes to an absolute improvement of up to 20.2% (from 75.0% to 95.2%). A user study with 10 participants demonstrates that iPBT reduces the time required to write executable properties by 56%, suggesting substantially lower manual effort. Furthermore, evaluations on 1,180 linguistically diverse variations demonstrate iPBT's robustness (87.6% accuracy), indicating its capability to handle varied expressions.

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

↑