What problem does it solve?
This Skill helps developers write clean, maintainable, and efficient Go test code. It provides a comprehensive reference for naming conventions, table-driven tests, parallel execution, race detectors, and more.
Core Features & Use Cases
- Naming Conventions: Guidelines for naming test functions, tables, and helper functions.
- Table-Driven Tests: Best practices for writing table-driven tests, including structuring data and handling errors.
- Parallel Execution: How to use
t.Parallel() effectively to speed up test execution.
- Race Detectors: Techniques for identifying and fixing race conditions in concurrent code.
- Test Design Techniques: Black-box vs. white-box testing, boundary value analysis, equivalence partitioning, and more.
- Mocking and Stubbing: Strategies for using fakes, stubs, and mocks to isolate tests.
- Test Fixtures and Data: How to create and use test fixtures and golden files.
- Test Organization: Unit tests, integration tests, and end-to-end tests with examples.
Quick Start
Run the go-test skill to review and improve your Go test code.