通过业务逻辑提取与适应的上下文感知功能测试生成
LogiDroid: Individual Functional Test Generation via Business Logic Extraction and Adaptation
AI总结:
LogiDroid通过业务逻辑提取与适应,实现上下文感知的功能测试生成,显著提升测试用例生成效率。
摘要:
功能测试对于验证移动应用的业务逻辑与用户需求一致至关重要,是软件开发中质量保证的主要方法。尽管其重要性,功能测试仍然严重依赖于手动努力,由于两个核心挑战。首先,从非结构化需求中获取和重用复杂的业务逻辑仍然困难,这阻碍了特定功能的理解。其次,当将业务逻辑适应到多样的GUI环境时,存在显著的语义差距,这阻碍了特定移动应用的测试用例生成。为了解决上述挑战,我们提出LogiDroid,一种两阶段方法,通过提取业务逻辑并适应到目标应用来生成个体功能测试用例。首先,在知识检索与融合阶段,我们构建数据集以检索相关案例并提取目标功能的业务逻辑。其次,在上下文感知的测试生成阶段,LogiDroid联合分析提取的业务逻辑和实时的GUI环境以生成功能测试用例。这种设计使LogiDroid能够准确理解应用程序语义,并利用领域专业知识生成带有验证断言的完整测试用例。我们通过两个广泛使用的数据集评估LogiDroid的有效性,这些数据集涵盖了28个真实世界应用和190个功能需求。实验结果表明,LogiDroid在FrUITeR数据集上成功测试了40%的功能需求(相比最先进方法提高了超过48%),在Lin数据集上成功测试了65%的功能需求(相比最先进方法提高了超过55%)。这些结果展示了LogiDroid在功能测试生成中的显著有效性。
英文摘要:
Functional testing is essential for verifying that the business logic of mobile applications aligns with user requirements. Despite its importance, functional testing remains heavily dependent on manual effort due to two core challenges. First, acquiring and reusing business logic from unstructured requirements remains difficult, which hinders the understanding of specific functionalities. Second, a significant semantic gap exists when adapting business logic to the diverse GUI environments, which hinders the generation of test cases for specific mobile applications. To address the preceding challenges, we propose LogiDroid, a two-stage approach that generates individual functional test cases by extracting business logic and adapting it to target applications. First, in the Knowledge Retrieval and Fusion stage, two LLM-based agents are employed to construct a functional test dataset, retrieve relevant test cases, and extract structured business logic for the target functionality. Second, in the Context-Aware Test Generation stage, two other LLM-based agents jointly analyze the extracted business logic and the real time GUI environment to incrementally generate context adaptive functional test cases. This design allows LogiDroid to accurately understand application semantics and use domain expertise to generate complete test cases with verification assertions. We assess the effectiveness of LogiDroid using two widely-used datasets that cover 28 real-world applications and 190 functional requirements. Experimental results show that LogiDroid successfully tested 40% of functional requirements on the FrUITeR dataset (an improvement of over 25% compared to the state-of-the-art approaches) and 65% on the Lin dataset (an improvement of over 55% compared to the state-of-the-art approaches). These results demonstrate the significant effectiveness of LogiDroid in functional test generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。