← スキル一覧に戻る

termwright-tui-testing-focused
by fcoury
Playwright-like automation framework for terminal TUI applications
⭐ 1🍴 0📅 2026年1月22日
SKILL.md
name: termwright-tui-testing-focused description: Focused workflow for TUI E2E testing with Termwright. Use for fast agent guidance when running step files, capturing artifacts, and debugging with trace output. allowed-tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
Termwright TUI Testing (Focused)
Quick, agent-friendly workflow for testing terminal UIs with minimal ceremony.
When to Use
- You need to test or debug terminal UIs (ratatui, crossterm, ncurses, etc.)
- You want repeatable E2E flows with artifacts for failures
- You need parallel sessions across multiple daemons
Decision Guide
- Use
run-stepsfor most E2E tests (preferred). - Use
execfor one-off commands or manual inspection. - Use
hubwhen multiple daemons are needed in parallel.
Core Workflow (Preferred)
- Write a step file (YAML or JSON)
- Run with
run-steps - Inspect artifacts and trace on failure
Example Step File
session:
command: ["vim", "test.txt"]
cols: 120
rows: 40
steps:
- waitForText: {text: "VIM", timeoutMs: 5000}
- press: {key: i}
- type: {text: "Hello"}
- press: {key: Escape}
- expectText: {text: "Hello"}
- screenshot: {name: "vim-content"}
artifacts:
mode: onFailure
dir: ./termwright-artifacts
Run the Test
termwright run-steps --trace test.yaml
Artifact/Trace Behavior
onFailure: savefailure-###-screen.txt/jsononly when a step failsalways: savestep-###-screen.txt/jsonafter every stepoff: no artifacts (screenshots require non-off mode)--trace: addstrace.jsonwith step timings and hashes
One-off Commands (Exec)
SOCK=$(termwright daemon --background -- vim test.txt)
termwright exec --socket "$SOCK" --method screen --params '{"format":"text"}'
termwright exec --socket "$SOCK" --method close
Parallel Sessions (Hub)
termwright hub start --count 3 --output sessions.json -- ./my-app
termwright hub stop --input sessions.json
Step Types (Quick Reference)
waitForText,waitForPattern,waitForIdlepress,type,hotkeyexpectText,expectPatternscreenshot
Debugging Tips
- Use
waitForIdlebefore assertions to reduce flakiness - Check
screen.jsonfor color/cursor mismatches - Use
--tracewhen diagnosing timing issues
Protocol Note
Daemon methods use JSON-over-unix-socket. Prefer termwright exec unless you need a custom client.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です