managing-database-tests

Installation
SKILL.md

Database Test Manager

Overview

Manage database testing including fixture loading, transaction-based test isolation, migration validation, query performance testing, and data integrity checks. Supports PostgreSQL, MySQL, MongoDB, SQLite (in-memory), and Redis with ORM-agnostic patterns for Prisma, TypeORM, SQLAlchemy, Knex, and Drizzle.

Prerequisites

  • Database instance available for testing (Docker container, in-memory SQLite, or dedicated test server)
  • Database client library and ORM installed (Prisma, TypeORM, Knex, SQLAlchemy, etc.)
  • Migration files up to date and tested independently
  • Test database connection string configured in environment (distinct from development/production)
  • Database seed data scripts for baseline test state

Instructions

  1. Set up the test database infrastructure:
    • Use Docker to spin up a dedicated test database: docker run -d -p 5433:5432 --name test-db postgres:16-alpine.
    • Or use SQLite in-memory mode for fast unit tests: sqlite::memory:.
    • Or use Testcontainers for ephemeral database per test suite.
Related skills
Installs
24
GitHub Stars
2.2K
First Seen
Feb 1, 2026