create-integration-test

Generates integration tests for API endpoints and service-repository interactions with automatic DatabaseFixture rollback.

2|Updated May 2, 2026
One-click install
npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-integration-test-andrecini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-integration-test
Source: https://github.com/andrecini/dotnet-squad-copilot-agent/tree/main/.claude/skills/create-integration-test
Command: npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-integration-test-andrecini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you create reliable integration tests for API endpoints or internal service-to-repository interactions without risking production changes or unstable test data handling.

Core Features & Use Cases

  • Endpoint & layer integration coverage: Generates tests for both HTTP flows (via WebApplicationFactory) and internal integration (service → repository) using a real database.
  • Deterministic database rollback: Uses a DatabaseFixture transaction with mandatory rollback to prevent residual data and flakiness.
  • Test scaffolding automation: Verifies and creates fixtures, AuthHelper for authenticated endpoints, and required data mocks, following the project’s integration-test conventions.

Quick Start

Ask the agent to create integration tests for an endpoint like “Create integration tests for POST /api/v1/[resource] that cover success, validation errors, unauthorized access, and not-found cases.”

Frequently Asked Questions about create-integration-test

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

FAQPage Schema
How do I generate integration tests for a dotnet web api endpoint?

Integration tests for internal layer interactions verify service-to-repository logic using a real database. This approach ensures your data access components work together correctly while enforcing deterministic rollback via DatabaseFixture to prevent residual data and flakiness.

What is the best way to ensure database rollback and test isolation in xunit integration tests?

The best way to ensure database rollback and test isolation is using a DatabaseFixture with mandatory transaction rollback. This prevents residual data and flakiness, guaranteeing that your xunit integration tests remain deterministic and repeatable across runs.

Can I use test scaffolding to create auth helpers for authenticated web api endpoints?

Yes, test scaffolding can automatically verify and create AuthHelper components for authenticated web api endpoints. This ensures your integration tests correctly handle authentication scenarios while following the project’s existing integration-test conventions.

Does integration test scaffolding modify production code or existing fixtures?

Integration test scaffolding does not modify production code and enforces restricted writes to the Integration.Tests project. It uses existing fixtures and mocks unless explicitly confirmed by the user, ensuring safe overwrites and protecting your production codebase.

Why do my integration tests fail due to residual data and flakiness?

Integration tests fail due to residual data when they lack proper test isolation. Enforcing a mandatory rollback via DatabaseFixture after using a real database prevents leftover records, ensuring repeatable and deterministic test execution without flakiness.