Unit Testing a Grom Application With a Real DB Server

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • keploy

    Unit and Integration Test generation for Developers. Generate tests and stubs for your application that actually work!

    Another approach could be to capture real DB traffic (either from production or local) and then use that as a mock for your tests. This way it can isolate external variables from your tests as mentioned by other folks in this thread. I also wrote a tool for this - keploy

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • go-txdb

    Immutable transaction isolated sql driver for golang

    The first one is TestMain, which could improve the lifecycle management of the container. The second one is DATA-DOG/go-txdb, this allows you to open a new db connection running in a transaction, so each test could have its own isolated DB connection.

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

  • is there a way to write test in a sane way?

    3 projects | /r/golang | 22 Mar 2022
  • I Write Tests in Go

    1 project | news.ycombinator.com | 10 Apr 2024
  • Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671

    1 project | /r/golang | 11 Jul 2023
  • Go: Write Mock Test cases using Mockery and

    1 project | dev.to | 10 May 2023
  • Mocking unexported interfaces?

    1 project | /r/golang | 28 Apr 2023

Did you konow that Go is
the 4th most popular programming language
based on number of metions?