Unit Testing (Pro): Packs and Running Tests
This page expands the “how to adopt tests gradually” workflow: packs, connection prerequisites, and running targeted subsets.
Packs (starter baselines)
Packs generate a sensible starter set of tests so you don’t have to write everything by hand.
Built-in packs currently available:
- Metadata Quality: descriptions, naming, formatting, and related modeling quality checks.
- Referential Integrity: orphan-key checks from existing relationships.
- Time Intelligence: date-table checks (including date table marking + continuity patterns).
Prompts:
“List available packs and explain what each covers.” “Apply the recommended baseline pack for this model. Show generated tests before running.”Model connection (important)
Some operations require an active model connection (running tests, applying packs, managing baselines, checking capabilities).
Best practice prompt:
“Confirm which model we’re connected to. Then list packs and apply the baseline pack for this model.”Where tests and baselines live
Tests and baselines are stored by the MCP server (not your chat client), so they persist across sessions and are shared across clients on the same machine. For details on state isolation and cross-client behavior, see Server state and isolation.
Recommended workflow (adopt tests gradually)
- Start with a pack (metadata + referential integrity are common baselines).
- Add a handful of critical measure assertions (top KPIs).
- Add one performance budget for your most important query.
- Run tests after changes and export results for review.
Copy/paste prompt:
“Apply a metadata quality pack, then add 3 measure assertion tests for our core KPIs. Run them and export results as Markdown.”Running only what you need
You can ask the assistant to run:
- all enabled tests,
- only specific tests by ID,
- only certain tags (for example
smoke,critical), - only specific test types,
- and optionally stop early on first failure.
Prompts:
“Run only tests taggedsmoke and summarize failures first.”
“Run only measure assertions and performance budgets.”
“Run these test IDs only: kpi-sales, kpi-margin, ri-sales-customer.”
“Stop on first failure for this run so we can debug quickly.”