spawn test build
Usage
spawn test build <name> [--reveal-secrets] Renders a test’s test.sql template into final SQL, resolving component includes and template variables. Outputs to stdout.
Arguments
Section titled “Arguments”<name>— The test directory name
Behavior
Section titled “Behavior”Similar to spawn migration build, but for tests. Processes the test.sql template and resolves any component includes or template logic.
Secrets
Section titled “Secrets”Any secret() calls are masked by default; pass --reveal-secrets to render real values for local debugging. test run/test compare/test expect always mask values so secrets cannot be printed, diffed, or persisted in expected output. See the Secrets guide for full details, including why a masked build still verifies each secret is reachable.
Examples
Section titled “Examples”spawn test build user-creationspawn test build user-creation --reveal-secretsOptions
| Option | Description |
|---|---|
--reveal-secrets | Render real secret() values instead of masked placeholders. For local debugging only — build output is not executed. |
-e, --environment <name> | Override the environment for the target config. |
--target <name> | Select which target from spawn.toml to use. |
--config-file <path> | Path to config file. Defaults to spawn.toml. |
-d, --debug | Turn on debug output. |