Briefly, the -follow flag parses the go test json event and prints the output just like running go test without tparse. This enables tparse to accumulate test data without a noticeable difference to the caller, as they can view (read "follow") the go test output.
The proposal is to pipe the go test output to stderr and the tparse output to stdout.
Picking up from https://github.com/mfridman/tparse/issues/86#issuecomment-1564028742, @ti-mo has a nice suggestion to split tparse output and go test output when using
-follow
.Briefly, the
-follow
flag parses thego test
json event and prints the output just like runninggo test
without tparse. This enables tparse to accumulate test data without a noticeable difference to the caller, as they can view (read "follow") the go test output.The proposal is to pipe the go test output to
stderr
and the tparse output tostdout
.