gocover-cobertura

  • Maintained Fork
  • Go
  • v2.0.0

Maintained fork converting go test -coverprofile output to Cobertura XML for CI coverage reports in GitHub Actions, GitLab CI, and Jenkins. Supports Unix pipes, file paths, and multi-file glob patterns.

Install

Go Binary
go install github.com/blackbirdworks/gocover-cobertura@latest

CLI Flags

Available command-line flags
Flag Default Description
-f, --file - (stdin) Input Go coverage profile path.
-p, --pattern "" Glob pattern matching multiple coverage files (e.g. **/*.out).
-o, --output - (stdout) Output Cobertura XML file path.

Usage Examples

Shell
go test -coverprofile=coverage.out ./...
gocover-cobertura < coverage.out > coverage.xml
gocover-cobertura --pattern="tests/**/*.out" -o coverage.xml