Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
formatter/ | H | 04-Oct-2019 | - | |||
parser/ | H | 04-Oct-2019 | - | |||
testdata/ | H | 03-May-2022 | - | |||
.gitignore | H A D | 04-Oct-2019 | 16 | |||
.travis.yml | H A D | 04-Oct-2019 | 174 | |||
LICENSE | H A D | 04-Oct-2019 | 1 KiB | |||
README.md | H A D | 04-Oct-2019 | 1.4 KiB | |||
go-junit-report.go | H A D | 04-Oct-2019 | 1.1 KiB | |||
go-junit-report_test.go | H A D | 04-Oct-2019 | 38.2 KiB | |||
go.mod | H A D | 04-Oct-2019 | 51 |
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