arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1911.05403cs.SEcs.AIcs.LG
收藏

基于形式化规范的Android GUI应用强化学习驱动测试生成

Reinforcement Learning-Driven Test Generation for Android GUI Applications using Formal Specifications

Bogazici University(博阿齐奇大学)

Yavuz Koroglu, Alper Sen

摘要:

针对移动图形用户界面(GUI)应用的自动测试生成已经有了很多研究。这些研究成功地演示了如何检测致命异常,并实现高代码和活动覆盖率与全自动测试生成引擎。然而,目前还不清楚这些引擎能够测试多少GUI功能。此外,这些引擎只实现隐式测试预言机。本文提出了一种基于强化学习驱动规范的Android测试生成器(FARLEAD-Android)。FARLEAD-Android接受GUI级别的形式化规范作为线性时间时态逻辑(LTL)公式。通过动态执行被测应用程序(AUT),它学习如何使用强化学习(RL)生成满足LTL公式的测试。LTL公式不仅指导测试生成,而且还充当指定的测试预言机,使开发人员能够通过更改公式为各种GUI功能定义自动化测试预言机。我们的评估表明,FARLEAD-Android在为指定的GUI功能生成测试方面比三种已知的方法(Random,Monkey和QBEa)更有效,并且性能更高。据我们所知,FARLEAD-Android是第一个使用正式规范的全自动移动GUI测试引擎。

英文摘要:

There have been many studies on automated test generation for mobile Graphical User Interface (GUI) applications. These studies successfully demonstrate how to detect fatal exceptions and achieve high code and activity coverage with fully automated test generation engines. However, it is unclear how many GUI functions these engines manage to test. Furthermore, these engines implement only implicit test oracles. We propose Fully Automated Reinforcement LEArning-Driven Specification-Based Test Generator for Android (FARLEAD-Android). FARLEAD-Android accepts a GUI-level formal specification as a Linear-time Temporal Logic (LTL) formula. By dynamically executing the Application Under Test (AUT), it learns how to generate a test that satisfies the LTL formula using Reinforcement Learning (RL). The LTL formula does not just guide the test generation but also acts as a specified test oracle, enabling the developer to define automated test oracles for a wide variety of GUI functions by changing the formula. Our evaluation shows that FARLEAD-Android is more effective and achieves higher performance in generating tests for specified GUI functions than three known approaches, Random, Monkey, and QBEa. To the best of our knowledge, FARLEAD-Android is the first fully automated mobile GUI testing engine that uses formal specifications.

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

↑