TERMINAL END-TO-END TESTING

Test the terminal.
See what changed.

A real terminal. An authored test.
A failure you can understand.

Playtestr drives interactive CLIs and TUIs with keyboard input, checks the rendered screen, and keeps the evidence when a regression breaks your flow.

Standalone binary. No account. Windows, Linux and Apple silicon macOS.

PRERELEASE v0.4.0-rc.3 · Wide-character repair →
Interactive example · recorded terminal statesPaused

examples/menu.json

  1. 1{
  2. 2 "steps": [
  3. 3 {"expect": "> Deploy preview"},
  4. 4 {"key": "ArrowDown"},
  5. 5 {"expect": "> Run diagnostics"},
  6. 6 {"key": "Enter"},
  7. 7 {"expect": "all systems healthy."}
  8. 8 ]
  9. 9}

Rendered screen

playtestr test examples/menu.json
PLAYTESTR / mission control

> Deploy preview
  Run diagnostics
  Exit

Use arrow keys and Enter. Press q to quit.

Playtestr waits until the initial selection is visible.

Step 1 of 6

Fixture evidence from the repository; interactive data is loading.

Real pseudoterminalsReviewed text snapshotsLocal failure evidenceApache 2.0

THE WORKFLOW

Protect the flow.
Keep the test small.

01

Launch your application

Choose a trusted command and viewport. A real PTY lets the application behave like an interactive terminal session.

Author a test →
02

Drive and assert

Wait for visible text, send keys, resize, and compare a reviewed screen. Assert the exact exit code when the command finishes.

Review snapshots →
03

Understand the failure

Get a nonzero result with the failed step, final screen and diff. Export an offline report for a useful CI-to-local handoff.

Inspect the evidence →

Offline HTML reports require v0.3.0-rc.1 or newer.

READABLE FAILURE EVIDENCE

The screen changed.
Your test caught it.

Snapshot failures show what you expected and what the application rendered. Review the difference before changing a baseline.

Explore real failure reports →

Sanitized evidence from the repository's deliberate menu regression.

diagnostics.txt SNAPSHOT MISMATCH
  PLAYTESTR / mission control
  …
− > Run diagnostics
− Diagnostics: all systems healthy.
+ > Deploy preview
+ Preview deployed successfully.

Expected screen · Actual screen · Text diff

BUILT FOR REGRESSION WORK

From a single interaction
to a repeatable suite.

Bounded execution

Step deadlines, run budgets, output limits and cancellation keep a failure finite. Managed cleanup is reported separately.

Execution contract →

Repeatable starting state

Opt-in workspaces give stateful tests a fresh, bounded fixture copy and explicit cleanup outcomes.

Workspace guide →v0.4.0-rc.1 or newer · spec v2

CI without a service

Pin one runner version, run your suite and retain the evidence. The setup action verifies the release before making it available.

GitHub Actions guide →

BEFORE YOU START

A few useful answers.

Read the terminal contract for the exact boundaries.

Do I need Go or an account?

No. The release binary runs on its own. Your target application and any runtime it needs remain your responsibility. Go is needed only when building from source.

Which version should I choose?

v0.1.0 is the stable MVP. v0.4.0-rc.3 is the newer verified prerelease, with suites, offline HTML reports, workspaces and the selected CJK repair. Check the release notes.

Which platforms are verified?

Windows amd64, Linux amd64 and macOS arm64 have native release evidence. This does not establish support for every OS version, terminal application or architecture. See the evidence.

Is the target application sandboxed?

No. Playtestr uses a real PTY and runs explicitly trusted targets with your permissions. Managed process cleanup has documented platform boundaries.

Does it update snapshots automatically?

No. Baseline updates are explicit and reviewed. Staged updates commit only after the test and cleanup succeed. Understand a changed screen before making it the new expected result.

START WITH ONE USEFUL TEST

Catch a regression
before it ships.

The first-test walkthrough includes a pass, an intentional failure and recovery.