Testing in Go
# Map of Go testing strategies — unit to security — with the stdlib-based tools for each and links to the deep-dive notes.
❯ cat documents/
-
Testing in Go — strategies & tooling map
Concept
2026-08-09
Map of Go testing strategies — unit to security — built on the stdlib testing package, with tools and deep-dive links per strategy.
-
End-to-end testing — API clients, browsers, contracts
Concept
2026-08-09
Go end-to-end testing — API-level E2E with plain net/http, browser automation via playwright-go/rod/chromedp, pact-go contracts, and flakiness discipline.
-
Integration testing — httptest, testcontainers-go, real databases
Concept
2026-08-09
Go integration testing — httptest.Server for real HTTP in-process, testcontainers-go and dockertest for real dependencies, suite segregation and DB patterns.
-
Mutation testing — gremlins and go-mutesting
Concept
2026-08-09
Mutation testing in Go with gremlins and go-mutesting — mutation score over coverage, cost controls, and why the practice is rarer than on the JVM.
-
Performance & load testing — testing.B, benchstat, vegeta
Concept
2026-08-09
Go performance testing — testing.B microbenchmarks and their traps, benchstat for statistical honesty, profiling under benchmark, and load testing with vegeta/k6/hey.
-
Property-based testing & fuzzing — rapid and go test -fuzz
Concept
2026-08-09
Generated-input testing in Go — native fuzzing since 1.18 (f.Fuzz, corpus, crashers) and property-based testing with rapid, and when each fits.
-
Security testing — govulncheck, gosec, scanning
Concept
2026-08-09
Security testing for Go — reachability-aware govulncheck, gosec static rules, fuzzing at trust boundaries, dependency and image scanning, and CI wiring.
-
Unit testing — the testing package, table tests, doubles
Concept
2026-08-09
Go unit testing with the stdlib testing package — table-driven tests, subtests, golden files, the assertion-library debate, and test doubles.