rakyll / gotest

go test with colors
BSD 3-Clause "New" or "Revised" License
1.35k stars 62 forks source link

Add option to output Failues to stderr #29

Open TafThorne opened 4 years ago

TafThorne commented 4 years ago

Would you be open to a patch or know of a tool that parses the go test output and then splits text from a failing case to the stderr output?

I was looing for such a tool and found @rakyll's comments on: https://github.com/golang/go/issues/21944 I can see that keeping output syncronised within go test while producing stderr output would be hard but in this after tool everything from the start to the end of the failure would be already correctly serlialised.

My use case is that within a CI job I would like to retail the full go test -v output so we have a record of what was run but I would rather only have the Failure cases recorded in the terminal to make them very obvious. I would pipe the passing records to a log file for storage.