Skip to content

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.

  • <name> — The test directory name

Similar to spawn migration build, but for tests. Processes the test.sql template and resolves any component includes or template logic.

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.

Terminal window
spawn test build user-creation
Terminal window
spawn test build user-creation --reveal-secrets

Options

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.