arXiv:2610.29549cs.SEOct 2026

Manuscript Offprint

arXiv:2610.29549

On the Effectiveness of Snapshot Testing: An Empirical Study

Shun Fujita, Satoru Tomizawa, Yutaro Kashiwa, Bin Lin, Hajimu Iida

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

SHUN FUJITA, Nara Institute of Science and Technology, Japan

SATORU TOMIZAWA, Nara Institute of Science and Technology, Japan

YUTARO KASHIWA, Nara Institute of Science and Technology, Japan

BIN LIN, Hangzhou Dianzi University, China

HAJIMU IIDA, Nara Institute of Science and Technology, Japan

Software testing is essential for ensuring quality, yet testing complex front-end user interfaces is often time-consuming and difficult. Snapshot testing has emerged as a low-cost regression testing method that detects unexpected changes by comparing program behavior before and after modifications. Despite its growing adoption, empirical evidence regarding its actual effectiveness remains scarce. To fill this gap, this study presents a large-scale empirical investigation into the effectiveness of snapshot testing involving 340 GitHub repositories and a survey of 60 experienced practitioners.

Our quantitative results demonstrate that combining snapshot and traditional non-snapshot tests significantly enhances code coverage, achieving a median statement coverage of 86.7%. We find that the two approaches are highly complementary, typically exercising distinct regions of the production code. Furthermore, test suites incorporating snapshot tests detected 1.3 times more mutants than those relying solely on traditional tests. Our qualitative insights from the developer survey reveal that practitioners value snapshot testing for its ease of implementation, ability to prevent regressions, and transparency in checking results. However, reviewing large result sets and managing false positives remain significant hurdles. These findings guide the strategic integration and future improvement of snapshot testing in modern development pipelines.

CCS Concepts: • Software and its engineering → Software verification and validation; Empirical software validation; Software testing and debugging; Rapid application development.

Additional Key Words and Phrases: Snapshot testing, JEST, Test-code, Unit tests, Empirical study

ACM Reference Format:

Shun Fujita, Satoru Tomizawa, Yutaro Kashiwa, Bin Lin, and Hajimu Iida. 2026. On the Effectiveness of Snapshot Testing: An Empirical Study. 1, 1 (October 2026), 26 pages. https://doi.org/XXXXXXX.XXXXXXX

1 INTRODUCTION

Software testing is crucial for ensuring software quality. In modern development, as production code expands, developers must create extensive test programs to verify that the software behaves as expected [38]. However, this process is time-consuming and requires significant human resources [31]. The increasing complexity of production code often results in testing that is insufficient due to time constraints or high maintenance costs, even when automated tests are implemented [31, 35].

Authors' addresses: Shun Fujita, fujita.shun.fp9@naist.ac.jp, Nara Institute of Science and Technology, Ikoma, Japan; Satoru Tomizawa, tomizawa.satoru.tx9@naist.ac.jp, Nara Institute of Science and Technology, Ikoma, Japan; Yutaro Kashiwa, Nara Institute of Science and Technology, Ikoma, Japan, yutaro.kashiwa@is.naist.jp; Bin Lin, Hangzhou Dianzi University, Hangzhou, China, b.lin@hdu.edu.cn; Hajimu Iida, Nara Institute of Science and Technology, Ikoma, Japan, iida@itc.naist.jp.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.

© 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM.

ACM XXXX-XXXX/2026/10-ART

https://doi.org/XXXXXXX.XXXXXXX

Fujita, et al.

Numerous studies have proposed various approaches to mitigate these challenges [11]. Fraser and Arcuri [11] developed EvoSuite 1^{1} that automatically generates test code from Java bytecode. A report [36] shows that EvoSuite achieved 71% branch coverage and a mutation score of 53% on average, using a search budget of 120 seconds on 25 classes. However, a controlled study [12] found no measurable improvement in the number of bugs actually found by developers using such automated test generation tools. Fatima et al. [10] proposed model-based approaches to enhance the efficiency of test case generation and methods for partial retesting in response to code changes.

While these test generation approaches are actively researched, their adoption in practice remains limited [12]. In contrast, snapshot testing is increasingly used in front-end development by large-scale companies such as Uber and Spotify [1]. Unlike traditional unit or functional tests, which define the correct behavior of the products, snapshot testing compares the outputs of the current system state against previously saved snapshots. This technique is particularly effective for verifying outputs like UI layouts, API response data, and rendering results. Snapshot testing only detects differences before and after code changes, without verifying whether the current state is correct.

Due to its popularity among practitioners, snapshot testing has been highlighted in recent studies [3, 8, 13]. Bui and Rocha [3] collected 686 repositories adopting snapshot testing. They extracted projects using Jest, one of the frameworks that implement snapshot testing, based on GitHub tags, and selected repositories containing files with the snap extension to create the dataset. Fujita et al. [13] investigated the adoption and maintenance of snapshot testing in front-end development, with a particular focus on projects using the Jest framework for JavaScript and TypeScript. They found that projects incorporating both unit and snapshot tests tend to have a higher number of test cases. Additionally, a significant portion of commits (8.2%) involve updates to snapshot files, indicating frequent co-evolution with production code. Cruz et al. [8] conducted a grey literature review, revealing both the advantages (such as ease of implementation) and drawbacks (such as fragility) of snapshot testing. While these studies highlight the use of snapshot testing, the effectiveness of snapshot testing compared to other testing methods remains an open question.

In this study, we aim to evaluate snapshot testing using standard testing metrics, including coverage and mutation scores. We collect 13,256 GitHub repositories with more than 500 stars and identify 340 repositories that employ the most popular framework for JavaScript and practice snapshot testing. We compare the coverages and mutation scores when using snapshot tests and/or other tests. We find that the combination of snapshot and traditional non-snapshot tests achieves a median statement coverage of 86.7%, which is significantly higher than using either method alone. Furthermore, test suites incorporating snapshot tests detected over 1.3 times more mutants compared to those without them, reaching a median mutation score of 36.5%. Our results indicate that snapshot and non-snapshot tests are complementary, as they often exercise distinct areas of production code and kill different types of mutants.

In addition, we conducted an online survey to gain insights into the issues that snapshot testing can identify, as well as developers' perceptions of its benefits and challenges. Out of 1,159 survey invitations, we received 66 responses (5.7% response rate). We found that developers primarily value snapshot testing for its ease of implementation (53.3%), ability to prevent regressions (28.3%), and transparency in checking results (26.7%). Practitioners reported that snapshot testing is particularly effective at identifying Program Anomaly issues (70.0%) and GUI-related issues (53.3%), and can even detect test code-related issues (36.7%) that basic unit test assertions might miss. However, practitioners also face significant challenges, most notably the difficulty of reviewing or interpreting large result sets (28.3%) and the introduction of false positives (21.7%).

1^{1}https://github.com/EvoSuite/evosuite

Figure

Fig. 1. Example use of snapshot tests

Replication package. To facilitate replication and further studies, the data and programs used in this study are publicly available on GitHub repository. 2^{2}