test-environment-preparation

Automates database state management to prepare a clean test environment via db-switch.sh script.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/leandro-br-dev/charhub --skill test-environment-preparation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-environment-preparation
Source: https://github.com/leandro-br-dev/charhub/tree/main/docs/agents/coder/skills/orchestration/test-environment-preparation
Command: npx skills add https://github.com/leandro-br-dev/charhub --skill test-environment-preparation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prepare the test environment for automated testing by managing database state to ensure a clean test database and to prevent development data from impacting tests.

Core Features & Use Cases

  • Backup development database and stash a recoverable copy
  • Create a clean test database and isolate test data
  • Apply pending migrations to the test database
  • Verify connectivity and readiness before running tests
  • Restore development database after testing

Quick Start

Run the preparation to back up the development database, create a clean test database, apply migrations, and verify connectivity before starting tests.

Frequently Asked Questions about test-environment-preparation

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

FAQPage Schema
How do I isolate a clean test database from my development data?▼

To isolate a clean test database from development data, you need to back up your dev DB, create a separate test DB, and apply migrations. This Skill automates that exact process to ensure parallel test runs do not impact development data.

How do I prepare a test environment with Prisma and Docker for automated testing?▼

Preparing a test environment with Prisma and Docker involves managing database state and applying pending migrations. This Skill automates backup, migration, and connectivity verification before running tests to ensure a clean state.

Can I run parallel automated tests without them overwriting each other's database state?▼

Yes, you can run parallel automated tests without database state conflicts by isolating test data. This Skill manages database switching to ensure each parallel task executes against a clean, independently prepared test database.

What is the best way to backup and restore a development database during test runs?▼

The best way to backup and restore a development database during test runs is to automate the lifecycle. This Skill stashes a recoverable copy before testing and automatically restores the development database state afterward.

Does this test environment preparation script verify database connectivity before running tests?▼

Yes, the test environment preparation script verifies database connectivity and readiness. It checks the connection after applying migrations to ensure the clean test database is fully prepared before tests execute.