integration tests

Automate API endpoint integration tests with Vitest, PostgreSQL, and RabbitMQ containers.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/GeorgeSheppard/api.georgesheppard.dev --skill integration-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration tests
Source: https://github.com/GeorgeSheppard/api.georgesheppard.dev/tree/main/.claude/skills/integration-tests
Command: npx skills add https://github.com/GeorgeSheppard/api.georgesheppard.dev --skill integration-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integration tests for endpoints ensure reliable behavior in real-like environments by validating data flows, side effects, and error handling through a controlled fixture-based setup.

Core Features & Use Cases

  • Fixture-driven test scaffolding with worker-scoped containers (PostgreSQL, RabbitMQ) and per-test dbClient/queueClient instances to guarantee isolation.
  • End-to-end validation of API endpoints across src/websites/{website}/routes with database and queue interactions, aligned to route schemas.
  • Clear guidance for writing tests that cover input validation, edge cases, and expected responses in real-world scenarios.

Quick Start

Install dependencies and run the integration-tests suite to verify endpoint behavior using the prepared fixtures.

Frequently Asked Questions about integration tests

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

FAQPage Schema
How do I isolate API endpoint integration tests across Vitest workers?

API endpoint integration tests achieve fixture isolation by provisioning worker-scoped PostgreSQL and RabbitMQ containers, providing each test with dedicated dbClient and queueClient instances for deterministic behavior.

What does fixture isolation mean for integration testing with PostgreSQL and RabbitMQ?

Fixture isolation in integration testing uses ephemeral PostgreSQL and RabbitMQ containers to provide clean database and queue states per test, preventing cross-test side effects and ensuring reliable validation of data flows.

Can I use Vitest to validate route schemas and database state for API endpoints?

Yes, Vitest can validate route schemas and database state by analyzing endpoint implementations and asserting HTTP results alongside database interactions using isolated ephemeral PostgreSQL containers.

What's the best way to cover edge cases and input validation in endpoint integration tests?

The best way to cover edge cases and input validation is to scaffold tests using isolated database and queue fixtures, guiding validation of input paths, edge cases, and expected HTTP responses in real-world scenarios.

Does this integration testing approach work with RabbitMQ queue interactions?

Yes, this integration testing approach supports RabbitMQ queue interactions by providing per-test queueClient fixtures connected to ephemeral RabbitMQ containers to validate queue side effects alongside HTTP results.

Why do my endpoint integration tests fail when database state is not reset between runs?

Endpoint integration tests fail without database state resets due to cross-test side effects; using worker-scoped ephemeral PostgreSQL containers with per-test dbClient fixtures ensures clean database state and deterministic behavior.