integration-test-scaffold

Generate cross-module integration test harnesses with mock servers and in-memory SwiftData containers.

114|8|Updated Mar 4, 2025
One-click install
npx skills add https://github.com/gustavscirulis/snapgrid --skill integration-test-scaffold-gustavscirulis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-test-scaffold
Source: https://github.com/gustavscirulis/snapgrid/tree/main/.claude/skills/skills/testing/integration-test-scaffold
Command: npx skills add https://github.com/gustavscirulis/snapgrid --skill integration-test-scaffold-gustavscirulis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of comprehensive integration test environments, allowing developers to test multiple application modules working together without relying on live external services or databases.

Core Features & Use Cases

  • Mock Server Generation: Creates mock servers to simulate API responses for network layer testing.
  • In-Memory Data Stores: Sets up in-memory databases (like SwiftData) for persistence layer testing.
  • Test Environment Configuration: Wires together all necessary components (mocks, stores, dependencies) into a cohesive test harness.
  • Use Case: When testing the flow of data from an API call through a repository to a ViewModel, this skill generates the necessary mock API responses and in-memory data store to ensure the entire chain functions correctly.

Quick Start

Generate a full-stack integration test environment for testing API, repository, and ViewModel interactions.

Frequently Asked Questions about integration-test-scaffold

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

FAQPage Schema
How do I set up an integration test harness for SwiftData and networking?

To set up an integration test harness for SwiftData and networking, you can generate mock URL protocols and in-memory SwiftData containers. This isolates networking, persistence, and business logic testing from live external services.

What is the best way to test API to repository to ViewModel data flow?

The best way to test API to repository to ViewModel data flow is to use a cross-module integration test harness. It wires together mock API responses and in-memory data stores to verify the entire chain functions correctly.

Can I use an in-memory SwiftData container for isolated persistence testing?

Yes, you can use an in-memory SwiftData container for isolated persistence testing. The test harness generates in-memory data stores to test your persistence layer concurrently without relying on a live database.

How do mock servers simulate API responses during integration testing?

Mock servers simulate API responses by utilizing mock URL protocols during integration testing. This allows you to test your network layer comprehensively without needing actual external services to be available.

Does this test harness configuration support mocking UserDefaults?

Yes, this test harness configuration supports mocking UserDefaults. It generates mock UserDefaults alongside in-memory data stores to create fully isolated testing scenarios for your application's business logic.

When should I not use an integration test harness for my tests?

You should not use a cross-module integration test harness when you only need to test a single isolated module. It is designed specifically for testing networking, persistence, and business logic concurrently across multiple application modules.