gotestyourself / gotestyourself/gotestsum
Using --raw-command with stderr
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
I'm using a CI tool that acts as a wrapper for the Go command and emits the results via stderr rather than stdout. I've tried various ways of incorporating this into the raw command, along the lines of:
```shell
gotestsum --junitfile test.xml --ignore-non-json-output-lines --raw-command -- jfrog rt go test -v -json ./... 2>&1
```
but am always ending up with an empty output (and stderr appearing in the console). Is there a recommended way to parse stderr using gotestsum?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how gotestsum handles --raw-command and separates stdout from stderr, then reproduce the reported jfrog rt go test command with stderr redirected. Done means stderr-emitted Go test JSON is parsed correctly and the requested JUnit file is produced without leaving stderr only in the console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100