go-junit-report

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 5 Imported by: 1

README

go-junit-report

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

The test output parser and JUnit report formatter are also available as Go packages.

Build Status

Pre-built packages for Windows, macOS and Linux are found on the Releases page.

Install from source

Download and install the latest stable version from source by running:

go install github.com/jstemmer/go-junit-report@latest

Usage

go-junit-report reads the full go test output from stdin and writes JUnit compatible XML to stdout. In order to capture build errors as well as test output, redirect both stdout and stderr to go-junit-report.

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

Parsing benchmark output is also supported, for example:

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

If you want go-junit-report to exit with a non-zero exit code when it encounters build errors or test failures, set the -set-exit-code flag.

Run go-junit-report -help for a list of all supported flags.

Contributing

See CONTRIBUTING.md.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL