Jay Taylor's notes

back to listing index

Converting Go testing output to XUnit

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

How can I have the output of Go's testing library output in XUnit format for integration with Jenkins? There are no command line options to output to XML or to XUnit format with go test.

asked Jan 6 '14 at 20:26
Image (Asset 3/3) alt=
robbrit
9,25622241
up vote 4 down vote accepted

There's a nice little plugin to convert: https://bitbucket.org/tebeka/go2xunit

To install it:

go get bitbucket.org/tebeka/go2xunit

To use it:

# Run your tests like normal, but pipe the verbose output to the converter
go test -v | $GOPATH/bin/go2xunit > test_output.xml

If you have $GOPATH/bin in your normal $PATH:

go test -v | go2xunit > test_output.xml
answered Jan 6 '14 at 20:26
robbrit
9,25622241

Your Answer

asked

2 years ago

viewed

848 times

active

2 years ago

Technology Life / Arts Culture / Recreation Science Other
  1. Stack Overflow
  2. Server Fault
  3. Super User
  4. Web Applications
  5. Ask Ubuntu
  6. Webmasters
  7. Game Development
  8. TeX - LaTeX
  1. Programmers
  2. Unix & Linux
  3. Ask Different (Apple)
  4. WordPress Development
  5. Geographic Information Systems
  6. Electrical Engineering
  7. Android Enthusiasts
  8. Information Security
  1. Database Administrators
  2. Drupal Answers
  3. SharePoint
  4. User Experience
  5. Mathematica
  6. Salesforce
  7. ExpressionEngine® Answers
  8. more (13)
  1. Photography
  2. Science Fiction & Fantasy
  3. Graphic Design
  4. Movies & TV
  5. Seasoned Advice (cooking)
  6. Home Improvement
  7. Personal Finance & Money
  8. Academia
  9. more (9)
  1. English Language & Usage
  2. Skeptics
  3. Mi Yodeya (Judaism)
  4. Travel
  5. Christianity
  6. Arqade (gaming)
  7. Bicycles
  8. Role-playing Games
  9. more (21)
  1. Mathematics
  2. Cross Validated (stats)
  3. Theoretical Computer Science
  4. Physics
  5. MathOverflow
  6. Chemistry
  7. Biology
  8. more (5)
  1. Stack Apps
  2. Meta Stack Exchange
  3. Area 51
  4. Stack Overflow Careers
site design / logo © 2016 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required
rev 2016.3.11.3338