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
| Property | Type | Description |
|---|---|---|
name | string | Unique test identifier |
command | array | Executable path and direct arguments |
cols / rows | integer | PTY dimensions (default: 80x24) |
expect_text | string | Initial text required to appear before input |
input | array | Sequence of key presses or typed strings |
expect_exit | boolean | Set true if the process exits after assertions |
expect_exit_code | integer | Assert exact integer exit status |
allow_running | boolean | Set true if process stays active until cleanup |
timeout_ms | integer | Per-test execution timeout budget in ms |
CLI Execution Flags
ttry test --config ttry.toml --grep "palette" --update-snapshots