nocobase-db-integration-testing

Selects and runs NocoBase v3 database dialect integration test suites based on changed packages.

9|3|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/nocobase/nocobase3 --skill nocobase-db-integration-testing-nocobase
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nocobase-db-integration-testing
Source: https://github.com/nocobase/nocobase3/tree/main/.agents/skills/nocobase-db-integration-testing
Command: npx skills add https://github.com/nocobase/nocobase3 --skill nocobase-db-integration-testing-nocobase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After changing NocoBase v3 database packages, developers waste hours running all eight dialect integration suites locally or accidentally run commands that execute no integration tests at all. This Skill maps each type of change to the minimal set of dialect suites that actually need to run. ## Core Features & Use Cases - Change-to-Suite Mapping: Matches modifications in packages/libs/db, db-testkit, or db-<dialect> packages to the specific dialect suites that must run, deferring the rest to CI. - Correct Command Generation: Produces the right pnpm filter commands, including --test-file narrowing, --pause-on-failure debugging, and KEEP_TEST_DB container retention. - Pitfall Prevention: Warns against common failures such as running two suites concurrently, dropping the standalone -- separator, or relying on pnpm -r test which skips integration tests entirely. - Use Case: You modified SQL generation in packages/libs/db/src/query. The Skill tells you to run sqlite first, then postgres, mysql, and kingbase sequentially, with the exact commands for each. ## Quick Start Ask the assistant which database integration suites to run after your change to packages/libs/db and have it execute them with the correct dialect commands.

Frequently Asked Questions about nocobase-db-integration-testing

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

FAQPage Schema
How do I run NocoBase database integration tests for one dialect?▼

Run pnpm --filter @nocobase/db-<dialect> test:integration from the repository root, for example pnpm --filter @nocobase/db-postgres test:integration. Always name the dialect package directly since @nocobase/db has no integration script.

Which integration tests should I run after changing packages/libs/db?▼

Changes under query, schema, repository, metadata, migration, or json.ts require sqlite first, then postgres, mysql, and kingbase sequentially. Changes to naming, types, or tokens only need unit tests with no integration suite.

How do I run a specific integration test file in NocoBase?▼

Append a standalone -- followed by --test-file arguments, with paths relative to packages/libs/db-testkit/tests/integration. Dropping the standalone -- leaves the flag unconsumed and silently runs the whole shared suite.

Why do NocoBase integration tests fail when run in parallel?▼

Two suites running at once share one Docker daemon, and the contention pushes container health checks past their start period, failing the run during startup. Run suites one at a time and never background or chain them with &.

Does pnpm -r test run the NocoBase integration suites?▼

No, pnpm -r test excludes **/tests/integration/** in every db-* package, so it reports success while executing no integration tests. Use the per-dialect test:integration scripts instead.

When should I not use this NocoBase testing workflow?▼

Do not use it for unit tests, for packages outside packages/libs/db*, or for NocoBase v2 repositories that contain packages/core/database instead of packages/libs/db. Those follow a different test protocol.