In simple English
This tool helps you test Swift apps by saving pictures of your user interfaces to disk. Every time you run your tests, the app takes a new picture and compares it to the saved one. If anything looks wrong or out of place, the test fails. It also checks text, JSON data, and web requests in the same way. It costs nothing to use, and runs directly inside your existing test suite.
What it is
A Swift testing library that compares visual and data outputs against stored reference files on disk. It supports user interfaces, network requests, and generic data structures across Apple platforms.
What it is good for
Swift developers who want to catch visual regressions in user interfaces without writing complicated coordinate checks by hand.
- Saves reference snapshots automatically when you run a test for the first time.
- Works with any Swift data type, including images, JSON, and network requests.
- Lets you test multiple device sizes from a single simulator.
- Requires macOS and Xcode to run tests and view image comparisons.
- Tests can fail if run on different simulator versions due to subtle system font changes.
- Needs careful management of snapshot files inside your source control repository.
Manual UI checks and basic XCTest assertions
Xcode
- uber/ios-snapshot-test-case1.9k stars
An older Objective-C and Swift snapshot testing library by Uber that inspired many early iOS testing workflows.
- doordash-oss/swiftui-preview-snapshots197 stars
A companion plugin that shares SwiftUI preview configurations with snapshot tests.
- HypothesisWorks/hypothesis9.1k stars
A Python library that generates test inputs and reduces any failure to the smallest example that still fails.
- wntrblm/nox1.6k stars
Runs your tests and other jobs in fresh isolated environments, described in an ordinary Python file.
dependencies: [
.package(
url: "https://github.com/pointfreeco/swift-snapshot-testing",
from: "1.12.0"
),
]