The official way to get JSON output from a test binary foo.test is ./foo.test -test.v 2>&1 | go tool test2json but that's annoying on Unix and harder on Windows. Probably go tool test2json should accept a command to run and process: go tool test2json ./foo.test -test.v