Unit Testing a GORM Application With a Real DB Server

Unit testing with a DB server running in docker is a much better choice than Sqlmock, usually

Che Dan
Better Programming
Published in
4 min readJul 26, 2022

--

Photo by Phyllis on Unsplash

About two years ago, I wrote an article discussing how to test a GORM application with Sqlmock.

Time flies, and I realize that most developers do not adopt this approach (at least on my team)…

--

--