CheckOps home

Tools directory

I

CheckOps

insta

insta is an Apache-2.0 snapshot testing library for Rust by Armin Ronacher, with assert_snapshot! macros, serde-based formats, redactions, inline snapshots and the cargo insta review tool.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

insta is a snapshot testing library for Rust created by Armin Ronacher. Snapshot tests assert that a value matches a stored reference; when the output changes, you review the difference and accept or reject it. This is ideal for complex output such as parser ASTs, serialised API responses, CLI output or rendered templates, where writing exact assertions by hand would be tedious.

Macros include assert_snapshot! for strings, assert_debug_snapshot! for Debug output, and serde-based assert_yaml_snapshot!, assert_json_snapshot! and others behind features. Snapshots are stored in .snap files or inline in source code. Redactions replace unstable values such as timestamps or IDs before comparison, and glob support snapshots many input files at once. The companion cargo insta CLI runs tests and offers an interactive cargo insta review workflow to accept or reject changes, and editor extensions are available. Version 1.49.0 was released on 3 October 2026.

The source code is at mitsuhiko/insta on GitHub under the Apache-2.0 licence, with about 3,000 stars; the most recent commit was on 26 October 2026.

Features

  1. Snapshot macros: String, Debug and serde formats.
  2. cargo insta review: Interactive accept or reject workflow.
  3. Redactions: Mask timestamps, IDs and other unstable data.
  4. Inline snapshots: Keep small snapshots in source code.

Pros

  1. Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 26 October 2026.

Cons

  1. Review discipline: Accepting snapshots blindly hides regressions.
  2. Large diffs: Big snapshots can be hard to review.
cargo add --dev insta --features yaml
cargo install cargo-insta
#[test]
fn renders_invoice() {
    let invoice = render_invoice(&sample_order());
    insta::assert_snapshot!(invoice);
}

#[test]
fn api_response_shape() {
    let resp = build_response();
    insta::assert_yaml_snapshot!(resp, { ".created_at" => "[timestamp]" });
}
cargo insta test --review

Resources:

Pricing

insta is free and open source under the Apache-2.0 licence.

  1. Rust projects with complex outputs such as compilers, CLIs and APIs.
  2. Teams wanting fast, reviewable regression tests.

Conclusion

insta is the go-to snapshot testing tool for Rust, with an excellent review workflow and flexible formats.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with insta side by side.