Lune

ICSE2022顶会

Use of Test Doubles in Android Testing: An In-Depth Investigation

Mattia Fazzini, Chase Choi, Juan Manuel Copia, Gabriel Lee, Yoshiki Kakehi, Alessandra Gorla, Alessandro Orso

摘要

Android apps interact with their environment extensively, which can result in flaky, slow, or hard-to-debug tests. Developers often address these problems using test doubles-developer-defined objects that replace app or library classes during test execution. Although test doubles are widely used, there is limited understanding of how they are used in practice. To bridge this gap, we present an in-depth empirical study that aims to shed light on how developers create and use test doubles in Android apps. In our study, we first analyze a dataset of 1,006 apps with publicly available test suites to identify which frameworks and approaches developers most commonly use to create test doubles. We then investigate several research questions by studying how test doubles defined using these popular frameworks are created and used in the ten apps in the dataset that define the highest number of test doubles using these frameworks. Our results, based on the analysis of 2,365 test doubles that replace a total of 784 classes, provide insight into the types of test doubles used within Android apps and how they are utilized. Our results also show that test doubles used in Android apps and traditional Java test doubles differ in at least some respect. Finally, our results show that test doubles can introduce test smells and even mistakes in the test code. In the paper, we also discuss some implications of our findings that can help researchers and practitioners working in this area and guide future research.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Understanding and Characterizing Mock Assertions in Unit Tests 引用了 An automatic refactoring framework for replacing test-production inheritance by mocking mechanism
  • Understanding and Characterizing Mock Assertions in Unit Tests 引用了 MockSniffer: Characterizing and Recommending Mocking Decisions for Unit Tests
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Understanding and Characterizing Mock Assertions in Unit TestsHengcheng Zhu, Valerio Terragni, Lili Wei, Shing-Chi Cheung 等FSE 2025 · 1 次引用

它引用的 Paper5

  1. Benchmarking automated GUI testing for Android against real-world bugsTing Su, Jue Wang, Zhendong SuFSE 2021 · 77 次引用
  2. Test Automation in Open-Source Android Apps: A Large-Scale Empirical StudyJun-Wei Lin, Navid Salehnamadi, Sam MalekASE 2020 · 27 次引用
  3. Identifying Java calls in native code via binary scanningGeorge Fourtounis, Leonidas Triantafyllou, Yannis SmaragdakisISSTA 2020 · 23 次引用
  4. MockSniffer: Characterizing and Recommending Mocking Decisions for Unit TestsHengcheng Zhu, Lili Wei, Ming Wen, Yepang Liu 等ASE 2020 · 17 次引用
  5. An automatic refactoring framework for replacing test-production inheritance by mocking mechanismXiao Wang, Lu Xiao, Tingting Yu, Anne Woepse 等FSE 2021 · 15 次引用

相关 Paper

  1. Automated Third-Party Library Detection for Android Applications: Are We There Yet?Xian Zhan, Lingling Fan, Tianming Liu, Sen Chen 等ASE 2020 · 55 次引用
  2. Reproducing Timing-Dependent GUI Flaky Tests in Android Apps via a Single Event DelayXiaobao Cai, Zhen Dong, Yongjiang Wang, Abhishek Tiwari 等ISSTA 2024 · 1 次引用
  3. Flaky test detection in Android via event order explorationZhen Dong, Abhishek Tiwari, Xiao Liang Yu, Abhik RoychoudhuryFSE 2021 · 25 次引用
  4. A Longitudinal Analysis Of Replicas in the Wild Wild AndroidSyeda Mashal Abbas Zaidi, Shahpar Khan, Parjanya Vyas, Yousra AaferASE 2024
  5. Mining Android API Usage to Generate Unit Test Cases for Pinpointing Compatibility IssuesXiaoyu Sun, Xiao Chen, Yanjie Zhao, Pei Liu 等ASE 2022 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖