snapshot-test-setup

Generate SwiftUI snapshot tests and CI scaffolding with swift-snapshot-testing.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill snapshot-test-setup-jtvaris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: snapshot-test-setup
Source: https://github.com/jtvaris/sunday-night-dynasty/tree/main/.agents/skills/testing/snapshot-test-setup
Command: npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill snapshot-test-setup-jtvaris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI interfaces often regress visually after changes; this skill provides a ready-made setup to generate snapshot tests using swift-snapshot-testing and CI wiring to guard against UI regressions.

Core Features & Use Cases

  • Generate SwiftUI snapshot tests using swift-snapshot-testing for visual stability
  • Provide boilerplate for test targets and CI wiring
  • Record and re-record reference images in Snapshots directories

Quick Start

Use this quick start to bootstrap snapshot testing: Run the setup to initialize snapshot tests for your SwiftUI project by adding the dependency, creating a base test, and recording initial reference images.

Frequently Asked Questions about snapshot-test-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up SwiftUI snapshot testing to catch visual regressions?

To set up SwiftUI snapshot testing, this skill generates test scaffolding and CI wiring using swift-snapshot-testing. It creates dependency declarations, base tests, and reference image recording workflows to establish a stable UI baseline.

What is visual regression testing for SwiftUI and when do I need it?

Visual regression testing for SwiftUI captures reference images to prevent unintended visual changes across themes and devices. You need it during UI development to verify that code modifications do not alter the rendered interface unexpectedly.

How do I record and re-record reference images for SwiftUI snapshot tests?

Recording and re-recording SwiftUI snapshot reference images involves running the setup workflow to generate __Snapshots__ directories. This process captures initial reference assets and allows you to update them when intentional UI changes occur.

Can I use swift-snapshot-testing to bootstrap CI scaffolding for my SwiftUI project?

Yes, you can use swift-snapshot-testing to bootstrap CI scaffolding for SwiftUI projects. This setup provides the necessary boilerplate for test targets and continuous integration wiring to automate visual regression checks.

Does snapshot testing work across different SwiftUI themes and devices?

Snapshot testing works across different SwiftUI themes and devices by capturing and comparing rendered UI states. The generated tests guard against unintended visual changes by verifying interface stability against recorded reference images.