termwright-tui-testing

Automate end-to-end testing of terminal UIs with Termwright.

1|Updated Mar 30, 2022
One-click install
npx skills add https://github.com/fcoury/config --skill termwright-tui-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: termwright-tui-testing
Source: https://github.com/fcoury/config/tree/main/ai/skills/termwright-tui-testing
Command: npx skills add https://github.com/fcoury/config --skill termwright-tui-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the testing and debugging of terminal-based user interfaces (TUIs), streamlining the development and quality assurance process for command-line applications.

Core Features & Use Cases

  • End-to-End Testing: Execute predefined step files to simulate user interactions and verify TUI behavior.
  • Daemon-based Automation: Control TUI applications via a robust daemon protocol for complex interactions.
  • Artifact Generation: Capture screenshots, screen states, and execution traces for detailed analysis and debugging.
  • Use Case: Automatically test your new TUI application's navigation, input handling, and output display by running a series of predefined steps, ensuring it functions correctly across different scenarios.

Quick Start

Run the provided step file 'test.yaml' with trace output enabled.

Frequently Asked Questions about termwright-tui-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate terminal UI testing for ratatui or ncurses applications?

Automate terminal UI testing by executing predefined step files to simulate user interactions and verify TUI behavior. This Skill controls TUI apps via a daemon protocol, capturing screenshots and execution traces to validate navigation, input handling, and output display across different scenarios.

What is the best way to debug a TUI application automatically?

Debug a TUI application automatically by running predefined steps through a daemon protocol that generates detailed artifacts. Capture screen states, screenshots, and execution traces to analyze terminal-based interfaces, ensuring command-line applications function correctly without manual inspection.

Does Termwright support end-to-end testing for crossterm-based interfaces?

Termwright supports end-to-end testing for crossterm-based interfaces by executing step files that simulate complex terminal interactions. The daemon-based automation controls the application, while artifact generation captures screen states and traces for thorough analysis and verification.

How do I capture screenshots and screen states during terminal automation?

Capture screenshots and screen states during terminal automation by running step files with trace output enabled. The daemon protocol controls the TUI application and generates execution artifacts, providing detailed screen captures and state data for debugging terminal-based interfaces.

Can I use step files to simulate user interactions in terminal testing?

Use step files to simulate user interactions in terminal testing by defining predefined steps that the daemon executes against the TUI application. This automates navigation, input handling, and output verification, generating execution traces and screenshots for analysis.

What are the limitations of automating terminal UI tests with a daemon protocol?

Automating terminal UI tests with a daemon protocol requires predefined step files and depends on daemon control for complex interactions. It is suited for TUI apps like ratatui, crossterm, and ncurses, but requires proper step file configuration to accurately simulate terminal interactions and capture artifacts.