Skip to content

vitessio/go-junit-report

This branch is 18 commits ahead of, 64 commits behind jstemmer/go-junit-report:master.

Folders and files

NameName
Last commit message
Last commit date
Jul 1, 2022
Apr 26, 2023
Jun 6, 2023
Jun 6, 2023
Jun 6, 2023
Jun 6, 2023
May 9, 2023
Feb 24, 2022
Mar 9, 2012
Feb 23, 2022
Apr 26, 2023
Apr 26, 2023
Jun 15, 2022
Apr 27, 2023

Repository files navigation

go-junit-report

go-junit-report is a tool that converts [go test] output to a JUnit compatible XML report, suitable for use with applications such as [Jenkins].

[![Build status][github-actions-badge]][github-actions-link]

Installation

Go version 1.17 or higher is required. Install or update using the go get command:

go get -u github.com/vitessio/go-junit-report

Usage

By default, go-junit-report reads go test -v output generated by the standard library [testing] package from stdin and writes a JUnit XML report to stdout.

Go build and runtime errors are also supported, but this requires that stderr is redirected to go-junit-report as well.

Typical use looks like this:

go test -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml

More examples

JSON produced by go test -json is supported by the gojson parser. Note that stderr still needs to be redirected to go-junit-report in order for build errors to be detected. For example:

go test -json 2>&1 | go-junit-report -parser gojson > report.xml

Run Tests

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

Declaration

This is forked version from https://github.com/jstemmer/go-junit-report

About

Convert go test output to junit xml

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.8%
  • Makefile 1.2%