An Empirical Study on the Use of Snapshot Testing
Shun FUJITA, Yutaro Kashiwa, Bin Lin, Hajimu Iida · 2023
Testing is one of the most critical processes in software quality assurance. Developers spend a large portion of their time writing test code to avoid potential software failures. In recent years, snapshot testing, which compares snapshots of UI components to detect unexpected changes, has gained popularity in front-end development due to the need to reduce testing efforts. However, it is still unclear how software developers adopt snapshot testing and maintain them. To facilitate future work to reveal the potentials of snapshot testing, this paper presents a preliminary study which examines how developers use snapshot tests. More specifically, this study investigates 1) the characteristics of projects adopting snapshot testing, and 2) when snapshot tests were introduced and how they evolve. Our study is among the first to understand snapshot testing, providing valuable insights on its adoption. We also highlight the future directions to work on.