• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

formatter/H04-Oct-2019-

parser/H04-Oct-2019-

testdata/H03-May-2022-

.gitignoreH A D04-Oct-201916

.travis.ymlH A D04-Oct-2019174

LICENSEH A D04-Oct-20191 KiB

README.mdH A D04-Oct-20191.4 KiB

go-junit-report.goH A D04-Oct-20191.1 KiB

go-junit-report_test.goH A D04-Oct-201938.2 KiB

go.modH A D04-Oct-201951

README.md

1# go-junit-report
2
3Converts `go test` output to an xml report, suitable for applications that
4expect junit xml reports (e.g. [Jenkins](http://jenkins-ci.org)).
5
6[![Build Status][travis-badge]][travis-link]
7[![Report Card][report-badge]][report-link]
8
9## Installation
10
11Go version 1.2 or higher is required. Install or update using the `go get`
12command:
13
14```bash
15go get -u github.com/jstemmer/go-junit-report
16```
17
18## Usage
19
20go-junit-report reads the `go test` verbose output from standard in and writes
21junit compatible XML to standard out.
22
23```bash
24go test -v 2>&1 | go-junit-report > report.xml
25```
26
27Note that it also can parse benchmark output with `-bench` flag:
28```bash
29go test -v -bench . -count 5 2>&1 | go-junit-report > report.xml
30```
31
32## Contribution
33
34Create an Issue and discuss the fix or feature, then fork the package.
35Clone to github.com/jstemmer/go-junit-report.  This is necessary because go import uses this path.
36Fix or implement feature. Test and then commit change.
37Specify #Issue and describe change in the commit message.
38Create Pull Request. It can be merged by owner or administrator then.
39
40### Run Tests
41
42```bash
43go test
44```
45
46[travis-badge]: https://travis-ci.org/jstemmer/go-junit-report.svg
47[travis-link]: https://travis-ci.org/jstemmer/go-junit-report
48[report-badge]: https://goreportcard.com/badge/github.com/jstemmer/go-junit-report
49[report-link]: https://goreportcard.com/report/github.com/jstemmer/go-junit-report
50