我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

将Go测试输出转换为XUnit

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.

There's a nice little plugin to convert: https://github.com/tebeka/go2xunit

To install it:

go get github.com/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

近期文章

  • Go中限制并发的简单方法
  • 将切片传递到通道
  • 渤盛增设外部收藏家
  • golang多路复用器,路由通配符和自定义功能匹配
  • 如何在Go语言中检查变量类型是否为map
  • 检查以确定go代码是否已格式化
  • 通过值或指针访问另一个结构
  • Heroku上的Go + Postgres拒绝连接
  • 为接受接口的函数传递结构
  • 如何处理以下路由:/ example / log和/ example /:id / log?
  • Golang通过引用结构成员值来传递变量
  • 如何使用lz4压缩和解压缩文件?
  • Go如何确定何时在goroutine之间进行上下文切换?
  • 求大神帮看看这段汇编代码
  • 去劫持客户端连接
  • Golang从文件中嵌入HTML
  • golang项目如何打包以进行部署?
  • MFC怎么用已读数据画波形图?
  • 请教各位大神,h5 如何限制涂色区域,只可以在图片内部涂色?
  • 请教一下<vlCore/config.hpp>是哪个开源软件的环境?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华