
Integration Test Builder
This builds out complete integration test suites for API endpoints with database interactions. You get test harness scaffolding with setup/teardown, database seeding with Prisma, and full CRUD endpoint tests that verify both HTTP responses and database state. It covers the practical stuff like transaction rollback verification, fixture management, and the arrange/act/assert pattern throughout. Useful when you need to test actual database flows rather than mocking everything out, especially for order processing, user management, or any multi-step operations where you want to confirm the database ended up in the right state. The CI-friendly approach with isolated test databases and automatic cleanup between tests is solid.
- skills.sh installs
- 263
- GitHub stars
- 63
- last updated
- Aug 21, 2026
Install
$ npx -y skills add patricio0312rev/skills --skill integration-test-builder --agent claude-codeInstalls into .claude/skills of the current project.
Files
Integration Test Builder
Build comprehensive integration tests for APIs and database flows.
Test Harness Setup
// tests/setup/test-harness.ts
import { PrismaClient } from "@prisma/client";
import { execSync } from "child_process";
export class TestHarness {
prisma: PrismaClient;
async setup() {
// Setup test database
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL;
// Run migrations
execSync("npx prisma migrate deploy");
// Initialize Prisma client
this.prisma = new PrismaClient();
// Clear all data
await this.clearDatabase();
}
async teardown() {
await this.prisma.$disconnect();
}
async clearDatabase() {
const tables = await this.prisma.$queryRaw<{ tablename: string }[]>`
SELECT tablename FROM pg_tables WHERE schemaname = 'public'
`;
for (const { tablename } of tables) {
if (tablename !== "_prisma_migrations") {
await this.prisma.$executeRawUnsafe(
`TRUNCATE TABLE "${tablename}" CASCADE`
);
}
}
}
Sponsors
Details
- Repository
- github.com/patricio0312rev/skills
- Categories
- Backend & APIs, Testing & QA, DevOps & CI/CD, Databases
- First seen
- Jun 3, 2026
More from patricio0312rev/skills
All 138- Vector Db Setup263
- Alerting Dashboard Builder262
- Contract Testing Builder262
- Rollback Workflow Builder262
- Schema Consistency Checker262
- Data Seeding Fixtures Builder261
- Docs Starter Kit261
- Monorepo Ci Optimizer261
- Postmortem Writer261
- Prompt Regression Tester261
- Release Automation Builder261
- State Ux Flow Builder261
- Zustand State Builder261
- Api Versioning Deprecation Planner260
- Capacity Planning Helper260
- Coverage Strategist259
- Deployment Checklist Generator259
- Caching Cdn Strategy Planner258
- Dependency Doctor258
- Kubernetes Manifest Generator258
- Api Endpoint Generator257
- Embedding Pipeline Builder255
- Llm Debugger255
- Tool Function Schema Designer255