Integration testing best practices for API servers...

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • dredd

    Language-agnostic HTTP API Testing Tool

  • If you want to make sure the server implements a certain contract like there's an handler responding to a GET request to /API/what/ever I'd rather use something else. To be completely honest this is a topic I'm currently also searching for a really good solution but what I found so far (and looks promising) is https://dredd.org/ or https://microcks.io/ Both support OpenAPI testing so you can specify the contract as an OpenAPI spec and validate your server against it.

  • Pact JVM

    JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

  • There's also https://docs.pact.io/ but I haven't had time yet to really look into it but probably someone else can tell something about it.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • testcontainers-go

    Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.

  • Repo: https://github.com/testcontainers/testcontainers-go/

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