GoTestTools / gotestfmt

go test output for humans
The Unlicense
515 stars 9 forks source link

Test output reformatter #30

Closed ghost closed 2 years ago

ghost commented 2 years ago

As indicated in matrix-org/complement#268 it would be useful to have a feature where you could specify an external script to reformat the output of individual tests. Gotestfmt would take the output of each test case and send it to an external program for formatting.

For example:

go test -json -v ./... | gotestfmt -formatter ./cmd/test-format/main.go

The program would be called as many times as there are test cases with a JSON passed on the standard input. The program would need to produce the desired output on the standard output..