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.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.