# SnapshotTesting

> Snapshot testing for Swift: assert on images, text, JSON or any value against recorded references

Source: https://talira.ai/catalog/snapshottesting-e9ye4e41
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / testing / visual regression](https://talira.ai/categories/developer-tools/testing/visual-regression), [languages / swift](https://talira.ai/categories/languages/swift)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Point-Free](https://talira.ai/orgs/point-free.md)

SnapshotTesting (swift-snapshot-testing) from Point-Free lets Swift tests call assertSnapshot on any value with a snapshot strategy: views and view controllers as images, data structures as text, JSON or property lists, and anything you can turn into an image, string or diffable data. The first run records a reference to disk next to the tests; later runs compare against it and describe any difference, with image diffs attached in Xcode and text diffs inline. It needs no configuration, works from XCTest or Swift Testing, renders views for specific devices from a single simulator, and runs on iOS, macOS, tvOS and Linux.

## Links

- GitHub: https://github.com/pointfreeco/swift-snapshot-testing
- Docs: https://swiftpackageindex.com/pointfreeco/swift-snapshot-testing/main/documentation/snapshottesting

## Problems it solves

- catch unintended UI changes in my iOS views with snapshot tests
- compare my Swift view's rendering against a recorded reference image
- snapshot test the JSON my Swift code encodes

## Features

- dozens of snapshot strategies for images, text, JSON and property lists
- write your own snapshot strategies or transform existing ones
- snapshots recorded automatically next to the tests, with no configuration
- device-agnostic view snapshots from a single simulator
- image diffs as XCTest attachments and text diffs inline in Xcode
- SceneKit, SpriteKit and WebKit view support
- print diff commands for Kaleidoscope or another diff tool

## Trust

Overall: 0.49 out of 1.
Signals: maintenance 0.48, adoption 0.73, momentum 0.48, community 0.80, backing 0.30, extensibility 0.00.

- last commit 39 days ago
- 4 commits in the last 90 days
- latest release 1.19.7 39 days ago
- 4.4k GitHub stars
- 101 contributors
- backed by Point-Free

## Alternatives

- [Chromatic](https://talira.ai/catalog/chromatic-bw3y3bgt.md): Ship flawless UIs with less work
- [Sauce Labs](https://talira.ai/catalog/sauce-labs-r7ypq353.md): Verify AI-generated code at the pace it's written
- [Percy](https://talira.ai/catalog/percy-v2xn8h1j.md): AI-powered visual testing and review

## Sources

[^1]: https://github.com/pointfreeco/swift-snapshot-testing#readme (checked 28 Nov 2026)
[^2]: https://github.com/pointfreeco/swift-snapshot-testing/blob/main/LICENSE (checked 28 Nov 2026)
