testing
Run, debug, and manage DBHub tests including unit, integration with Testcontainers, and database-specific suites. Perfect for verifying code changes and troubleshooting database connector issues.
Introduction
This testing skill is a comprehensive suite designed to ensure the reliability and performance of the DBHub MCP server. It provides a structured environment for developers to execute unit tests, integration tests, and environment-specific database validation. Whether you are adding new features, patching bugs, or performing regression testing, this skill enables you to verify the integrity of the system against multiple database backends including PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite. The skill handles the complex lifecycle management of containerized databases via Testcontainers, ensuring that tests are isolated, reproducible, and robust. It is designed for engineers maintaining the DBHub codebase who need to ensure that database connectivity, SQL parsing, and custom tool handlers operate correctly under various configurations.
-
Executes unit and integration test suites using Vitest, with support for specific file targeting and name patterns.
-
Manages lifecycle orchestration for Docker-based integration tests, specifically for SQL Server, PostgreSQL, MySQL, and MariaDB containers.
-
Provides debugging capabilities including verbose reporter outputs and interactive watch modes for real-time development feedback.
-
Leverages shared test suites for schema operations, data insertion, and stored procedure validation across different database drivers.
-
Facilitates testing of complex scenarios like SSH tunneling, multi-source configurations via TOML, and tool-level execution constraints.
-
Requires Docker to be running and accessible for all integration test tasks.
-
Integration tests follow a specific naming convention (*integration.test.ts) to be correctly categorized by the Vitest configuration.
-
Database containers such as SQL Server may require additional system resources (4GB+ RAM) and longer startup times (3-5 minutes).
-
Use the 'pnpm test' command for full suites or filter by project (unit vs. integration) to optimize performance during iterative development.
-
If tests fail, utilize the built-in troubleshooting documentation to investigate container startup issues, check leaked container resources, or verify CI/CD workflow logs.
Repository Stats
- Stars
- 2,669
- Forks
- 226
- Open Issues
- 8
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 30, 2026, 04:34 PM