Web testing has long been recognized as a notoriously difficult task. Even nowadays, web testing still heavily relies on manual efforts while automated web testing is far from achieving human-level performance. Key challenges in web testing include dynamic content update and deep bugs hiding under complicated user interactions and specific input values, which can only be triggered by certain action sequences in the huge search space. In this paper, we propose WebExplor, an automatic end-to-end web testing framework, to achieve an adaptive exploration of web applications. WebExplor adopts curiosity-driven reinforcement learning to generate high-quality action sequences (test cases) satisfying temporal logical relations. Besides, WebExplor incrementally builds an automaton during the online testing process, which provides high-level guidance to further improve the testing efficiency. We have conducted comprehensive evaluations of WebExplor on six real-world projects, a commercial SaaS web application, and performed an in-the-wild study of the top 50 web applications in the world. The results demonstrate that in most cases WebExplor can achieve a significantly higher failure detection rate, code coverage, and efficiency than existing state-of-the-art web testing techniques. WebExplor also detected 12 previously unknown failures in the commercial web application, which have been confirmed and fixed by the developers. Furthermore, our in-the-wild study further uncovered 3,466 exceptions and errors.
翻译:长期以来,人们一直认为网络测试是一项臭名昭著的困难任务。即使是现在,网络测试仍然严重依赖人工操作,而自动化网络测试远远没有达到人类层面的绩效。网络测试的主要挑战包括动态内容更新和隐藏在复杂的用户互动和特定输入值下的深度错误,这只能由巨大的搜索空间中某些行动序列触发。在本文中,我们提议了一个自动端对端的网络测试框架WebExplor,即自动端对端的网络测试框架,以实现对网络应用的适应性探索。 WebExplor采用由好奇驱动的强化学习,以产生高质量的行动序列(测试案例),满足时间逻辑关系。此外,WebExplor在在线测试过程中逐步建立一个自动地图,为进一步提高测试效率提供高级指导。我们对六个现实世界项目(一个商业SaaS网络应用程序)的网络开发者进行了全面评估,并对世界上50个顶级的网络应用软件进行了全局性研究。结果显示,在大多数情况下,WebExplorld能够比现有的州级网络测试程序(代码覆盖范围)更高得多,效率也比现有的网络测试失败。我们以往的固定的网络测试系统测试和秘密的失败。