Patterns for unit testing in Go?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • Mergify - Updating dependencies is time-consuming.
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • gotests

    Automatically generate Go test boilerplate from your source code.

    I use https://github.com/cweill/gotests to generate the test scaffolding.

  • go-testdeep

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

    Check go-testdeep using its operators, it is very easy to do table driven tests, see https://goplay.space/#Z91D72aH3Sc for an example

  • Mergify

    Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts