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.
- Unit Testing
- Swift
- Ios
- Open source
- Free
- Snapshot Testing
- Library
- Visual Testing
- Unit testing
- Prototype & UX testing
- End-to-end & functional
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
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
- Many strategies: Images, text, JSON, dumps and custom formats.
- Any value: Snapshot views, requests, models and more.
- Scoped recording: Re-record per assertion or per scope.
- XCTest and Swift Testing: Works with both frameworks.
Pros
- Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 21 October 2026.
- Community: About 4,400 GitHub stars.
Cons
- Image flakiness: Image snapshots can differ across simulators and OS versions; pin devices.
- Repository size: Many image references increase repository size.
Usage and Links (Example)
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.
Recommended for?
- iOS and macOS teams guarding UI layouts against regressions.
- 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.
XXCTestXCTest is Apple's testing framework for unit, performance and UI tests in Xcode projects across Apple platforms, with assertions, expectations for async code, performance metrics and code coverage.Compare with SnapshotTesting (Point-Free)
SSwift TestingSwift Testing is Apple's open-source (Apache-2.0) testing library for Swift, using @Test and #expect macros, parameterised tests, traits and parallel execution, included in Xcode 16 and Swift 6 toolchains.Compare with SnapshotTesting (Point-Free)
VViewInspectorViewInspector is an MIT-licensed library for unit testing SwiftUI views at runtime, letting tests traverse the view hierarchy, read values and trigger actions such as button taps.Compare with SnapshotTesting (Point-Free)
PPaparazziPaparazzi is Cash App's Apache-2.0 Android library for rendering application screens without a physical device or emulator, enabling fast screenshot tests on the JVM.Compare with SnapshotTesting (Point-Free)
Iinstainsta 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.Compare with SnapshotTesting (Point-Free)
NNimbleNimble is an Apache-2.0 matcher framework for Swift and Objective-C, offering expressive expect(...).to(...) assertions and asynchronous toEventually expectations, used with XCTest or Quick.Compare with SnapshotTesting (Point-Free)