首页> 外文期刊>Science of Computer Programming >Efficient testing of GUI applications by event sequence reduction
【24h】

Efficient testing of GUI applications by event sequence reduction

机译:通过事件序列减少有效地测试GUI应用

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

Automatic event sequence generation tools are widely used for testing GUI applications. With these tools, developers can easily test the target GUI applications with a large number of events and collect a group of crash-triggering sequences in a short time. However, some efficiency-oriented tools generate low-level events randomly based on coordinates of the screen instead of widgets, which leads to many ineffective events that have no contribution to the test. Besides, the randomly generated sequences may repeatedly operate on the same widget or jump to the same window, which increases the complexity of sequences and makes it difficult to extract key events that can lead to crashes. The sequence reduction technique can effectively help developers to understand the crashes and further improve the quality of code. In this paper, we propose a general model for the event sequence reduction problem on GUI applications. For better illustration, we take the random test generation tool Monkey as a concrete instance, which is widely used for testing Android applications, owing to its simplicity, effectiveness and good compatibility. To address the major drawbacks in original Monkey testing, in this paper, we attempt to enhance Monkey to support the sequence record-and-replay and propose a sequence reduction approach for Android apps, which helps the crash behavior comprehension and fault localization. By manually investigating the effectiveness of Monkey events, we find three types of ineffective events, including no-ops, single and combination of effect-free ones, and design nine reduction rules for them. To extract key events in one sequence for crash understanding, we analyze the state transition relation among events and propose a static GUI state hierarchy-tree-guided reduction approach. Additionally, we implement our approach in a tool CHARD to achieve event sequence reduction on real-world apps. We also design a semi-structured format to describe the actual behavior of events and improve the sequence comprehensibility. We collect 890 sequences from 74 applications as our benchmark, including 740 basic sequences, each of which contains 1,000 events, and 150 longer ones, each of which contains 10,000 events. CHARD can quickly identify 41.3% events as ineffective ones in the collected sequences. For sequences that can be stably replayed, over 94% of the reduced sequences keep the same functionalities as the original ones. By removing ineffective events, CHARD can be used as a pre-process part of the traditional delta-debugging process and make significant speed up. To evaluate the effectiveness of the key event extraction approach, we pick eight buggy applications and collect 40 crash-triggering event sequences generated by Monkey, the length of which varies from 19 to 2700. The results show that CHARD can successfully remove over 95.4% crash-irrelevant events in these crash-triggering sequences within around ten seconds, while the state-of-the-art delta-debugging tool removes 71.3% ones using over 27 hours, which indicates that CHARD can efficiently help the crash replay and sequence comprehension.
机译:自动事件序列生成工具广泛用于测试GUI应用程序。通过这些工具,开发人员可以轻松测试具有大量事件的目标GUI应用程序,并在短时间内收集一组崩溃触发序列。然而,某些效率导向的工具基于屏幕的坐标而不是小部件随机生成低级事件,这导致许多对测试没有贡献的许多无效事件。此外,随机生成的序列可以在同一小部件​​上重复操作或跳转到同一窗口,这增加了序列的复杂性,并且难以提取可能导致崩溃的关键事件。序列减少技术可以有效帮助开发人员理解崩溃并进一步提高代码的质量。在本文中,我们提出了一个关于GUI应用程序的事件序列缩减问题的一般模型。为了更好地说明,我们将随机测试生成工具猴作为一个具体实例,广泛用于测试Android应用,因为它的简单性,有效性和良好的兼容性。为了解决原始猴子测试中的主要缺点,在本文中,我们试图增强猴子以支持序列记录和重放,并提出一个用于Android应用程序的序列减少方法,这有助于崩溃行为理解和故障本地化。通过手动调查猴子事件的有效性,我们发现三种类型的无效事件,包括无效的无效和无效的效果和组合,并为它们设计九个减少规则。为了以一个顺序提取关键事件以进行碰撞理解,我们分析事件之间的状态转换关系,并提出了一种静态GUI状态层级 - 树引导的方法。此外,我们在工具摘录中实现了我们的方法,以实现现实世界应用程序的事件序列。我们还设计了一种半结构化格式来描述事件的实际行为,提高序列可理解性。我们将890个序列从74个应用程序收集为我们的基准测试,包括740个基本序列,其中每个基本序列包含1,000个事件,以及150个更长的事件,其中每个事件包含10,000个事件。 Chard可以在收集的序列中快速识别41.3%的事件,无效。对于可以稳定重放的序列,超过94%的减少序列保持与原始功能相同的功能。通过删除无效的事件,可以将Chard用作传统的Delta调试过程的预处理部分并进行显着加速。为了评估关键事件提取方法的有效性,我们选择了八个错误的应用程序并收集了猴子生成的40个崩溃触发事件序列,其长度从19到2700变化。结果表明,Chard可以成功地移除超过95.4%的崩溃 - 在十秒钟内的这些崩溃触发序列中的rirelelevant事件,而最先进的Δ调试工具使用超过27小时删除71.3%的序列,这表明Chard可以有效地帮助碰撞重放和序列理解。

著录项

  • 来源
    《Science of Computer Programming》 |2021年第1期|102522.1-102522.25|共25页
  • 作者单位

    Technology Center of Software Engineering Institute of Software Chinese Academy of Sciences China University of Chinese Academy of Sciences China;

    Technology Center of Software Engineering Institute of Software Chinese Academy of Sciences China University of Chinese Academy of Sciences China;

    State Key Laboratory of Computer Science Institute of Software Chinese Academy of Sciences China University of Chinese Academy of Sciences China;

    State Key Laboratory of Computer Science Institute of Software Chinese Academy of Sciences China;

    State Key Laboratory of Computer Science Institute of Software Chinese Academy of Sciences China;

    Technology Center of Software Engineering Institute of Software Chinese Academy of Sciences China State Key Laboratory of Computer Science Institute of Software Chinese Academy of Sciences China University of Chinese Academy of Sciences China;

    State Key Laboratory of Computer Science Institute of Software Chinese Academy of Sciences China University of Chinese Academy of Sciences China;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    GUI testing; Test reduction; Record-and-replay; Android application; Monkey;

    机译:GUI测试;试验;记录和重播;Android应用程序;猴;

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号