A better go test

My job now involves doing some Golang work and this post is about how go test command can be improved.

Until now, I never actually thought about improving the test command for a language. But with Golang I have serious problems with reporting test results on command line. Test output is not readable, The usual test flags you expect are not there.

I noticed the problem when I started working on a quite large golang project with a lot of tests. When I run the tests it starts printing a lot of information, most of it are not important.

I found gotestsum package which seems to do what I want. I like it, but it seems to focus on other things that I don’t find problematic. For example, it has watch option, which is not really needed for the test runner. You have other tools to watch and run commands.

Happy that I found an opportunity I created gotest. It’s a very simple tool. It takes in the output of go test command and organizes output to a human friendly output. I’m planning to add more commands and see how far can I improve the testing on CLI. You don’t have to install an IDE just for running tests easily, it’s not Java.

Why not contributing to Golang?

I think some of these features could be added in the go test, and I’m going to use this project as an experiment to see how they turn out to be.

If you are interested let me know.