golang-testing

Write and debug Golang tests with gotests and goleak.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/LuigiAPCPereira/evolutiondocs --skill golang-testing-luigiapcpereira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-testing
Source: https://github.com/LuigiAPCPereira/evolutiondocs/tree/main/.agents/skills/golang-testing
Command: npx skills add https://github.com/LuigiAPCPereira/evolutiondocs --skill golang-testing-luigiapcpereira

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gotests, goleak, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill Unit provides a comprehensive guide to writing, reviewing, and debugging Golang tests, addressing common challenges in test suite maintenance and performance.

Core Features & Use Cases

  • Table-Driven Tests: Structured testing with named subtests, ensuring comprehensive coverage.
  • Test Strategy Design: Guidance on effective test strategies and failure analysis.
  • Audit and Debugging: Tools for auditing test suites and debugging flaky or slow tests.
  • Best Practices: Principles for writing maintainable, fast, and reliable tests.
  • Integration with CI/CD: Seamless integration with Continuous Integration and Continuous Deployment pipelines.
  • Use Case: When building or reviewing Golang codebases, use this Skill Unit to ensure your tests are up to industry standards.

Quick Start

Activate the 'golang-testing' skill and begin implementing best practices for your Go test suite.

Frequently Asked Questions about golang-testing

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

FAQPage Schema
How do I write table-driven tests in Golang with named subtests?

Golang test strategy design provides guidance on effective test structuring and failure analysis. It helps you establish principles for writing maintainable, fast, and reliable tests, ensuring your test suite meets industry standards and handles common maintenance challenges.

How do I debug flaky or slow Golang tests in my test suite?

Debugging flaky or slow Golang tests involves auditing your test suite using specialized tools to identify performance bottlenecks and instability. You can analyze test failures and apply best practices to isolate issues, ensuring your tests run reliably and quickly.

Does the gotests tool support automated test generation for Golang?

The gotests tool supports automated test generation for Golang by creating test scaffolding based on your function signatures. It integrates directly into the testing workflow to accelerate test development, allowing you to focus on defining test logic and expected outcomes.

How do I detect goroutine leaks when running Go tests?

Detecting goroutine leaks when running Go tests utilizes the goleak tool to identify unreleased goroutines after test execution. Integrating goleak into your test suite helps audit resource management, preventing memory leaks and ensuring clean test teardowns.

Can I integrate Golang test suites with CI/CD pipelines?

You can integrate Golang test suites with CI/CD pipelines to automate test execution during continuous integration and deployment. This seamless integration ensures code quality checks run consistently, validating that changes meet testing standards before release.