Bruno Testing Overview
Architecture
The API test suite is maintained as a Bruno collection under bruno/. Each numbered folder covers one domain or functional area, and the CLI runner executes those folders directly.
Collection Inventory
| Prefix | Current folders |
|---|---|
00-02 | Setup, health, registries, and external dependencies |
05 | Canary agents |
10-14 | Admin profiles, LLM parameters/capabilities/probes, and feature flags |
20-22 | K12, SDAC, and TAP agents |
30-33 | K12, SDAC, and shared/base tools (32-tools-tap is not currently present) |
40-41 | K12 and TAP workflows |
50-51 | SDAC chat and feedback |
60, 62, 63 | K12 and SDAC end-to-end flows |
70, 75-77 | Docs chat, dashboard, widget, and ingestion |
90 | Manual K12 routing checks |
Running Tests
Generate local Bruno environments from credentials first:
npm run bruno:env:sync
Run the full local collection:
npm run bruno:test:local
Run focused folders:
npm run bruno:test:smoke
npm run bruno:test:k12
npm run bruno:test:sdac
npm run bruno:test:tap
The current bruno:test:tap package script selects 32-tools-tap, but that
folder is absent from the committed collection. Until the script or collection
is reconciled, run the present TAP agent/workflow folders explicitly with
node bruno/scripts/run-bruno-suite.mjs --env local --folder 22-agents-tap,41-workflows-tap.
CI-style execution writes JUnit results to test-results/bruno:
npm run bruno:test:ci
Write Safety
Some endpoints trigger real external writes. The Bruno runner supports write-gate mode with --write-gate, which sets WRITE_GUARD=external.
node bruno/scripts/run-bruno-suite.mjs --env testing --write-gate --output-dir test-results/bruno
For the full manifest of guarded write operations, see tests/shared/dry-run-conformance.test.ts.
Credentials
Credential source files live under bruno/credentials/ and are gitignored. Developers maintain local copies, then run npm run bruno:env:sync to generate Bruno environment files.
Contract and secret checks
Generated runtime contracts are mapped to Bruno requests independently of a live environment:
npm run contracts:check
npm run contracts:bruno
npm run bruno:check-secrets
contracts:bruno validates tool, agent, workflow, and supplemental route
mappings. It does not execute the requests or prove deployed credentials and
dependencies are healthy.
Related
- Test Assertion Patterns -- False-pass detection and assertion standards
- Bruno Test Improvement Loop -- Workflow for fixing and enhancing Bruno assertions
- Testing -- Unit and integration test suite overview