golang-testing

Write and review Go tests using go test, gotests, and goleak.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/constzz/dates-app --skill golang-testing-constzz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-testing
Source: https://github.com/constzz/dates-app/tree/main/.agents/skills/golang-testing
Command: npx skills add https://github.com/constzz/dates-app --skill golang-testing-constzz

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill aids in developing and reviewing production-ready Go code through robust testing and benchmarking practices, addressing flakiness, code coverage, and adherence to best practices.

Core Features & Use Cases

  • Test Automation: Automated test suite with coverage of table-driven tests, testify suites and mocks, parallel tests, and more.
  • Code Quality: Integration with tools like goleak for goroutine leak detection and golangci-lint for linting.
  • Benchmarking: Comprehensive benchmarking with memory and time measurements.
  • Use Case: As a Go engineer, leverage this skill to improve test strategies and benchmarks for your application, ensuring reliability and maintainability.

Quick Start

To generate new tests for an existing or new code, activate the 'golang-testing' skill with the 'Write' mode command: write-tests <file_name>

Frequently Asked Questions about golang-testing

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

FAQPage Schema
How do I generate unit tests for my Golang files?

To generate unit tests for Golang files, activate the skill's 'Write' mode with the command 'write-tests <file_name>'. It utilizes the gotests tool to automatically create table-driven test suites for your code.

How do I detect goroutine leaks in my Go concurrency tests?

To detect goroutine leaks in Go concurrency tests, integrate the goleak dependency into your test suite. This skill includes goleak to verify goroutine cleanup and ensure deterministic testing for timing-related scenarios.

What's the best way to measure memory and time in Go benchmarking?

The best way to measure memory and time in Go benchmarking is using standard 'go test' commands. This skill provides comprehensive benchmarking practices to capture precise performance metrics for your application.

Do I need gotests and goleak installed to use this test automation skill?

Yes, you need gotests and goleak installed as required dependencies. These tools provide the core functionality for automated test generation and goroutine leak detection within your Golang testing workflows.

How does table-driven testing improve Golang code quality?

Table-driven testing improves Golang code quality by structuring test cases cleanly to validate multiple inputs against expected outputs. This skill automates this pattern alongside testify suites and mocks for robust coverage.

Can I run parallel tests and analyze code coverage with this skill?

Yes, you can run parallel tests and analyze code coverage. This skill implements test automation that covers parallel test execution, testify mocks, and thorough code coverage analysis using 'go test'.