Skip to main content

Frequently asked questions

What is the difference between snapshot4s and circe-golden?

circe-golden is a library that is specialized for validating circe codecs. It reduces the maintenance burden of testing codecs by automating the generation of test data.

Unlike circe-golden, snapshot4s is aimed at broader example-based testing. It supports example-based tests containing any String or algebraic data type.

What other snapshot testing tools exist?

circe-golden is the most similar library for Scala. It specializes in validating circe codecs, as described above.

Here are a few tools for other languages:

Can I choose to promote snapshots only in selected file?

Yes! Similarly to running only specific test with testOnly *MySuite* sbt command, you can use snapshot4sPromote *MySuite* to only update the snapshots present in and referenced by MySuite.scala.