Automated ranking

Best Go Testing Libraries

Compare go testing libraries by maintenance, adoption, security, release activity, and Go ecosystem usage. Top packages in this group include Testify, moq, go-sqlmock.

Best overall

Testify

Highest combined package health score.

95
Best maintained

Testify

Strongest maintenance signal in this category.

95
Most adopted

Testify

Highest adoption signal from stars, forks, and imported-by data.

100

Ranked Packages

12 packages

#1 Testify

Module testify is a set of packages that provide many tools for testifying that your code will behave as you intend.

Go Testing Libraries 26.0K stars 15 imported-by 100% confidence
95

#2 moq

Interface mocking tool for go generate

Go Testing Libraries 0 stars 4 imported-by 80% confidence
63

#3 go-sqlmock

Package sqlmock is a mock library implementing sql driver.

Go Testing Libraries 0 stars 761 imported-by 80% confidence
58

#4 toxiproxy

:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Go Testing Libraries 0 stars 30 imported-by 45% confidence
56

#5 jsonassert

Package jsonassert is a Go test assertion library for verifying that two representations of JSON are semantically equal.

Go Testing Libraries 0 stars 11 imported-by 45% confidence
54

#6 hoverfly

Lightweight service virtualization/ API simulation / API mocking tool for developers and testers

Go Testing Libraries 0 stars 0 imported-by 80% confidence
52

#7 dft

Package dft (Docker For Testing) is a lightweight wrapper around docker based on the std lib.

Go Testing Libraries 0 stars 0 imported-by 80% confidence
50

#8 mockery

A mock code autogenerator for Go

Go Testing Libraries 0 stars 8 imported-by 80% confidence
45

#9 testcase

Package testcase is an opinionated testing framework.

Go Testing Libraries 0 stars 0 imported-by 80% confidence
45

#10 gock

HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽

Go Testing Libraries 0 stars 0 imported-by 40% confidence
44

#11 keploy

Open-source platform for creating safe, isolated production sandboxes for API, integration, and E2E testing.

Go Testing Libraries 0 stars 0 imported-by 25% confidence
44

#12 Gomega

Matcher/assertion library designed for expressive Go tests.

Go Testing Libraries 0 stars 0 imported-by 25% confidence
43

Comparison Matrix

score dimensions
Package Health Maintenance Adoption Security Imported by
Testify 95 95 100 92 15
moq 63 83 19 92 4
go-sqlmock 58 27 56 92 761
toxiproxy 56 48 32 92 30
jsonassert 54 48 25 92 11
hoverfly 52 90 7 35 0
dft 50 45 7 92 0
mockery 45 15 23 92 8
testcase 45 27 7 92 0
gock 44 48 5 70 0
keploy 44 48 7 70 0
Gomega 43 48 5 70 0