Terminal Test Pilot

Automate terminal-based product validation using tmux sessions. Use when testing CLI tools, validating multi-process interactions, capturing terminal output for assertions, or integrating terminal automation with end-to-end test suites.

lurui1997 Updated

File contents

Tmux CLI Driver

Drive terminal validation through programmable tmux sessions.

Session Setup

  • Create a detached session with a descriptive name: tmux new-session -d -s <test-name>.
  • Use separate windows or panes for isolated processes (server, client, worker).

Command Execution

  • Send commands with tmux send-keys -t <target> '<command>' Enter.
  • Wait for output readiness with sleep or by polling tmux capture-pane until a target string appears.

Output Capture

  • Capture pane contents: tmux capture-pane -t <target> -p.
  • Write captures to temporary files for diffing or grep assertions.

Cleanup

  • Kill the session after each test: tmux kill-session -t <test-name>.
  • Wrap setup and teardown in a script to ensure isolation even on failure.

Integration

  • Combine with Playwright or Cypress by running the tmux-driven CLI as a subprocess and asserting on exported logs or HTTP endpoints.
  • Return structured pass/fail results with captured stdout/stderr for CI consumption.

lurui1997/awesome_skills/tree/main/terminal-test-pilot commit 6a1f9f64c8

Frequently asked questions

npx skillmds@latest add lurui1997/terminal-test-pilot