go-testing

Generate Go unit, integration, and UI test templates with golden files and mocks.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/carlosamesar/framework-sdd --skill go-testing-carlosamesar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-testing
Source: https://github.com/carlosamesar/framework-sdd/tree/main/.opencode/skills/go-testing
Command: npx skills add https://github.com/carlosamesar/framework-sdd --skill go-testing-carlosamesar

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies the process of writing and maintaining comprehensive tests in Go, ensuring reliable and high-quality code.

Core Features & Use Cases

  • Testing Patterns: Implements table-driven testing, TUI component testing with teatest, golden file output comparisons, and mock system interactions.
  • Scenario Coverage: Suitable for unit testing functions, TUI applications built with Bubbletea, and system command execution validation.
  • Use Case: Developers can verify complex UI state transitions or function outputs across multiple inputs efficiently and consistently.

Quick Start

Use the go-testing skill to verify the correctness of your Bubbletea TUI component by running the example test for screen navigation.

Frequently Asked Questions about go-testing

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

FAQPage Schema
How do I write unit tests for Bubbletea TUI components in Go?

You can unit test Bubbletea TUI components in Go by using teatest to verify screen navigation and complex UI state transitions. This approach ensures consistent validation of user interface interactions across multiple inputs and scenarios.

What is the best way to structure Go testing for multiple input scenarios?

The best way to structure Go testing for multiple inputs is table-driven testing. This pattern allows you to verify function outputs across various inputs efficiently and consistently, improving code quality and maintainability.

How do golden files work for validating Go test outputs?

Golden files validate Go test outputs by comparing generated results against saved baseline files. This ensures reliable validation of function outputs and system command execution without manual result inspection.

Can I mock system command execution in Go integration tests?

Yes, you can mock system command execution in Go integration tests. This allows you to validate system interactions reliably without depending on actual system commands, ensuring consistent test environments.

Does this Go testing approach require any external dependencies?

No, this Go testing approach does not require external dependencies to implement. It provides structured templates and code snippets for unit, integration, and UI tests that work within your existing Go development environment.