sndev.io / docs

test

Behavioral testing with ATF suites and instance scans.

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.

sn test <manifest.ts> [--target <name>] [--profile <name>] [--health-check] [--force]

Post-execute behavioral testing (6 phases).

Arguments

NameRequiredDescription
manifest.tsYesPath to the manifest.

Flags

FlagDefaultDescription
--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-checkRun `sn instance health` as a pre-flight — abort on CRITICAL instance state before any test steps run.
--forceProceed past a failing `--health-check` (the pre-flight result is still recorded).

Examples

sn test manifests/fixtures/test-cross-skill/manifest.ts
Phase 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.
PhaseWhat it checksRequires execute?
LintSchema, $ref chains, duplicate IDsNo
StructuralRecords exist with correct field valuesYes
ATF (manifest)Runs create_suite steps from manifestYes
ATF (external)Runs suites from manifest.test.atfSuitesNo
Scan (manifest)Triggers checks from create_check stepsYes
Scan (external)Runs suites from manifest.test.scanSuitesNo