Go Assertions

Open-source Go projects categorized as Assertions

Top 12 Go Assertion Projects

  1. Testify

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

    Project mention: From Vibe Coder to AI-Assisted Architect | dev.to | 2025-05-07

    I prefer to use the Go library testify, which significantly simplifies the code:

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. httpexpect

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

  4. gock

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

    Project mention: The best way for testing outbound API calls | dev.to | 2025-02-06

    Another great option is gock, a lib that is also inspired by nock, with a simple and easy API. It works by intercepting any HTTP request made by any http.Client and adding it to a list, so it can check if a mock request exists. If not, an error is returned, unless the real networking mode is on. In that case, the request is done normally.

  5. gotest.tools

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

  6. quicktest

    Quick helpers for testing Go applications (by frankban)

  7. go-testdeep

    Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

  8. test

    A modern generic testing assertions library for Go (by shoenig)

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. jsonassert

    A Go test assertion library for verifying that two representations of JSON are semantically equal (by kinbiko)

  11. probe

    Simplified End-to-End Testing Using YAML and JQ. (by abhimanyu003)

  12. trial

    A simple assertion library for go (by jgroeneveld)

  13. must

    When you don't need error handling (by xiegeo)

  14. attest

    A small library to make go tests more readable. (by dscottboggs)

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).

Go Assertions discussion

Log in or Post with

Go Assertions related posts

  • Full Introduction to Golang with Test-Driven Development

    1 project | news.ycombinator.com | 3 Aug 2024
  • Why I don't use a third-party assertion library in Go unit tests

    1 project | dev.to | 20 May 2024
  • Testing calls to Daily's REST API in Go

    2 projects | dev.to | 8 Sep 2023
  • Do you wrap testing libraries?

    1 project | /r/golang | 16 May 2023
  • [Go] How to unit test for exception handling?

    1 project | /r/learnprogramming | 19 Apr 2023
  • Introdução aos testes unitários em Go

    1 project | dev.to | 13 Jan 2023
  • How do you do DB preparation in e2e tests?

    3 projects | /r/golang | 20 Oct 2022
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 13 May 2025
    InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →

Index

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

# Project Stars
1 Testify 24,548
2 httpexpect 2,636
3 gock 2,164
4 gotest.tools 558
5 quicktest 530
6 go-testdeep 447
7 test 190
8 jsonassert 135
9 probe 33
10 trial 6
11 must 5
12 attest 0

Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com