#Best Go Testing Frameworks

6 messages · Page 1 of 1 (latest)

supple grail
#

Hello! New to Go.
Is there an industry standard testing framework or preferred way to go about writing unit tests, etc.
Seeing a lot of mixed opinions online and would like to hear from y'all as well on what you all use and why.

crisp elbow
#

No matter what framework you end up using, I suggest you get comfortable with the stdlib testing stuff first.

#

I only very rarely need to step outside stdlib for testing, and when I do, what I use depends on why I had to step outside stdlib.

zinc helm
#

My needs are usually pretty basic but I usually use gotests in vscode to generate table driven tests and tweak from there

old patio
#

I use testify, but that’s because the stdlib is positively anemic with respect to assertions, particularly in regards to compound types. Any assertion module works, testify is popular but there are others that work just as well.

#

I don’t want to repeat the logic of assert.ElementsMatch(…) over and over again, for example.