Go (Golang) testing frameworks
Assertion, mocking and test runner libraries for Go, ranked by GitHub stars
更新于 · GitHub stars (stars)
为什么是这20个
Ranked by GitHub stars: how many developers bookmarked the project. Stars measure attention, not quality, so each row also shows forks, licence and the last push. Tools without a public repository have no star count and can't be ranked here.
-
1
Testify
Sacred extension to the standard go testing package.
26,264 stars 1,870 forkslast push 2026-11-20GoMIT
-
2
keploy
Generate Testcase and Data Mocks from API calls automatically.
19,994 stars 2,468 forkslast push 2026-11-26GoApache-2.0
-
3
-
4
GoConvey
BDD-style framework with web UI and live reload.
8,396 stars 557 forkslast push 2024-07-30GoNOASSERTION
-
5
testcontainers-go
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...
5,038 stars 661 forkslast push 2026-11-26GoMIT
-
6
go-cmp
Package for comparing Go values in tests.
4,684 stars 254 forkslast push 2026-11-13GoBSD-3-Clause
-
7
gavv/httpexpect
Concise, declarative, and easy to use end-to-end HTTP and REST API testing.
2,724 stars 241 forkslast push 2025-11-20GoMIT
-
8
-
9
-
10
is
Professional lightweight testing mini-framework for Go.
1,980 stars 70 forkslast push 2024-02-08GoMIT
-
11
gnomock
integration testing with real dependencies (database, cache, even Kubernetes or AWS) running in Docker, without mocks.
1,487 stars 81 forkslast push 2026-04-13GoMIT
-
12
go-vcr
Record and replay your HTTP interactions for fast, deterministic and accurate tests.
1,400 stars 86 forkslast push 2026-11-13GoBSD-2-Clause
-
13
tparse
CLI tool for summarizing go test output. Pipe friendly. Compatible with go test flags.
1,263 stars 42 forkslast push 2026-11-11GoMIT
-
14
embedded-postgres
Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test.
1,259 stars 106 forkslast push 2026-11-24GoMIT
-
15
testfixtures
A helper for Rails' like test fixtures to test database applications.
1,239 stars 95 forkslast push 2026-10-21GoMIT
-
16
go-httpbin
HTTP testing and debugging tool with various endpoints for client testing.
897 stars 186 forkslast push 2026-10-15GoMIT
-
17
-
18
goc
Goc is a comprehensive coverage testing system for The Go Programming Language.
872 stars 138 forkslast push 2026-05-03GoApache-2.0
-
19
baloo
Expressive and versatile end-to-end HTTP API testing made easy.
776 stars 28 forkslast push 2022-08-10GoMIT
-
20
gotest.tools
A collection of packages to augment the go testing package and support common patterns.
576 stars 57 forkslast push 2026-09-14GoNOASSERTION
参考资料
- avelino/awesome-go: Testing Frameworks, GitHub community list (list text MIT; star counts from the GitHub API). Checked 2026-11-26 03:03 UTC.
- avelino/awesome-go (Testing Frameworks), GitHub community list, 72 tools with a public repository.