testing

Run DBHub unit and integration tests across multiple databases with Testcontainers.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill testing-microck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/skills_all/testing
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill testing-microck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Streamlines running unit and integration tests for DBHub projects, with guidance on using Testcontainers and Docker for reliable testing.

Core Features & Use Cases

  • Quick test commands for unit and integration tests
  • Docker/Testcontainers-based integration strategies
  • Troubleshooting guidance for common container issues

Quick Start

Run the integration test for MySQL: pnpm test src/connectors/__tests__/mysql.integration.test.ts

Frequently Asked Questions about testing

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

FAQPage Schema
How do I run integration tests with Testcontainers and Docker?

Integration tests with Testcontainers spin up isolated database containers—PostgreSQL, MySQL, MariaDB, SQL Server, or SQLite—for each test run, ensuring reliable end-to-end verification without polluting your local environment. Run `pnpm test:integration` to execute all integration tests against containerized databases.

What's the best way to troubleshoot failing Docker container tests?

Troubleshoot container test failures by running tests in verbose mode, inspecting container logs, and verifying Docker has sufficient memory allocated. Check that Docker daemon is running and pull latest images before retrying; common issues stem from resource constraints or stale container states.

Can I test across multiple databases like PostgreSQL, MySQL, and MariaDB in the same test suite?

Yes. Testcontainers lets you define database-specific test files for PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite within the same project. Run individual database tests with `pnpm test src/connectors/__tests__/[database].integration.test.ts` to verify code quality across all supported backends.

What prerequisites do I need before running integration tests?

Ensure Docker is installed and running with adequate memory allocation, and install pnpm as your package manager. These prerequisites enable Testcontainers to provision and manage database containers automatically during test execution.

How do unit tests and integration tests differ in this testing workflow?

Unit tests verify individual components in isolation without external dependencies, while integration tests use Testcontainers to spin up actual database containers, validating that code works end-to-end with real database engines and detecting environment-specific failures.