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. Learn more →
Top 15 Go integration-testing Projects
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
Cucumber for golangProject 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 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
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
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.
🐍 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.
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
Immutable transaction isolated sql driver for golangProject 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
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 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).
End to end functional test and automation framework
HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing
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
Mock-A-🦘 (mock-aa-roo) a comprehensive HTTP/HTTPS interface mocking tool for all your development and testing needs!
gogenswagger will generate signatures for the test case using swagger json fileProject mention: Generating API tests signatures using swagger | reddit.com/r/golang | 2022-10-20
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
Supabase integration testing
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.
Go integration-testing related posts
Integration Tests with Postgres
2 projects | reddit.com/r/golang | 29 Mar 2023
How to unit test your database interactions with Docker
4 projects | reddit.com/r/golang | 24 Mar 2023
Mocking database calls without a library?
3 projects | reddit.com/r/golang | 7 Feb 2023
Rails 7. StartKit v1.2 - gem mailcatcher + Mailer::Preview
2 projects | reddit.com/r/rails | 28 Jan 2023
Easy Integration Testing with Venom!
1 project | dev.to | 7 Nov 2022
Venom: Manage and run your integration tests with efficiency
1 project | news.ycombinator.com | 10 Oct 2022
Consolidating system emails for multiple linux servers
1 project | reddit.com/r/homelab | 4 Aug 2022
A note from our sponsor - SonarLint
www.sonarlint.org | 1 Jun 2023
What are some of the best open-source integration-testing projects in Go? This list will help you: