testing
Guide for testing and verifying code changes in this TUI application. Use this skill after making ANY code changes to main.go or main.md to verify they work correctly.
When & Why to Use This Skill
This Claude skill streamlines the testing and verification process for Terminal User Interface (TUI) applications. It enables developers to automatically validate code changes, ensure UI consistency, and perform functional assertions within a terminal environment, significantly reducing manual QA effort and preventing regressions in Go-based projects.
Use Cases
- Regression Testing: Automatically verify that updates to core logic (main.go) or documentation (main.md) do not break existing terminal interface functionality.
- UI/UX Validation: Capture and analyze terminal screen buffers to ensure that menus, layouts, and display elements render correctly after UI modifications.
- Automated User Simulation: Simulate complex keyboard inputs and control sequences to test application behavior and state transitions without manual intervention.
- Early Error Detection: Utilize integrated 'go vet' and automated test flags to identify potential issues and syntax errors before the application is built or deployed.
| name | testing |
|---|---|
| description | Guide for testing and verifying code changes in this TUI application. Use this skill after making ANY code changes to main.go or main.md to verify they work correctly. |
Testing
This skill helps you create and run tests for terminal user interface (TUI) applications.
When to use this skill
Use this skill:
- After making ANY code changes to verify they work correctly
- When modifying UI elements, menus, or display logic
- When changing application behavior or adding features
- To ensure existing functionality as specified in
main.mdandREADME.mdis not broken
Starting the application
- Run
scripts/run --testwhere the user would normally rungithub-brainscripts/run --test pullequivalently runsgithub-brain pullscripts/run --test mcpequivalently runsgithub-brain mcp- The
--testflag runsgo vetbefore building to catch issues early
- Ensure
.envfiles is configured to use thegithub-brain-testorganization - Use GitHub MCP to add new issue/PRs/discussions as needed for testing
- Simulate user input: Send key presses, control combinations, or specific commands to the running application.
- Capture and analyze screen output: The testing tool captures the terminal display (or buffer) at specific moments in time.
- Make assertions: Verify that the screen content matches the expected output (e.g., checking if specific text is present at certain coordinates or if the cursor position is correct).