Android apps must work correctly even if their execution is interrupted by external events. For instance, an app must work properly even if a phone call is received, or after its layout is redrawn because the smartphone has been rotated. Since these events may require destroying, when the execution is interrupted, and recreating, when the execution is resumed, the foreground activity of the app, the only way to prevent the loss of state information is saving and restoring it. This behavior must be explicitly implemented by app developers, who often miss to implement it properly, releasing apps affected by data loss problems, that is, apps that may lose state information when their execution is interrupted. Although several techniques can be used to automatically generate test cases for Android apps, the obtained test cases seldom include the interactions and the checks necessary to exercise and reveal data loss faults. To address this problem, this paper presents Data Loss Detector (DLD), a test case generation technique that integrates an exploration strategy, data-loss-revealing actions, and two customized oracle strategies for the detection of data loss failures. DLD has been able to reveal 75% of the faults in a benchmark of 54 Android app releases affected by 110 known data loss faults. DLD also revealed unknown data loss problems, outperforming competing approaches.
翻译:机器人应用必须正确工作, 即使其执行因外部事件而中断。 例如, 应用程序必须正确工作, 即使收到电话, 或由于智能手机旋转而重新改写, 程序也必须正常工作。 由于这些事件可能需要销毁, 执行中断, 执行恢复后, 重新生成应用程序的前方活动, 防止丢失国家信息的唯一方法就是保存并恢复它。 此行为必须由应用程序开发者明确实施, 他们往往不能正确执行, 释放受数据丢失问题影响的应用程序, 也就是说, 执行中断时可能丢失国家信息的应用程序。 虽然可以使用几种技术自动生成安甲型应用程序的测试案例, 但获得的测试案例很少包括操作和披露数据损失错误所需的互动和检查。 为了解决这个问题, 本文展示了数据损失探测器( DLD), 一种测试案例生成技术, 整合了勘探战略, 数据损失失传行动, 以及两个识别数据丢失失败的定制或控制策略。 DLD 已经揭示了75 % 的未知错误 。 DLD 也揭示了D 数据库中第 110 号 的损失基准 。