Awesome Go

Testing

91 libraries in this category

go-test-coverage

Tool that reports coverage of files below set threshold

TestingTesting Frameworks
baloo

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

TestingTesting Frameworks
be

The minimalist generic test assertion library

TestingTesting Frameworks
commander

Tool for testing cli applications on windows, linux and osx

TestingTesting Frameworks
endly

Declarative end to end functional testing

TestingTesting Frameworks
flute

HTTP client testing framework

TestingTesting Frameworks
go-cmp

Package for comparing Go values in tests

TestingTesting Frameworks
go-hit

Hit is an http integration test framework written in golang

TestingTesting Frameworks
go-vcr

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

TestingTesting Frameworks
gocrest

Composable hamcrest-like matchers for Go assertions

TestingTesting Frameworks
gogiven

YATSPEC-like BDD testing framework for Go

TestingTesting Frameworks
testcase

Idiomatic testing framework for Behavior Driven Development

TestingTesting Frameworks
testfixtures

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

TestingTesting Frameworks
trial

Quick and easy extendable assertions without introducing much boilerplate

TestingTesting Frameworks
go-sqlmock

Mock SQL driver for testing database interactions

TestingMock
govcr

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

TestingMock
hoverfly

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

TestingMock
httpmock

Easy mocking of HTTP responses from external resources

TestingMock
minimock

Mock generator for Go interfaces

TestingMock
mockery

Tool to generate Go interfaces

TestingMock
arch-go

Architecture testing tool for Go projects

TestingTesting Frameworks
assert

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

TestingTesting Frameworks
biff

Bifurcation testing framework, BDD compatible

TestingTesting Frameworks
charlatan

Tool to generate fake interface implementations for tests

TestingTesting Frameworks
cupaloy

Simple snapshot testing addon for your test framework

TestingTesting Frameworks
dbcleaner

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

TestingTesting Frameworks
dft

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

TestingTesting Frameworks
dsunit

Datastore testing for SQL, NoSQL, structured files

TestingTesting Frameworks
embedded-postgres

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

TestingTesting Frameworks
envite

Dev and testing environment management framework

TestingTesting Frameworks
fixenv

Fixture manage engine, inspired by pytest fixtures

TestingTesting Frameworks
frisby

REST API testing framework

TestingTesting Frameworks
gherkingen

BDD boilerplate generator and framework

TestingTesting Frameworks
gnomock

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

TestingTesting Frameworks
go-carpet

Tool for viewing test coverage in terminal

TestingTesting Frameworks
go-httpbin

HTTP testing and debugging tool with various endpoints for client testing

TestingTesting Frameworks
go-mutesting

Mutation testing for Go source code

TestingTesting Frameworks
go-mysql-test-container

Golang MySQL testcontainer to help with MySQL integration testing

TestingTesting Frameworks
go-snaps

Jest-like snapshot testing in Golang

TestingTesting Frameworks
go-testdeep

Extremely flexible golang deep comparison, extends the go testing package

TestingTesting Frameworks
go-testpredicate

Test predicate style assertions library with extensive diagnostics output

TestingTesting Frameworks
goblin

Mocha like testing framework of Go

TestingTesting Frameworks
goc

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

TestingTesting Frameworks
GoConvey

BDD-style framework with web UI and live reload

TestingTesting Frameworks
godog

Cucumber BDD framework for Go

TestingTesting Frameworks
gofight

API Handler Testing for Golang Router framework

TestingTesting Frameworks
gomatch

library created for testing JSON against patterns

TestingTesting Frameworks
Gont

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

TestingTesting Frameworks
gospecify

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

TestingTesting Frameworks
gosuite

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

TestingTesting Frameworks
got

An enjoyable golang test framework

TestingTesting Frameworks
gotest.tools

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

TestingTesting Frameworks
Hamcrest

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

TestingTesting Frameworks
httpexpect

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

TestingTesting Frameworks
is

Professional lightweight testing mini-framework for Go

TestingTesting Frameworks
jsonassert

Package for verifying that your JSON payloads are serialized correctly

TestingTesting Frameworks
keploy

Generate Testcase and Data Mocks from API calls automatically

TestingTesting Frameworks
omg.testingtools

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

TestingTesting Frameworks
restit

Go micro framework to help writing RESTful API integration test

TestingTesting Frameworks
schema

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

TestingTesting Frameworks
should

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

TestingTesting Frameworks
stop-and-go

Testing helper for concurrency

TestingTesting Frameworks
testcerts

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

TestingTesting Frameworks
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

TestingTesting Frameworks
Testify

Sacred extension to the standard go testing package

TestingTesting Frameworks
testsql

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

TestingTesting Frameworks
testza

Full-featured test framework with nice colorized output

TestingTesting Frameworks
tparse

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

TestingTesting Frameworks
Tt

Simple and colorful test tools

TestingTesting Frameworks
wstest

Websocket client for unit-testing a websocket http.Handler

TestingTesting Frameworks
connexions

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

TestingMock
counterfeiter

Tool for generating self-contained mock objects

TestingMock
go-localstack

Tool for using localstack in AWS testing

TestingMock
go-txdb

Single transaction based database driver mainly for testing purposes

TestingMock
gock

Versatile HTTP mocking made easy

TestingMock
gomock

Mocking framework for the Go programming language

TestingMock
mockfs

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

TestingMock
mockhttp

Mock object for Go http.ResponseWriter

TestingMock
mooncake

A simple way to generate mocks for multiple purposes

TestingMock
moq

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

TestingMock
pgxmock

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

TestingMock
timex

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

TestingMock
xgo

A general pureposed function mocking library

TestingMock
go-fuzz

Randomized testing system

TestingFuzzing and delta-debugging/reducing/shrinking
Tavor

Generic fuzzing and delta-debugging framework

TestingFuzzing and delta-debugging/reducing/shrinking
bonk

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

TestingSelenium and browser control tools
cdp

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

TestingSelenium and browser control tools
chromedp

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

TestingSelenium and browser control tools
playwright-go

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

TestingSelenium and browser control tools
rod

A Devtools driver to make web automation and scraping easy

TestingSelenium and browser control tools
failpoint

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

TestingFail injection