A Go library for testing HTTP handlers and web frameworks like Gin, Echo, and Mux.
Gofight is a testing utility for Go web applications that simplifies writing tests for HTTP handlers and popular web frameworks. It provides a fluent API to simulate HTTP requests and validate responses, making it easier to ensure API reliability.
Go developers who need to write tests for HTTP handlers in applications using net/http, Gin, Echo, or Gorilla Mux frameworks.
Developers choose Gofight for its clean, chainable interface that reduces boilerplate code and its multi-framework support, which allows consistent testing across different web frameworks.
Testing API Handler written in Golang.
Supports net/http, Gin, Echo, and Gorilla Mux, enabling consistent testing across multiple popular frameworks without switching tools.
Offers a clean, readable interface that reduces boilerplate code, as shown in examples with methods like GET().SetHeader().Run().
Includes SetFileFromPath for simulating multipart file uploads with both absolute paths and byte content, essential for testing upload handlers.
Provides a debug mode via SetDebug(true) that outputs detailed request and response information, aiding in test development and troubleshooting.
Only supports a subset of Go web frameworks; for instance, it lacks support for newer frameworks like Fiber, which may require workarounds or alternative tools.
Relies on third-party libraries like testify for assertions, as seen in examples, adding setup complexity and potential versioning issues.
For JSON response validation, examples use external parsers like jsonparser or gjson, introducing extra dependencies beyond the core testing utility.
A toolkit with common assertions and mocks that plays nicely with the standard library
Open-source platform for creating safe, isolated production sandboxes for API, integration, and E2E testing.
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.