What problem does it solve?
The go-testing Skill solves the problem of manually creating and updating tests in Go services. It streamlines the process of writing unit and integration tests, including mocks, fuzz tests, and benchmarks.
Core Features & Use Cases
- Unit and Integration Testing: Facilitates the creation of unit and integration tests in Go services.
- Test Templates: Provides pre-defined test templates for table-driven and F-tests.
- Test Helpers: Offers helper functions for common testing tasks.
- HTTP Handler Tests: Supports testing HTTP handlers with the
httptest package.
- Mocking: Incorporates the use of
testify/mock for creating mocks.
- Assertions: Recommends the use of standard library assertions and
testify/assert.
- Integration and Fuzz Tests: Supports writing integration and fuzz tests for complete workflows and edge case discovery.
- Benchmarks: Provides guidance on creating and running benchmarks to measure performance.
- Use Case: If you're developing a Go service and need to write comprehensive tests, this Skill offers a structured approach to testing your code efficiently.
Quick Start
Execute the following command to run all unit tests for your Go service: make test.