Cute Gopher Mascot

The Best Go Libraries For Testing (91)

Discover the best Go libraries for Testing! Find the perfect tools to streamline your development and boost productivity. From go-test-coverage to baloo, we've got you covered. Let the coding begin!

go-test-coverage

Tool that reports coverage of files below set threshold

See More! 🚀

baloo

Expressive and versatile end-to-end HTTP API testing made easy

See More! 🚀

be

The minimalist generic test assertion library

See More! 🚀

commander

Tool for testing cli applications on windows, linux and osx

See More! 🚀

endly

Declarative end to end functional testing

See More! 🚀

flute

HTTP client testing framework

See More! 🚀

go-hit

Hit is an http integration test framework written in golang

See More! 🚀

go-vcr

Record and replay your HTTP interactions for fast, deterministic and accurate tests

See More! 🚀

gocrest

Composable hamcrest-like matchers for Go assertions

See More! 🚀

gogiven

YATSPEC-like BDD testing framework for Go

See More! 🚀

testcase

Idiomatic testing framework for Behavior Driven Development

See More! 🚀

testfixtures

A helper for Rails' like test fixtures to test database applications

See More! 🚀

go-sqlmock

Mock SQL driver for testing database interactions

See More! 🚀

govcr

HTTP mock for Golang: record and replay HTTP interactions for offline testing

See More! 🚀

hoverfly

HTTP(S) proxy for recording and simulating REST/SOAP APIs with extensible middleware and easy-to-use CLI

See More! 🚀

httpmock

Easy mocking of HTTP responses from external resources

See More! 🚀

minimock

Mock generator for Go interfaces

See More! 🚀

mockery

Tool to generate Go interfaces

See More! 🚀

testcerts

Dynamically generate self-signed certificates and certificate authorities within your test functions

See More! 🚀

wstest

Websocket client for unit-testing a websocket http.Handler

See More! 🚀

mockhttp

Mock object for Go http.ResponseWriter

See More! 🚀

arch-go

Architecture testing tool for Go projects

See More! 🚀

biff

Bifurcation testing framework, BDD compatible

See More! 🚀

charlatan

Tool to generate fake interface implementations for tests

See More! 🚀

cupaloy

Simple snapshot testing addon for your test framework

See More! 🚀

dbcleaner

Clean database for testing purpose, inspired by `database_cleaner` in Ruby

See More! 🚀

dft

Lightweight, zero dependency docker containers for testing (or more)

See More! 🚀

dsunit

Datastore testing for SQL, NoSQL, structured files

See More! 🚀

embedded-postgres

Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test

See More! 🚀

envite

Dev and testing environment management framework

See More! 🚀

frisby

REST API testing framework

See More! 🚀

gherkingen

BDD boilerplate generator and framework

See More! 🚀

go-httpbin

HTTP testing and debugging tool with various endpoints for client testing

See More! 🚀

go-mutesting

Mutation testing for Go source code

See More! 🚀

go-snaps

Jest-like snapshot testing in Golang

See More! 🚀

go-testdeep

Extremely flexible golang deep comparison, extends the go testing package

See More! 🚀

go-testpredicate

Test predicate style assertions library with extensive diagnostics output

See More! 🚀

goblin

Mocha like testing framework of Go

See More! 🚀

goc

Goc is a comprehensive coverage testing system for The Go Programming Language

See More! 🚀

GoConvey

BDD-style framework with web UI and live reload

See More! 🚀

godog

Cucumber BDD framework for Go

See More! 🚀

gofight

API Handler Testing for Golang Router framework

See More! 🚀

gomatch

library created for testing JSON against patterns

See More! 🚀

Gont

Go network testing toolkit for testing building complex network topologies using Linux namespaces

See More! 🚀

gospecify

This provides a BDD syntax for testing your Go code. It should be familiar to anybody who has used libraries such as rspec

See More! 🚀

gosuite

Brings lightweight test suites with setup/teardown facilities to `testing` by leveraging Go1.7's Subtests

See More! 🚀

got

An enjoyable golang test framework

See More! 🚀

Hamcrest

fluent framework for declarative Matcher objects that, when applied to input values, produce self-describing results

See More! 🚀

httpexpect

Concise, declarative, and easy to use end-to-end HTTP and REST API testing

See More! 🚀

jsonassert

Package for verifying that your JSON payloads are serialized correctly

See More! 🚀

keploy

Generate Testcase and Data Mocks from API calls automatically

See More! 🚀

restit

Go micro framework to help writing RESTful API integration test

See More! 🚀

schema

Quick and easy expression matching for JSON schemas used in requests and responses

See More! 🚀

should

Testing library with zero dependencies, detailed struct diffs and human-readable error messages

See More! 🚀

Testify

Sacred extension to the standard go testing package

See More! 🚀

testza

Full-featured test framework with nice colorized output

See More! 🚀

Tt

Simple and colorful test tools

See More! 🚀

connexions

Combine multiple APIs with meaningful responses, configurable latency and error codes based on OpenAPI 3.0 specifications and files

See More! 🚀

counterfeiter

Tool for generating self-contained mock objects

See More! 🚀

go-txdb

Single transaction based database driver mainly for testing purposes

See More! 🚀

gock

Versatile HTTP mocking made easy

See More! 🚀

gomock

Mocking framework for the Go programming language

See More! 🚀

mockfs

Mock filesystem for Go testing with error injection and latency simulation, built on `testing/fstest.MapFS`

See More! 🚀

moq

Utility that generates a struct from any interface. The struct can be used in test code as a mock of the interface

See More! 🚀

pgxmock

A mock library implementing [pgx - PostgreSQL Driver and Toolkit](https://github.com/jackc/pgx/)

See More! 🚀

timex

A test-friendly replacement for the native `time` package

See More! 🚀

xgo

A general pureposed function mocking library

See More! 🚀

go-fuzz

Randomized testing system

See More! 🚀

Tavor

Generic fuzzing and delta-debugging framework

See More! 🚀

cdp

Type-safe bindings for the Chrome Debugging Protocol that can be used with browsers or other debug targets that implement it

See More! 🚀

chromedp

a way to drive/test Chrome, Safari, Edge, Android Webviews, and other browsers supporting the Chrome Debugging Protocol

See More! 🚀

playwright-go

browser automation library to control Chromium, Firefox and WebKit with a single API

See More! 🚀

rod

A Devtools driver to make web automation and scraping easy

See More! 🚀

failpoint

An implementation of [failpoints](https://www.freebsd.org/cgi/man.cgi?query=fail) for Golang

See More! 🚀

fixenv

Fixture manage engine, inspired by pytest fixtures

See More! 🚀

gnomock

integration testing with real dependencies (database, cache, even Kubernetes or AWS) running in Docker, without mocks

See More! 🚀

is

Professional lightweight testing mini-framework for Go

See More! 🚀

mooncake

A simple way to generate mocks for multiple purposes

See More! 🚀

assert

Basic Assertion Library used along side native go testing, with building blocks for custom assertions

See More! 🚀

go-carpet

Tool for viewing test coverage in terminal

See More! 🚀

go-cmp

Package for comparing Go values in tests

See More! 🚀

go-mysql-test-container

Golang MySQL testcontainer to help with MySQL integration testing

See More! 🚀

gotest.tools

A collection of packages to augment the go testing package and support common patterns

See More! 🚀

omg.testingtools

The simple library for change a values of private fields for testing

See More! 🚀

stop-and-go

Testing helper for concurrency

See More! 🚀

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 enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done

See More! 🚀

testsql

Generate test data from SQL files before testing and clear it after finished

See More! 🚀

tparse

CLI tool for summarizing go test output. Pipe friendly. Compatible with go test flags

See More! 🚀

trial

Quick and easy extendable assertions without introducing much boilerplate

See More! 🚀

go-localstack

Tool for using localstack in AWS testing

See More! 🚀

bonk

Fast, stealth-first browser automation library using Chrome DevTools Protocol over WebSocket with no external dependencies

See More! 🚀