Skip to Content
steep

Environment variables

Every variable steep reads, what it overrides, and how values are parsed.

These let you record, tune, or debug any test without changing it:

STEEP_EXPORT_MODE=on STEEP_EXPORT='{name}.mp4,{name}_{mark}.png?match=wait:*' go test -artifacts ./...

The STEEP_* variables override options set in code, unless the harness has WithIgnoreEnv(true). The configurator writes them for you.

Timing

VariableValueReplaces
STEEP_TIMEOUTA duration, default 2sWithTimeout
STEEP_SETTLEA duration, default 100msWithSettle
STEEP_CHECKA duration, default 10msWithCheck
STEEP_SLOWA durationWithSlow
STEEP_TYPING_DELAYA duration to pause after each key press of Type and Key, unless a call passes reel.Delayreel.WithTypingDelay

Debugging

VariableValueReplaces
STEEP_LOGon, true, or 1 adds the logging hookWithLog
STEEP_RECORD_MESSAGESon or off (or true, 1, false, 0)WithRecordMessages
STEEP_SOURCEon or off (or true, 1, false, 0)WithSource

Exports

VariableValueReplaces
STEEP_EXPORT_MODEon (or always, true, 1), failure (or on-failure), or off (or false, 0)WithExportAlways, WithExportOnFailure
STEEP_EXPORTA comma-separated list of outputsThe profile's Outputs, and WithStills
STEEP_EXPORT_DIRA directory. A relative one is relative to the test's package.WithArtifacts
STEEP_EXPORT_FPSA numberProfile.FPS
STEEP_EXPORT_SPEEDA numberProfile.Speed
STEEP_RENDERER_SCALEA numberAdded to Profile.Render, as render.WithScale
STEEP_RENDERER_FONT_FAMILYA font familyAdded to Profile.Render, as render.WithFontFamilyName

Each entry in STEEP_EXPORT is a path with optional query parameters, such as {name}_{status}.gif?max-bytes=5MB. A path that holds {mark} with no marks= or match= is a still at each mark of the events WithStills uses by default.

Snapshots

VariableValueReplaces
STEEP_SNAPSHOT_DIRThe default directory. A directory passed to a snapshot call still wins.snapshot.WithDir
UPDATE_SNAPSHOTSA boolean. Writes snapshots rather than comparing them.snapshot.WithUpdate
UPDATE_SNAPSThe same, for those coming from go-snapssnapshot.WithUpdate

The two UPDATE_* variables aren't STEEP_*, so WithIgnoreEnv doesn't affect them. A snapshot.WithUpdate in code wins over them.

How values are parsed

A value that doesn't parse is ignored, so the option in code still applies. The exception is STEEP_EXPORT: an entry that doesn't parse fails the test, so a typo can't cost you a recording.

Your program's environment

These are read by the test, and they don't reach your program. By default a model's program sees only TTY_FORCE=1 and TERM=xterm-256color. See WithEnvVars.

The reel CLI has its own REEL_* variables.

Last updated on

On this page