testing-integration-test-scaffold
CommunityScaffold full-stack Apple integration tests
System Documentation
What problem does it solve?
Helps teams test multiple modules together without hitting real servers or databases by providing a repeatable integration test harness that covers networking, persistence, and business logic wiring. Eliminates brittle ad-hoc test setups and reduces flakiness caused by network or storage variability.
Core Features & Use Cases
- URLProtocol-based mock server that intercepts URLSession requests and returns configurable responses for deterministic API behavior.
- MockServer helpers to register JSON or raw responses and simulate errors and delays for resilience testing.
- In-memory persistence support (SwiftData ModelContainer and MockUserDefaults) so tests run fast and isolated.
- TestEnvironment wiring that composes session, container, defaults, API client, repository, and view model for full-stack tests.
- Common use cases: verify API → Repository → ViewModel flows, cache fallback when offline, request header/auth verification, and end-to-end save flows.
Quick Start
Generate an integration test scaffold for a feature that uses a URLProtocol mock server, an in-memory SwiftData container, MockUserDefaults, and a TestEnvironment wired to run API→Repository→ViewModel tests.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: testing-integration-test-scaffold Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#testing-integration-test-scaffold Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.