Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run and troubleshoot tests for DBHub, including unit tests, integration tests with Testcontainers, and database-specific tests. Use when asked to run tests, fix test failures, debug integration tests, or troubleshoot Docker/database container issues.
.claude/skills/microck-testing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -54% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -36% | 0% |
This skill helps you run and troubleshoot tests in the DBHub project.
Before running tests, consult TESTING.md for comprehensive documentation.
Common test commands:
pnpm test - Run all testspnpm test:watch - Run tests in watch modepnpm test:integration - Run integration tests (requires Docker)pnpm test src/connectors/__tests__/{db-type}.integration.test.ts - Test specific database connectorIntegration tests use Testcontainers to run real database instances in Docker.
Before running integration tests, verify:
docker psTest individual database connectors:
bash# PostgreSQL pnpm test src/connectors/__tests__/postgres.integration.test.ts # MySQL pnpm test src/connectors/__tests__/mysql.integration.test.ts # MariaDB pnpm test src/connectors/__tests__/mariadb.integration.test.ts # SQL Server pnpm test src/connectors/__tests__/sqlserver.integration.test.ts # SQLite pnpm test src/connectors/__tests__/sqlite.integration.test.ts # JSON RPC integration pnpm test src/__tests__/json-rpc-integration.test.ts
If containers fail to start:
bash# Verify Docker is running docker ps # Check disk space docker system df # Manually pull images docker pull postgres:15-alpine docker pull mysql:8.0 docker pull mariadb:10.11 docker pull mcr.microsoft.com/mssql/server:2019-latest
SQL Server containers require 3-5 minutes to start:
pnpm test src/connectors/__tests__/sqlserver.integration.test.tsbash# Run with verbose output pnpm test:integration --reporter=verbose # Run specific test pattern pnpm test:integration -- --testNamePattern="PostgreSQL" # Check container logs docker logs <container_id>
All integration tests follow this pattern:
IntegrationTestBase classUse this skill when:
src/connectors/__tests__/ - Integration test filesvitest.config.ts - Vitest configuration.github/workflows/ - CI/CD test workflows| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 14,203 | 7,835 | -45% | 1 | 1 | 0% | 2,621 | 2,228 | -15% | 0 | 0 | — |
case-02 | fail→pass | 7,280 | 2,625 | -64% | 1 | 1 | 0% | 1,224 | 1,186 | -3% | 0 | 0 | — |
case-03 | fail→pass | 8,826 | 7,390 | -16% | 1 | 1 | 0% | 1,589 | 2,170 | +37% | 0 | 0 | — |
case-04 | fail→pass | 12,937 | 1,723 | -87% | 1 | 1 | 0% | 2,146 | 991 | -54% | 0 | 0 | — |
case-05 | fail→pass | 10,452 | 2,333 | -78% | 1 | 1 | 0% | 1,776 | 1,138 | -36% | 0 | 0 | — |
case-06 | fail→pass | 10,990 | 1,200 | -89% | 1 | 1 | 0% | 1,742 | 904 | -48% | 0 | 0 | — |
case-07 | fail→pass | 14,920 | 1,526 | -90% | 1 | 1 | 0% | 2,388 | 986 | -59% | 0 | 0 | — |
case-08 | pass→pass | 10,281 | 3,360 | -67% | 1 | 1 | 0% | 1,710 | 1,332 | -22% | 0 | 0 | — |
case-09 | pass→pass | 6,431 | 2,277 | -65% | 1 | 1 | 0% | 1,059 | 1,142 | +8% | 0 | 0 | — |
case-10 | fail→fail | 7,434 | 2,967 | -60% | 1 | 1 | 0% | 1,152 | 1,328 | +15% | 0 | 0 | — |
case-11 | pass→pass | 9,519 | 3,352 | -65% | 1 | 1 | 0% | 1,704 | 1,158 | -32% | 0 | 0 | — |
case-12 | fail→pass | 7,041 | 2,635 | -63% | 1 | 1 | 0% | 1,332 | 1,128 | -15% | 0 | 0 | — |
case-13 | pass→pass | 7,227 | 2,631 | -64% | 1 | 1 | 0% | 1,056 | 1,150 | +9% | 0 | 0 | — |
case-14 | fail→pass | 10,599 | 3,770 | -64% | 1 | 1 | 0% | 1,621 | 1,101 | -32% | 0 | 0 | — |
case-15 | pass→pass | 12,555 | 1,771 | -86% | 1 | 1 | 0% | 1,913 | 1,001 | -48% | 0 | 0 | — |
case-16 | pass→pass | 8,496 | 2,203 | -74% | 1 | 1 | 0% | 1,485 | 1,059 | -29% | 0 | 0 | — |
case-17 | pass→pass | 3,086 | 1,884 | -39% | 1 | 1 | 0% | 495 | 997 | +101% | 0 | 0 | — |
case-18 | pass→pass | 9,139 | 2,142 | -77% | 1 | 1 | 0% | 1,481 | 1,039 | -30% | 0 | 0 | — |
case-19 | pass→pass | 10,512 | 2,500 | -76% | 1 | 1 | 0% | 1,777 | 1,179 | -34% | 0 | 0 | — |
case-20 | pass→pass | 9,777 | 4,766 | -51% | 1 | 1 | 0% | 1,796 | 1,531 | -15% | 0 | 0 | — |
case-21 | pass→pass | 5,669 | 6,894 | +22% | 1 | 1 | 0% | 1,119 | 1,997 | +78% | 0 | 0 | — |
case-22 | pass→pass | 8,961 | 7,431 | -17% | 1 | 1 | 0% | 1,734 | 2,114 | +22% | 0 | 0 | — |
case-23 | pass→pass | 14,321 | 8,007 | -44% | 1 | 1 | 0% | 2,666 | 2,203 | -17% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +39 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.