The test command runs up to 6 phases: lint (static preflight), structural (verify records exist), ATF suites from manifest steps, ATF suites from config, instance scan checks from manifest, and instance scan suites from config. Each phase reports pass/fail independently. When prior execute results are present, the saved target key must match the current resolved target before any live test client is created.
test
Behavioral testing with ATF suites and instance scans.
sn test <manifest.ts> [--target <name>] [--profile <name>] [--health-check] [--force] Post-execute behavioral testing (6 phases).
Arguments
| Name | Required | Description |
|---|---|---|
| manifest.ts | Yes | Path to the manifest. |
Flags
| Flag | Default | Description |
|---|---|---|
| --target <name> | — | Run behavioral checks against this instance registry key. Must match prior execute results when the manifest has executed steps. |
| --profile <name> | — | Credential profile for test-phase API clients. |
| --health-check | — | Run `sn instance health` as a pre-flight — abort on CRITICAL instance state before any test steps run. |
| --force | — | Proceed past a failing `--health-check` (the pre-flight result is still recorded). |
Examples
sn test manifests/fixtures/test-cross-skill/manifest.tsPhase 1: Structural
✓ 12/12 records verified
Phase 2: ATF Suite (manifest)
✓ Suite: Cross-Skill Tests — 5 passed, 0 failed
Phase 3: Instance Scan (manifest)
✓ 3/3 checks clean (0 findings)
All phases passed.
| Phase | What it checks | Requires execute? |
|---|---|---|
| Lint | Schema, $ref chains, duplicate IDs | No |
| Structural | Records exist with correct field values | Yes |
| ATF (manifest) | Runs create_suite steps from manifest | Yes |
| ATF (external) | Runs suites from manifest.test.atfSuites | No |
| Scan (manifest) | Triggers checks from create_check steps | Yes |
| Scan (external) | Runs suites from manifest.test.scanSuites | No |