Closed generalmimon closed 2 years ago
agree!
Any workaround for the meantime?... Or planned fix?
Thanks for the detailed report. This looks indeed like a bug with the output parsing. I suspect it may be caused by the mix of spaces and tabs in the output.
I couldn't reproduce the part where the test name is prepended to the first line of output. After a bit of digging it looks like this was introduced in go1.14 but removed again in go1.14.6.
What's the status of this?
This has been fixed in the v2 branch.
How can I use v2? It's not go gettable :(
I haven't cut a release yet from the v2 branch, but there should be a v2 beta soon. If you can't wait, you'll have to build it manually.
This issue has been fixed in the recently released v2.0.0-beta.
As of Go 1.14, the
go test -v
command started putting the--- FAIL:
line below the message (not above as before). Compare thego1.13.15
andgo1.14
console output:Unified diff:
The above example is simulated by this simple code (you need to run
go get github.com/stretchr/testify/assert
before):example_test.go
By the incomplete failure message, I mean this (diffing
go1.13.15 test -v | go-junit-report
andgo1.14 test -v | go-junit-report
using the console outputs you've seen before):So
go-junit-report
apparently just takes the first line of the message fromgo1.14 test -v
output and the rest is ignored. (Also notice that thego1.14
prependsTestExample:
to the message - this should be best omitted from the XML output because it merely duplicates the<testcase>.name
, and it wasn't there in go1.13 or older.)I think it's quite important to get this fixed if you plan to maintain this project, because it seems as all subsequent Go versions will behave like
go1.14
: I've just checked the latest available versiongo1.16.2
and it emits the exact same format asgo1.14
.