2 min read

Configuration

Table of Contents

Configuration file (ttry.toml)

ttry reads deterministic test declarations from ttry.toml:

[suite]
timeout_ms = 10000
reporter = "dot"

[[tests]]
name = "open command palette"
command = ["./target/debug/my-tui"]
cols = 80
rows = 24
expect_text = "Welcome"
input = ["ctrl+p", "help\n"]
expect_exit = true

Test Properties

PropertyTypeDescription
namestringUnique test identifier
commandarrayExecutable path and direct arguments
cols / rowsintegerPTY dimensions (default: 80x24)
expect_textstringInitial text required to appear before input
inputarraySequence of key presses or typed strings
expect_exitbooleanSet true if the process exits after assertions
expect_exit_codeintegerAssert exact integer exit status
allow_runningbooleanSet true if process stays active until cleanup
timeout_msintegerPer-test execution timeout budget in ms

CLI Execution Flags

ttry test --config ttry.toml --grep "palette" --update-snapshots