CheckOps home

Tools directory

S

CheckOps

SnapshotTesting (Point-Free)

SnapshotTesting is Point-Free's MIT-licensed snapshot testing library for Swift, snapshotting views, view controllers and any value as images, text, JSON and more, with XCTest and Swift Testing support.

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

SnapshotTesting is a delightful snapshot testing library for Swift by Point-Free. A snapshot test captures the output of a value, such as a rendered view controller, a SwiftUI view, a URL request or a data model, and compares it with a reference stored on disk. Its README explains that when an assertion first runs, it records the reference and fails, printing the file path; later runs compare against that reference.

The key idea is snapshot strategies: the same assertSnapshot(of:as:) function can capture .image (with device configurations, traits and precision options), .recursiveDescription, .dump, .json, .lines and many more, and you can write custom strategies. Recording is controlled per assertion (record: .all) or for a scope with withSnapshotTesting(record:), including at the Swift Testing suite level. It works with XCTest and Swift Testing (@Test), supports UIKit, SwiftUI and AppKit, and includes inline snapshot testing for text. Version 1.19.7 was released on 21 October 2026.

The source code is at pointfreeco/swift-snapshot-testing on GitHub under the MIT licence, with about 4,400 stars; the most recent commit was on 21 October 2026.

Features

  1. Many strategies: Images, text, JSON, dumps and custom formats.
  2. Any value: Snapshot views, requests, models and more.
  3. Scoped recording: Re-record per assertion or per scope.
  4. XCTest and Swift Testing: Works with both frameworks.

Pros

  1. Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 21 October 2026.
  3. Community: About 4,400 GitHub stars.

Cons

  1. Image flakiness: Image snapshots can differ across simulators and OS versions; pin devices.
  2. Repository size: Many image references increase repository size.
import SnapshotTesting
import Testing
@testable import Shop

@MainActor
struct CheckoutViewTests {
    @Test func checkoutLayout() {
        let vc = CheckoutViewController(order: .sample)
        assertSnapshot(of: vc, as: .image(on: .iPhone13))
    }

    @Test func requestShape() {
        assertSnapshot(of: API.createOrder(.sample), as: .raw)
    }
}

Resources:

Pricing

SnapshotTesting (Point-Free) is free and open source under the MIT licence.

  1. iOS and macOS teams guarding UI layouts against regressions.
  2. Developers snapshotting complex values such as requests and models.

Conclusion

SnapshotTesting is the most flexible snapshot library for Swift, with powerful strategies for UI and data.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with SnapshotTesting (Point-Free) side by side.