Executes database smoke tests for connectivity, query performance, schema validation, data integrity, replication health, and backup operations in release workflows and health checks.
npx claudepluginhub fortiumpartners/ai-meshThis skill uses the workspace's default tool permissions.
**Quick Reference** - Load this first for fast context (~3KB)
Manages database testing: fixtures, transactions, rollback, migrations, integrity checks, performance for PostgreSQL, MySQL, MongoDB, SQLite, Redis with Prisma, Drizzle, Knex.
Executes API smoke tests validating health endpoints, CRUD operations, auth, search, response times, and performance SLAs across staging/production during releases and deployments.
Orchestrates parallel multi-agent E2E validation for database refactors, schema migrations, bulk ingestion pipelines, and query interfaces like QuestDB upgrades. Triggers on E2E validation, schema migration testing, database refactor validation.
Share bugs, ideas, or general feedback.
Quick Reference - Load this first for fast context (~3KB)
Execute comprehensive database smoke tests to validate connectivity, query performance, data integrity, and backup/restore operations during release workflows.
Use this skill when:
skills:
- name: smoke-test-database
path: skills/smoke-test-database/SKILL.md
const { SmokeTestDatabase } = require('./scripts/test-connectivity.js');
const tester = new SmokeTestDatabase({
type: 'postgresql', // or 'mysql', 'mongodb', 'redis'
host: 'localhost',
port: 5432,
database: 'staging_db',
username: 'app_user',
password: process.env.DB_PASSWORD
});
const result = await tester.executeTests({
environment: 'staging',
tests: ['connectivity', 'query-performance', 'schema-validation']
});
if (result.passed) {
console.log('✅ Database smoke tests passed');
} else {
console.error('❌ Database smoke tests failed');
}
environment: staging
database:
type: postgresql
host: staging-db.example.com
port: 5432
database: app_staging
username: app_user
password: ${DB_PASSWORD}
ssl: true
poolSize: 10
tests:
- connectivity
- query-performance
- schema-validation
- data-integrity
SELECT 1 (target: ≤10ms)SELECT * FROM users LIMIT 1 (target: ≤50ms)const SLA_TARGETS = {
connectivity: 1000, // Connection: ≤1000ms
simpleQuery: 10, // SELECT 1: ≤10ms
tableQuery: 50, // Table scan: ≤50ms
joinQuery: 200, // Multi-table join: ≤200ms
writeOperation: 100, // INSERT/UPDATE/DELETE: ≤100ms
replicationLag: 1000, // Replication lag: ≤1000ms
timeout: 30000 // Global timeout: ≤30000ms
};
Pass: All smoke tests must pass
Fail: Any smoke test failure blocks deployment
Database smoke tests are executed at these points in the release workflow:
const result = await tester.testConnectivity({
timeout: 5000,
retries: 2
});
const result = await tester.testQueryPerformance({
queries: [
{ sql: 'SELECT 1', sla: 10 },
{ sql: 'SELECT * FROM users LIMIT 1', sla: 50 }
]
});
const result = await tester.validateSchema({
tables: ['users', 'products', 'orders'],
checkIndexes: true,
checkConstraints: true
});
const result = await tester.validateDataIntegrity({
checks: [
{ table: 'users', expected: { min: 100, max: 1000000 } },
{ table: 'products', constraint: 'price > 0' },
{ query: 'SELECT COUNT(*) FROM orders WHERE user_id NOT IN (SELECT id FROM users)', expected: 0 }
]
});
{
passed: true,
details: {
totalTests: 6,
passed: 6,
failed: 0,
executionTime: 1234
},
reason: 'Database smoke tests passed: All 6 tests passing',
metrics: {
testsPassed: 6,
testsFailed: 0,
averageQueryTime: 45,
maxQueryTime: 198,
executionTime: 1234
},
results: [
{
test: 'connectivity',
category: 'Connection',
passed: true,
duration: 234,
sla: 1000
},
{
test: 'query-performance',
category: 'Performance',
passed: true,
duration: 45,
sla: 50,
details: {
queries: 5,
averageTime: 45,
maxTime: 198
}
}
]
}
pg driver with connection poolinginformation_schema queriesEXPLAIN ANALYZE for query planspg_stat_replication monitoringmysql2 driver with connection poolingINFORMATION_SCHEMA queriesEXPLAIN for query plansSHOW SLAVE STATUS monitoringmongodb driver with connection poolingexplain() for query plansredis client with connection poolingFor comprehensive documentation including:
Load: skills/smoke-test-database/REFERENCE.md (~15KB)