Testing calls to external APIs

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

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

    GitLab Go SDK

  • I list my Gitlab projects with https://github.com/xanzy/go-gitlab, and in a test I wrote for the method listing and displaying my projects, I create a mock http server, that responds by returning the json response of a call to the Gitlab API.

  • gock

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

  • Mocking the http client with explicit responses; for example using h2non/gock

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • go-vcr

    Record and replay your HTTP interactions for fast, deterministic and accurate tests

  • Mocking the http client using recorded responses; for example using dnaeon/go-vcr

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