testing

Standardize Go testing practices with testscript and testutil patterns.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/invowk/invowk --skill testing-invowk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/invowk/invowk/tree/main/.claude/skills/testing
Command: npx skills add https://github.com/invowk/invowk --skill testing-invowk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides teams to write consistent, reliable tests across Go projects, covering unit tests, testscript-based CLI tests, race-condition debugging, and TUI/container test scenarios.

Core Features & Use Cases

  • Centralized test helper patterns in the testutil package for reuse across packages.
  • Guidance for testscript workflows and embedded invkfile.cue style test definitions.
  • Strategies to avoid flaky tests, use fake clocks, and manage time-dependent tests across platforms.
  • Best practices for testing TUI components (Bubble Tea models) and container runtimes.
  • Cross-reference to internal guidelines (.claude/rules/testing.md) for extended patterns.

Quick Start

Apply these testing patterns to your Go projects by centralizing helpers, adopting testscript workflows, and validating flaky tests.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I standardize Go test helpers across multiple packages?

Consolidate shared utilities into a centralized testutil package to standardize Go test helpers, ensuring consistent test organization and reusable validation patterns across all packages in your codebase.

What is the best way to write testscript-based CLI tests in Go?

Testscript-based CLI tests in Go use .txtar files to define executable test scenarios, standardizing CLI workflows while avoiding global working-directory setup through specialized invkfiletest helpers.

How do I fix flaky Go tests caused by race conditions and time dependencies?

Manage time-dependent logic using fake clocks and apply standardized race-condition debugging strategies to isolate and resolve concurrent execution issues, fixing flaky Go tests across platforms.

Can I test Bubble Tea TUI components and container runtimes in Go?

Test Bubble Tea TUI components and container runtimes in Go by applying standardized testing patterns that validate UI model behavior and runtime interactions reliably within your existing test suite.

How do I structure embedded test definitions using invkfile.cue in Go?

Integrate testscript workflows with invkfile.cue to declaratively define and execute CLI test cases, structuring embedded test definitions directly alongside your existing Go test files.