Jay Taylor's notes

back to listing index

tebeka/go2xunit

[web search]
Original source (github.com)
Tags: testing golang go github.com
Clipped on: 2016-03-11

Skip to content
Convert "go test" output to xunit compatible (used in Jenkins/Hudson)
Go Shell Python
data Moving print to another test file 23 days ago
demo-gocheck mark 3 years ago
demo Checking with go 1.6 23 days ago
xml Support go 1.5 output 8 months ago
.gitattributes implement gocheck SKIP, PANIC, Status and Time, and replace map by slice 9 months ago
.hgignore run jenkins 4 years ago
.hgtags Added tag v1.2.4 for changeset c79c6b204fcf 23 days ago
.travis.yml go 1.5.2 2 months ago
ChangeLog v1.2.4 23 days ago
LICENSE.txt updated license date 8 months ago
README.md travis badge 4 months ago
cmdline.go split to files and some cleanup 2 months ago
go2xunit.go v1.2.4 23 days ago
go2xunit_test.go Moving print to another test file 23 days ago
io_test.go split to files and some cleanup 2 months ago
main_test.go split to files and some cleanup 2 months ago
parsers.go split to files and some cleanup 2 months ago
push-to-github.sh force bookmark update 9 months ago
xmlout.go split to files and some cleanup 2 months ago

README.md

go2xunit

Image (Asset 3/3) alt=

Converts  go test -v  (or  gocheck -vv ) output to xunit or xunit.net compatible XML output (used in Jenkins/Hudson).

Install

normalgo get bitbucket.org/tebeka/go2xunit
normal

Usage

By default  go2xunit  reads data from standard input and emits XML to standard output. However you can use  -input  and  -output  flags to change this.

The  -fail  switch will cause  go2xunit  to exit with non zero status if there are failed tests.

normalgo test -v | go2xunit -output tests.xml
normal

 go2xunit  also works with gocheck, and testify.

normalgo test -gocheck.vv | go2xunit -gocheck -output tests.xml
normal

Here's an example script ( run-tests.sh ) that can be used with Jenkins/Hudson.

normal#!/bin/bash

outfile=gotest.out

go test -v | tee $outfile
go2xunit -fail -input $outfile -output tests.xml
normal

Related

Contact

Miki Tebeka miki.tebeka@gmail.com

Bug reports go here.