Go Testing

Open-source Go projects categorized as Testing

Top 23 Go Testing Projects

  • GitHub repo Gor

    GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.

    Project mention: How To Find Performance Issues Before Deploying | reddit.com/r/sre | 2020-12-29

    Not OP, but that is the idea. I use this tool for it, as it is dead-simple to get running and fairly configurable: https://github.com/buger/goreplay

  • GitHub repo learn-go-with-tests

    Learn Go with test-driven development

    Project mention: Learn Go with Tests - Intro to generics | reddit.com/r/golang | 2021-03-01

    Yeah I noticed this. Annoyingly it renders fine in github https://github.com/quii/learn-go-with-tests/blob/main/intro-to-generics.md#next-generic-data-types

  • GitHub repo Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

    Project mention: logrus.errorf() causes panics? | reddit.com/r/golang | 2021-02-05

    There is a nice package called testify: https://github.com/stretchr/testify

  • GitHub repo GoConvey

    Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

  • GitHub repo chromedp

    A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

    Project mention: Prevent chromedp Chromium zombie processes from stacking | dev.to | 2021-02-12

    I have recently been playing with chromedp in order to programmatically control a Chromium browser to scrape some information. I have some memories from implementing a similar task in Node.js, and I was pleased to leverage a strongly typed language for the job.

  • GitHub repo gomock

    GoMock is a mocking framework for the Go programming language. (by golang)

    Project mention: Part-2: Building a basic microservice with unidirectional-streaming gRPC using Golang | dev.to | 2021-02-25

    To write the unit test we'll need to generate the mock of multiple interface as required. mockgen is the ready-to-go framework for mocking in Golang, so we'll be leveraging it in our unit tests.

  • GitHub repo terratest

    Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

    Project mention: Best static code analysis tool for Terraform? | reddit.com/r/Terraform | 2021-02-03

    add https://github.com/gruntwork-io/terratest .. if you are using terraform <=12 maybe kitchen.

  • GitHub repo ginkgo

    BDD Testing Framework for Go

    Project mention: Autobucket Operator | dev.to | 2020-11-19

    As a big fan of automated testing, it’s comforting to learn that we can easily write tests for our controllers using envtest (which runs a local k8s control plane so we can run our tests against it), the Gingko testing framework and the Gomega matching/assertion library:

  • GitHub repo goss

    Quick and Easy server testing/validation

    Project mention: Find The Cube | dev.to | 2020-11-24

    The repository is private but there is a CI/CD no-downtime deployment process. So fancy! I use goss to test the built image along with the docker/build-push-action. The end of my ci.yml GitHub Action workflow looks like this:

  • GitHub repo realize

    Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

  • GitHub repo go-fuzz

    Randomized testing for Go

    Project mention: SQLFuzz made easy to load huge amount of test data into SQL databases | reddit.com/r/golang | 2021-02-25

    Maybe you can add support for using a fuzzer like https://github.com/dvyukov/go-fuzz or https://github.com/google/gofuzz

  • GitHub repo go-grpc-middleware

    Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

    Project mention: Go, RabbitMQ and gRPC Clean Architecture microservice 💫👋 | dev.to | 2021-01-11

    And initialize our gRPC service, here i used gRPC Middleware repository for unary interceptors:

  • GitHub repo go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: tidb-lite: used for unit testing of Golang database-related code | dev.to | 2021-02-14

    Another common method is to mock SQL services in the test. At present, the more popular solution is to use go-sqlmock.

  • GitHub repo gotests

    Automatically generate Go test boilerplate from your source code.

    Project mention: Learn Go in ~5mins | news.ycombinator.com | 2021-01-05

    You can save yourself a minute and generate the test case boilerplate for your with https://github.com/cweill/gotests :)

  • GitHub repo Gauge

    Light weight cross-platform test automation

  • GitHub repo go-cmp

    Package for comparing Go values in tests

    Project mention: Go Package for Equality: github.com/google/go-cmp | dev.to | 2021-03-03

    One thing to keep in mind about reflect.DeepEqual is because of the way it is implemented you could get positive results when the values are not actually the same, see this comment for reference.

  • GitHub repo selenoid

    Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

  • GitHub repo hoverfly

    Lightweight service virtualization/API simulation tool for developers and testers

  • GitHub repo httpexpect

    End-to-end HTTP and REST API testing for Go.

    Project mention: Hacktoberfest: 69 Beginner-Friendly Projects You Can Contribute To | dev.to | 2020-09-29

    https://github.com/gavv/httpexpect End-to-end HTTP and REST API testing for Go.

  • GitHub repo conftest

    Write tests against structured configuration data using the Open Policy Agent Rego query language

    Project mention: Mental models for understanding Kubernetes Pod Security Policy PSP | reddit.com/r/kubernetes | 2021-01-16

    Can Gatekeeper and Conftest single-source the same set of rules? I'm looking at https://github.com/open-policy-agent/conftest/issues/54#issuecomment-528988831 and not seeing how.

  • GitHub repo rod

    A Devtools driver for web automation and scraping

  • GitHub repo Looking for Maintainer

    Selenium/Webdriver client for Go (by tebeka)

  • GitHub repo gomega

    Ginkgo's Preferred Matcher Library

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-03-03.


What are some of the best open-source Testing projects in Go? This list will help you:

Project Stars
1 Gor 13,905
2 learn-go-with-tests 12,964
3 Testify 12,653
4 GoConvey 6,205
5 chromedp 5,954
6 gomock 5,275
7 terratest 4,956
8 ginkgo 4,554
9 goss 4,278
10 realize 3,934
11 go-fuzz 3,879
12 go-grpc-middleware 3,350
13 go-sqlmock 3,265
14 gotests 3,078
15 Gauge 2,430
16 go-cmp 2,168
17 selenoid 1,834
18 hoverfly 1,702
19 httpexpect 1,631
20 conftest 1,615
21 rod 1,371
22 Looking for Maintainer 1,344
23 gomega 1,308