testty
testty is a framework for end-to-end testing of terminal apps. It launches your real app and checks what shows up on screen — text, colors, and highlights — with a single Rust API.
Installation
[]
= "0.9"
= "3"
Capabilities
Reliable • No flaky tests
- Auto-wait.
wait_for_stable_frameandeventuallywait for the screen to settle before asserting, so you never hard-code sleeps. - Screen-first assertions. Check visible text, colors, and highlighted items, with ready-made helpers for tabs, dialogs, and footers.
- Full isolation. Each test runs your real binary in its own workspace, so tests never bleed into one another.
Proof you can share
- Snapshots. Compare a run against a saved baseline — screen text or pixels.
- Reports. Save what each test saw as plain text, a screenshot, an animated GIF, or a self-contained HTML report.
Examples
Write a test
use Scenario;
use PtySessionBuilder;
Wait for something to appear
use Duration;
use assertion;
use Region;
use Scenario;
let scenario = new
.write_text
.eventually
.capture;
Compare against a saved baseline
use ;
let config = new;
assert_frame_snapshot_matches
.expect;
Save a shareable report
use Path;
use HtmlBackend;
let = scenario.run_with_proof.expect;
report.save.unwrap;
Resources
- Getting started — install, write your first test, run it
- Scenarios — describe a sequence of actions and waits
- Assertions — check text, colors, and highlights on screen
- Snapshots — compare a test against a saved baseline
- Proof pipeline — save what a test saw as text, image, GIF, or HTML
- Journeys — reusable building blocks for tests
- Frame diffing — see what changed between two screens
- Examples — runnable example programs
- Upgrading — version migration notes
- API reference — full generated docs
License
Apache-2.0. See LICENSE.