Skip to content
Agentmart
Submit a tool

ios-visual-regression-testing

swift-snapshot-testingとXCTestプレビューテストを使用したiOS Visual Regression Testingの専門知識。視覚的UI検証のためのCI/CD統合。iOSスナップショットテストの設計・実装、VRTカバレッジ改善、CI/CDへのVRT統合時に使用します。

Skill by ohzono

IndexedMIT★ 3
Write a review

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ohzono-ios-visual-regression-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

swift-snapshot-testingとXCTestプレビューテストを使用したiOS Visual Regression Testingの専門知識。視覚的UI検証のためのCI/CD統合。iOSスナップショットテストの設計・実装、VRTカバレッジ改善、CI/CDへのVRT統合時に使用します。

Use cases: design, testing, devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ios-visual-regression-testing

Tools it pre-approves 6

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Glob,
  • Edit,
  • Write,
  • WebSearch,
  • Bash

What's inside

Skill name
ios-visual-regression-testing
Description
swift-snapshot-testingとXCTestプレビューテストを使用したiOS Visual Regression Testingの専門知識。視覚的UI検証のためのCI/CD統合。iOSスナップショットテストの設計・実装、VRTカバレッジ改善、CI/CDへのVRT統合時に使用します。
License
MIT
Allowed tools
Read,, Glob,, Edit,, Write,, WebSearch,, Bash
Instructions
121 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves any shell command

Files (2)

  • SKILL.md
  • reference.md

SKILL.md (first lines)

# iOS Visual Regression Testing Skill

## Overview
Comprehensive expertise in implementing Visual Regression Testing (VRT) for iOS applications. This includes snapshot testing, preview testing, pixel-perfect comparison, and CI/CD pipeline integration for automated visual verification.

## Why Visual Regression Testing?

### Benefits
- **Catch Unintended UI Changes**: Detect visual regressions before they reach production
- **Design System Consistency**: Ensure UI components match design specifications
- **Refactoring Confidence**: Safely refactor UI code with visual verification
- **Cross-Device Validation**: Test across different device sizes and configurations
- **Documentation**: Snapshots serve as visual documentation of UI states

### When to Use
- Component library development
- Design system implementation
- UI refactoring projects
- Accessibility testing (Dynamic Type, Dark Mode)
- Multi-device support verification

## Snapshot Testing Frameworks

### swift-snapshot-testing (Point-Free)

The most popular and flexible snapshot testing library for Swift.

```swift
// SPM: .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.17.0")
// 1.17+ 必須: withSnapshotTesting(record:) スコープ API と Swift Testing 統合のため

import SnapshotTesting

// UIKit view
assertSnapshot(of: view, as: .image(size: CGSize(width: 375, height: 200)))

// SwiftUI view
assertSnapshot(of: view, as: .image(layout: .device(config: .iPhone13), traits: .init(userInterfaceStyle: .light)))

// Dark mode
assertSnapshot(of: view, as: .image(layout: .device(config: .iPhone13), traits: .init(userInterfaceStyle: .dark)), named: "dark")

// Accessibility
assertSnapshot(of: view, as: .image(layout: .device(config: .iPhone13),
    traits: UITraitCollection(preferredContentSizeCategory: .accessibilityExtraLarge)), named: "accessibility-xl")

// Multiple devices
for (name, config) in [("iPhone-SE", ViewImageConfig.iPhoneSe), ("iPhone-13", .iPhone13), ("iPad-Pro", .iPadPro12_9)] {
    assertSnapshot(of: view, as: .image(layout: .device(config: config)), named: name)
}

// Perceptual precision (anti-aliasing tolerance)
assertSnapshot(of: view, as: .image(precision: 0.99, perceptualPrecision: 0.98))
```

## Best Practices

### Directory Structure
```
MyApp/
├── MyAppTests/
│   ├── SnapshotTests/
│   │   ├── __Snapshots__/           # Reference images
│   │   ├── MyViewTests.swift
│   │   └── SnapshotTestCase.swift   # Base class
│   └── UnitTests/
```

### Naming Convention
```swift
// Format: test[Component]_[state]_[variant]
func testProductCard_default() { }
func testProductCard_onSale() { }
func testProductCard_darkMode() { }
func testProductCard_accessibilityXL() { }
```

### Handling Flaky Tests
- Disable animations: `UIView.setAnimationsEnabled(false)`
- Use fixed dates: `DateProvider.current = MockDateProvider(fixedDate: ...)`
- Disable caret blinking in text fields
- Mock all dynamic content (images, timestamps, random values)
- Always specify exact device and OS version

### CI/CD Integration Key Points
- Use `macos-14` runner with specific Xcode version
- Upload failed snapshots as artifacts on failure
- Support `RECORD_SNAPSHOTS` environment variable for update workflow

## Verification Checklist
- [ ] All UI states have corresponding snapshots
- [ ] Dark mode variants tested
- [ ] Accessibility sizes tested (Dynamic Type)
- [ ] Multiple device sizes covered
- [ ] RTL languages tested if applicable
- [ ] CI/CD pipeline integration complete

## Evidence-First Visual Testing

**Core Belief**: "Visual regression testing provides objective evidence of UI consistency and prevents unintended design changes"

### Standards Compliance
- Apple Human Interface Guidelines visual specifications
- Accessibility requirements (WCAG contrast ratios)
- Design system documentation
- Platform-specific rendering requirements

## When to Use This Skill
- Setting up snapshot testing infrastructure
- Creating visual regression tests for UI components
- Integrating VRT into CI/CD pipelines
- Debugging flaky snapshot tests
- Testing design system components
- Multi-device and accessibility visual testing
- Localization visual verification

## 詳細リファレンス

より詳細な技術リファレンス、コード例、チェックリストは [reference.md](reference.md) を参照してください。

From ohzono/native-app-fullcycle, MIT.

More from ohzono/native-app-fullcycle

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
Jun 18, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ohzono

Cite this page

ios-visual-regression-testing skill. Agent Mart. https://agentmart.dev/skills/ohzono-ios-visual-regression-testing (last updated 2026-10-24)