Tag

gock

0 views collected around this technical thread.

Raymond Ops
Raymond Ops
Apr 17, 2025 · Backend Development

Master HTTP Mocking in Go: httptest & gock Tutorial

This article explains how to use Go's httptest package and the gock library to mock HTTP servers and external API calls, providing step‑by‑step code examples, test case design, and practical tips for reliable backend unit testing.

Gobackend developmentgock
0 likes · 13 min read
Master HTTP Mocking in Go: httptest & gock Tutorial
Go Programming World
Go Programming World
May 11, 2024 · Backend Development

Testing HTTP Applications in Go: Isolating External Dependencies

This article explains how to write reliable unit tests for Go HTTP applications by isolating external dependencies, covering server‑side handlers, client‑side monitoring, and using tools such as net/http/httptest, testify, and gock to create test doubles and mock HTTP services.

GoHTTPTestify
0 likes · 21 min read
Testing HTTP Applications in Go: Isolating External Dependencies