gotestyourself/gotest.tools

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

Go

576

496 commits

updated Sep 14, 2026

See the code

README

gotest.tools

A collection of packages to augment testing and support common patterns.

PkgGoDev CircleCI Go Reportcard

Usage

With Go modules enabled

$ go get gotest.tools/v3
import "gotest.tools/v3/assert"

Packages

  • assert - compare values and fail the test when a comparison fails
  • env - test code which uses environment variables
  • fs - create temporary files and compare a filesystem tree to an expected value
  • golden - compare large multi-line strings against values frozen in golden files
  • icmd - execute binaries and test the output
  • poll - test asynchronous code by polling until a desired state is reached
  • skip - skip a test and print the source code of the condition used to skip the test

Contributing

See CONTRIBUTING.md.

assert
assertions
go
golang
test
testing

Significant stargazers

Márk Sági-Kazár

1,390 followers · starred Aug 2018

Vojtech Vitek (golang.cz)

233 followers · starred Jan 2023

Jakub Kuczys

125 followers · starred Apr 2025

WÁNG Xuěruì

936 followers · starred Feb 2023

gotestyourself/gotest.tools

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

Go

576

496 commits

updated Sep 14, 2026

See the code

README

gotest.tools

A collection of packages to augment testing and support common patterns.

PkgGoDev CircleCI Go Reportcard

Usage

With Go modules enabled

$ go get gotest.tools/v3
import "gotest.tools/v3/assert"

Packages

  • assert - compare values and fail the test when a comparison fails
  • env - test code which uses environment variables
  • fs - create temporary files and compare a filesystem tree to an expected value
  • golden - compare large multi-line strings against values frozen in golden files
  • icmd - execute binaries and test the output
  • poll - test asynchronous code by polling until a desired state is reached
  • skip - skip a test and print the source code of the condition used to skip the test

Contributing

See CONTRIBUTING.md.

assert
assertions
go
golang
test
testing

Significant stargazers

Márk Sági-Kazár

1,390 followers · starred Aug 2018

Vojtech Vitek (golang.cz)

233 followers · starred Jan 2023

Jakub Kuczys

125 followers · starred Apr 2025

WÁNG Xuěruì

936 followers · starred Feb 2023