go-junit-report icon indicating copy to clipboard operation
go-junit-report copied to clipboard

Add Package Prefix option for report namespacing

Open bbrks opened this issue 5 years ago • 0 comments

Closes #100

Adds a -package-prefix flag, that can be used to namespace packages in reports.

This opens up the opportunity to use go-junit-report to generate unique XML reports for various combinations of $GOOS/$GOARCH (and other build tags) that won't conflict with each other.

More detail about this use-case is included in #100

Example usage:

export GOOS=linux
export GOARCH=arm64
go test -v 2>&1 | go-junit-report -package-prefix="${GOOS}/${GOARCH}" > report-${GOOS}-${GOARCH}.xml

bbrks avatar Jan 24 '20 15:01 bbrks