godog VS go-cmp

Compare godog vs go-cmp and see what are their differences.

go-cmp

Package for comparing Go values in tests (by google)
Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
godog go-cmp
2 4
1,551 2,675
3.0% 3.1%
7.5 5.4
2 days ago 8 days ago
Go Go
MIT License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

godog

Posts with mentions or reviews of godog. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-21.

go-cmp

Posts with mentions or reviews of go-cmp. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-26.
  • What annoys you about Go?
    7 projects | reddit.com/r/golang | 26 Oct 2021
    When I use functional arguments, I either prefix all of the options with the same prefix or put them in a dedicated package (like cmpopts) to help the IDE.
  • Migrating from PHP to Go
    26 projects | reddit.com/r/golang | 30 Sep 2021
    Checking for equality in tests: https://github.com/google/go-cmp
  • What are your favorite packages to use?
    55 projects | reddit.com/r/golang | 15 Aug 2021
    oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
  • Go Package for Equality: github.com/google/go-cmp
    2 projects | dev.to | 3 Mar 2021
    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.

What are some alternatives?

When comparing godog and go-cmp you can also consider the following projects:

ginkgo - A Modern Testing Framework for Go

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

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

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

gomega - Ginkgo's Preferred Matcher Library

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

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.

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

venom - 🐍 Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions