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

实用、自动化的基于场景的移动应用测试

Practical, Automated Scenario-based Mobile App Testing

Shengcheng Yu, Chunrong Fang, Mingzhe Du, Zimin Ding, Zhenyu Chen, Zhendong Su

AI总结:

本文提出ScenTest方法,通过GUI图像理解构建事件知识图谱(EKG),将领域知识融入基于场景的移动应用测试,首次实现目标场景的全自动化测试生成,并能揭示80多个真实缺陷。

摘要:

随着移动互联网的快速发展,移动应用(app)质量保障的重要性日益提升。自动化测试生成方法作为应用质量保障的主导方向,遵循特定的模型或策略,以优化代码覆盖率为目标。这类方法导致测试执行与应用业务逻辑之间存在巨大差距。由人工测试人员开发的测试脚本通过聚焦于测试场景来考虑业务逻辑。由于移动应用具有GUI密集型特征,人工测试人员总是通过理解应用GUI来组织面向场景的测试脚本。这启发我们利用来自应用GUI理解的领域知识进行基于场景的测试生成。在本文中,我们提出了一种新颖的方法ScenTest,通过GUI图像理解并利用事件知识图谱(EKG)进行基于场景的移动应用测试。ScenTest尝试通过模仿人工实践并将领域知识集成到基于场景的移动应用测试中来自动启动测试,首次实现了对目标测试场景的全自动化测试。ScenTest从众包测试报告中提取四类实体和五类对应关系,这些报告中呈现了测试事件和应用GUI信息,并为特定场景构建EKG。然后,ScenTest在EKG的指导下,结合应用当前状态和测试上下文的综合考量,在不同应用上针对特定场景进行测试生成。我们从不同方面对ScenTest进行了评估。结果表明,基于EKG的ScenTest测试生成是有效的,与代表性基线相比,ScenTest能够在特定场景中揭示80多个不同的真实世界缺陷。

英文摘要:

The importance of mobile application (app) quality insurance is increasing with the rapid development of the mobile Internet. Automated test generation approaches, as a dominant direction of app quality insurance, follow specific models or strategies, targeting at optimizing the code coverage. Such approaches lead to a huge gap between testing execution and app business logic. Test scripts developed by human testers consider business logic by focusing on testing scenarios. Due to the GUI-intensive feature of mobile apps, human testers always understand app GUI to organize test scripts for scenarios. This inspires us to utilize domain knowledge from app GUI understanding for scenario-based test generation. In this paper, we propose a novel approach, ScenTest, for scenario-based mobile app testing with event knowledge graph (EKG) via GUI image understanding. ScenTest tries to start automated testing by imitating human practices and integrating domain knowledge into scenario-based mobile app testing, realizing fully automated testing on target testing scenarios for the first time. ScenTest extracts four kinds of entities and five kinds of corresponding relationships from crowdsourced test reports, where the test events and app GUI information are presented, and constructs the EKGs for specific scenarios. Then, ScenTest conducts test generation for specific scenarios on different apps with the guidance of EKG with the combination consideration of app current state and testing context. We conduct an evaluation on ScenTest on different aspects. The results show that the test generation of ScenTest on the basis of EKG is effective, and ScenTest can reveal 80+ distinct real-world bugs in specific scenarios compared with representative baselines.

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

↑