https://github.com/lyubenkov/go-junit-report
Convert go test output to junit xml
https://github.com/lyubenkov/go-junit-report
Last synced: 5 months ago
JSON representation
Convert go test output to junit xml
- Host: GitHub
- URL: https://github.com/lyubenkov/go-junit-report
- Owner: lyubenkov
- License: mit
- Fork: true (jstemmer/go-junit-report)
- Created: 2020-08-12T15:39:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T13:37:37.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T17:45:54.670Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 175 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-junit-report
Converts `go test` output to an xml report, suitable for applications that
expect junit xml reports (e.g. [Jenkins](http://jenkins-ci.org)).
[![Build Status][travis-badge]][travis-link]
[![Report Card][report-badge]][report-link]
## Installation
Go version 1.2 or higher is required. Install or update using the `go get`
command:
```bash
go get -u github.com/lyubenkov/go-junit-report
```
## Usage
go-junit-report reads the `go test` verbose output from standard in and writes
junit compatible XML to standard out.
```bash
go test -v 2>&1 | go-junit-report > report.xml
```
Note that it also can parse benchmark output with `-bench` flag:
```bash
go test -v -bench . -count 5 2>&1 | go-junit-report > report.xml
```
## Contribution
Create an Issue and discuss the fix or feature, then fork the package.
Clone to github.com/lyubenkov/go-junit-report. This is necessary because go import uses this path.
Fix or implement feature. Test and then commit change.
Specify #Issue and describe change in the commit message.
Create Pull Request. It can be merged by owner or administrator then.
### Run Tests
```bash
go test
```
[travis-badge]: https://travis-ci.org/jstemmer/go-junit-report.svg?branch=master
[travis-link]: https://travis-ci.org/jstemmer/go-junit-report
[report-badge]: https://goreportcard.com/badge/github.com/lyubenkov/go-junit-report
[report-link]: https://goreportcard.com/report/github.com/lyubenkov/go-junit-report