You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a common usage pattern to run test command and to feed test report and coverage data to an external platform (for example a code quality or code coverage tools). As such, there is value in having both plain text user-friendly output in stdout and a machine-readable JSON output in a separate file. Unfortunately, both outputs can not be obtained at the moment and developers must choose between having easy-to-navigate local test reports or satisfying the external integrations and wait for them to sync and process the report data.
The text was updated successfully, but these errors were encountered:
-json just runs test2json on the normal output. So you can do go test . | tee out.log
and later run go tool test2json < out.log to convert it to json for your other tooling.
Note also that test2json is only intended for converting a single test binary's output. To convert the output of a "go test" command that runs multiple packages, again use "go test -json".
Proposal Details
It is a common usage pattern to run test command and to feed test report and coverage data to an external platform (for example a code quality or code coverage tools). As such, there is value in having both plain text user-friendly output in stdout and a machine-readable JSON output in a separate file. Unfortunately, both outputs can not be obtained at the moment and developers must choose between having easy-to-navigate local test reports or satisfying the external integrations and wait for them to sync and process the report data.
The text was updated successfully, but these errors were encountered: