go install github.com/bavix/junit-reporter@latestcd /tmp
git clone https://github.com/bavix/junit-reporter.git
cd junit-reporter
go install -ldflags "-s -w"junit-reporterSupported flags:
-ticks: show per-tick times (averages) instead of total durations-group: group input files by semantic version pattern extracted from filenames-major: when used with-group, collapse to major.x (e.g. 7.x)-median: use median instead of average for tick mode-rotate: swap rows and columns (versions as rows)-path: specify input directory (default./build)-output-format: optional export format,csvorjson(writes additional file)-output-file: optional path to write exported CSV/JSON (defaults to<path>/report.<format>)
Examples:
# default table printed to stdout
junit-reporter -path ./build
# export CSV alongside printing
junit-reporter -path ./build -output-format csv -output-file ./build/report.csvBasic runs:
# print totals per version (default)
junit-reporter -path ./build
# print per-tick averages (faster numbers)
junit-reporter -path ./build -ticks
# use median instead of average in ticks mode
junit-reporter -path ./build -ticks -median
# group files by semantic version extracted from filenames
junit-reporter -path ./build -group
# group and collapse to major versions (e.g. 7.x)
junit-reporter -path ./build -group -major
# rotate output: versions as rows, tests as columns
junit-reporter -path ./build -rotateExporting:
# export CSV to a file (and still print table)
junit-reporter -path ./build -output-format csv -output-file ./build/report.csv
# export JSON (useful for automated processing)
junit-reporter -path ./build -output-format json -output-file ./build/report.jsonIntegration / regression workflow:
# save baseline outputs for later comparison
junit-reporter -path ./build > build/runs/run-default.txt
junit-reporter -path ./build -ticks > build/runs/run-ticks.txt
junit-reporter -path ./build -group > build/runs/run-group.txt
# after refactor/change, regenerate and diff
junit-reporter -path ./build > build/runs/post/run-default.txt
diff -u build/runs/run-default.txt build/runs/post/run-default.txtRunning tests:
go test ./... # run unit & integration tests
go test ./... -cover # show coverage