一句话:ATUA 通过更新驱动、模型化测试,以少量输入覆盖 App 更新代码,缓解测试预言问题。
移动 App 测试工具常生成成千上万测试输入,虽能发现崩溃却难以识别功能失效,因为需要人工检查大量输出。ATUA 针对 Android 应用,聚焦频繁更新代码的测试。它结合静态分析合成 App 模型,引入动态细化的状态抽象函数,并融合四种互补策略:模型结构覆盖、App 代码覆盖、随机探索以及基于信息检索的依赖覆盖。在 9 个流行 Android 应用(72 个版本)上的评估表明,与当前先进方法相比,ATUA 在提高代码覆盖的同时,产生更少需人工检查的输出,从而缓解测试预言问题。
App testing tools tend to generate thousand test inputs; they help engineers identify crashing conditions but not functional failures. Indeed, detecting functional failures requires the visual inspection of App outputs, which is infeasible for thousands of inputs. Existing App testing tools ignore that most of the Apps are frequently updated and engineers are mainly interested in testing the updated functionalities; indeed, automated regression test cases can be used otherwise. We present ATUA, an open source tool targeting Android Apps. It achieves high coverage of the updated App code with a small number of test inputs, thus alleviating the test oracle problem (less outputs to inspect). It implements a model-based approach that synthesizes App models with static analysis, integrates a dynamically-refined state abstraction function and combines complementary testing strategies, including (1) coverage of the model structure, (2) coverage of the App code, (3) random exploration, and (4) coverage of dependencies identified through information retrieval. Our empirical evaluation, conducted with nine popular Android Apps (72 versions), has shown that ATUA, compared to state-of-the-art approaches, achieves higher code coverage while producing fewer outputs to be manually inspected. A demo video is available at https://youtu.be/RqQ1z_Nkaqo.