Lune

ICSE2021顶会

Studying Test Annotation Maintenance in the Wild

Dong Jae Kim, Nikolaos Tsantalis, Tse-Hsun Peter Chen, Jinqiu Yang

摘要

Since the introduction of annotations in Java 5, the majority of testing frameworks, such as JUnit, TestNG, and Mockito, have adopted annotations in their core design. This adoption affected the testing practices in every step of the test life-cycle, from fixture setup and test execution to fixture teardown. Despite the importance of test annotations, most research on test maintenance has mainly focused on test code quality and test assertions. As a result, there is little empirical evidence on the evolution and maintenance of test annotations. To fill this gap, we perform the first fine-grained empirical study on annotation changes. We developed a tool to mine 82,810 commits and detect 23,936 instances of test annotation changes from 12 open-source Java projects. Our main findings are: (1) Test annotation changes are more frequent than rename and type change refactorings. (2) We recover various migration efforts within the same testing framework or between different frameworks by analyzing common annotation replacement patterns. (3) We create a taxonomy by manually inspecting and classifying a sample of 368 test annotation changes and documenting the motivations driving these changes. Finally, we present a list of actionable implications for developers, researchers, and framework designers.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • A First Look at the Inheritance-Induced Redundant Test Execution 引用了 How disabled tests manifest in test maintainability challenges?
  • How disabled tests manifest in test maintainability challenges? 引用了 Understanding type changes in Java
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Understanding Solidity Event Logging Practices in the WildLantian Li, Yejian Liang, Zhihao Liu, Zhongxing YuFSE 2023 · 13 次引用
  2. How disabled tests manifest in test maintainability challenges?Dong Jae Kim, Bo Yang, Jinqiu Yang, Tse-Hsun (Peter) ChenFSE 2021 · 9 次引用
  3. Understanding and Detecting Annotation-Induced Faults of Static AnalyzersHuaien Zhang, Yu Pei, Shuyun Liang, Shin Hwei TanFSE 2024 · 4 次引用
  4. A First Look at the Inheritance-Induced Redundant Test ExecutionDong Jae Kim, Jinqiu Yang, Tse-Hsun ChenICSE 2024 · 2 次引用

它引用的 Paper1

  1. Understanding type changes in JavaAmeya Ketkar, Nikolaos Tsantalis, Danny DigFSE 2020 · 17 次引用

相关 Paper

  1. An automatic refactoring framework for replacing test-production inheritance by mocking mechanismXiao Wang, Lu Xiao, Tingting Yu, Anne Woepse 等FSE 2021 · 15 次引用
  2. The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 次引用
  3. Understanding and Characterizing Mock Assertions in Unit TestsHengcheng Zhu, Valerio Terragni, Lili Wei, Shing-Chi Cheung 等FSE 2025 · 1 次引用
  4. Testability Refactoring in Pull Requests: Patterns and TrendsPavel Reich, Walid MaalejICSE 2023 · 4 次引用
  5. A large-scale empirical study on Java library migrations: prevalence, trends, and rationalesHao He, Runzhi He, Haiqiao Gu, Minghui ZhouFSE 2021 · 47 次引用
黄昏的海面,两侧是细线勾勒的悬崖