Go integration-testing

Open-source Go projects categorized as integration-testing

Top 15 Go integration-testing Projects

  • dockertest

    Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.

    Project mention: How to start a Go project in 2023 | news.ycombinator.com | 2023-05-23

    Things I can't live without in a new Go project in no particular order:

    - https://github.com/golangci/golangci-lint - meta-linter

    - https://goreleaser.com - automate release workflows

    - https://magefile.org - build tool that can version your tools

    - https://github.com/ory/dockertest/v3 - run containers for e2e testing

    - https://github.com/ecordell/optgen - generate functional options

    - https://golang.org/x/tools/cmd/stringer - generate String()

    - https://mvdan.cc/gofumpt - stricter gofmt

    - https://github.com/stretchr/testify - test assertion library

    - https://github.com/rs/zerolog - logging

    - https://github.com/spf13/cobra - CLI framework

    FWIW, I just lifted all the tools we use for https://github.com/authzed/spicedb

    We've also written some custom linters that might be useful for other folks: https://github.com/authzed/spicedb/tree/main/tools/analyzers

  • godog

    Cucumber for golang

    Project mention: What's your favourite part of unit testing? | reddit.com/r/golang | 2023-01-19

    I also use BDD (Gherkin with godog in particular) to verify and document the expected behaviour of a product from an end user's perspective when needed. I usually do this when the product also contains untested code that I have no control over when I'm working on a problem - this gives me peace of mind over something I can't control while doubling as documentation.

  • ONLYOFFICE

    ONLYOFFICE Docs — document collaboration in your environment. Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises

  • inbucket

    Disposable webmail server (similar to Mailinator) with built in SMTP, POP3, RESTful servers; no DB required.

    Project mention: MailCrab | news.ycombinator.com | 2023-03-05

    Longtime mailhog user here; this looks like a nice improvement for cold start developer environments! Another option in the same space (emphasis container size) is https://github.com/inbucket/inbucket

  • gnomock

    Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻

    Project mention: How to unit test your database interactions with Docker | reddit.com/r/golang | 2023-03-24

    https://github.com/orlangure/gnomock does this pretty well, but I liked your solution too, it is neat.

  • venom

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

    Project mention: Ask HN: What's your favorite software testing framework and why? | news.ycombinator.com | 2023-05-21

    You can also load fixtures in database directly, work with Kafka queues both as a producer (e.g. write an event to a Kafka queue, wait a few seconds and see that it was consumed by the service you test, and that some side effects can be observed) or as a consumer (e.g. make sure after an HTTP call, an event was correctly pushed to a queue), or even read a mailbox in IMAP to check that your service correctly send an email.

    It's a bit rough on the edges sometimes, but I'd never go back on writing integration tests directly in my programming language. Declarative is the way to go.

    [1]: https://github.com/ovh/venom

  • tracetest

    Tracetest - Generate end-to-end tests automatically from your traces. For QA, Dev, & Ops.

    Project mention: OpenTelemetry Visualization? | reddit.com/r/kubernetes | 2023-05-08

    We’ve started looking into Tracetest. The visualization is quite on point there. https://github.com/kubeshop/tracetest

  • go-txdb

    Immutable transaction isolated sql driver for golang

    Project mention: Integration Tests with Postgres | reddit.com/r/golang | 2023-03-29

    3 years ago I created a internal library where I worked to setup the testing with the db's. One param was the schema directory and the other one was the path of the data insertion file. It worked really well but was a little slow. It was a little bit weird to configure the container to run the tests. As I would have to give access to go container that ran the unit tests access to docker. But back then I was running boot2docker and made things very cumbersome. I think with a local docker things would be way simpler. I ended up using and normal DB from the CI/CD and https://github.com/DATA-DOG/go-txdb If I had to do it again I might do an hybrid in-between the two solutions

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • integresql

    IntegreSQL manages isolated PostgreSQL databases for your integration tests.

    Project mention: Mocking database calls without a library? | reddit.com/r/golang | 2023-02-07

    Mocking has some advantages, but so does using a real database, at work we use https://github.com/allaboutapps/integresql and I quite like the approach that integresql has, since it makes possible to have a fresh database with your dummy data for every test without impacting the execution speed (compared to dropping an re-creating the database).

  • endly

    End to end functional test and automation framework

  • govcr

    HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing

  • probe

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

    Project mention: YAML + JQ Based End-to-End API Testing tool | reddit.com/r/golang | 2023-02-19
  • mockaroo

    Mock-A-🦘 (mock-aa-roo) a comprehensive HTTP/HTTPS interface mocking tool for all your development and testing needs!

  • gogenswagger

    gogenswagger will generate signatures for the test case using swagger json file

    Project mention: Generating API tests signatures using swagger | reddit.com/r/golang | 2022-10-20

    gogenswagger: https://github.com/Mussabaheen/gogenswagger

  • integration

    Integration is a Go tool to run integration tests. Currently, this library supports regular HTTP and GRPC. (by lucasvmiguel)

    Project mention: Integration test library | reddit.com/r/golang | 2022-12-29

    Link to the library: https://github.com/lucasvmiguel/integration

  • suspect

    Supabase integration testing

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

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). The latest post mention was on 2023-05-23.

Go integration-testing related posts

Index

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

Project Stars
1 dockertest 3,502
2 godog 1,980
3 inbucket 1,235
4 gnomock 1,182
5 venom 796
6 tracetest 555
7 go-txdb 541
8 integresql 522
9 endly 239
10 govcr 148
11 probe 25
12 mockaroo 20
13 gogenswagger 5
14 integration 4
15 suspect 0
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
www.influxdata.com