go-junit-report is a tool that converts go test output to an xml report,
suitable for applications that expect junit xml reports (e.g. Jenkins).

go-junit-report reads the go test verbose output from standard in and writes junit compatible XML to standard out.

    go test -v 2>&1 | go-junit-report > report.xml

Note that it also can parse benchmark output with -bench flag:

    go test -v -bench . -count 5 2>&1 | go-junit-report > report.xml