From aj-geddes-useful-ai-prompts-4
Designs and implements integration tests verifying component interactions, API endpoints, database operations, and external services. Uses real databases and HTTP requests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:integration-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Integration testing validates that different components, modules, or services work correctly together. Unlike unit tests that isolate single functions, integration tests verify the interactions between multiple parts of your system including databases, APIs, external services, and infrastructure.
Minimal working example:
// test/api/users.integration.test.js
const request = require("supertest");
const app = require("../../src/app");
const { setupTestDB, teardownTestDB } = require("../helpers/db");
describe("User API Integration Tests", () => {
beforeAll(async () => {
await setupTestDB();
});
afterAll(async () => {
await teardownTestDB();
});
beforeEach(async () => {
await clearUsers();
});
describe("POST /api/users", () => {
it("should create a new user with valid data", async () => {
const userData = {
email: "[email protected]",
name: "Test User",
password: "SecurePass123!",
};
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| API Integration Testing | API Integration Testing |
| Database Integration Testing | Database Integration Testing |
| External Service Integration | External Service Integration |
| Message Queue Integration | Message Queue Integration |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Executes integration tests that validate interactions between components, services, and external systems using real database queries, API calls, and message queues.
Guides writing integration tests that verify component interactions (database, API, message bus) with real dependencies. Covers contract testing as a lighter alternative for service boundaries.
Sets up integration tests across databases, APIs, and message queues using Testcontainers, with DB seeding, cleanup strategies, and Docker dependencies.