https://github.com/opendevstack/junit-testsuites
Utility tool to combine multiple JUnit testsuite files into one
https://github.com/opendevstack/junit-testsuites
Last synced: 3 months ago
JSON representation
Utility tool to combine multiple JUnit testsuite files into one
- Host: GitHub
- URL: https://github.com/opendevstack/junit-testsuites
- Owner: opendevstack
- License: apache-2.0
- Created: 2023-11-07T15:22:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-09T09:36:08.000Z (over 1 year ago)
- Last Synced: 2025-01-25T00:20:11.844Z (5 months ago)
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# junit-testsuites
This repository provides a simple utility tool (`combine-junit-testsuites`) to combine multiple JUnit XML files, each representing one testsuite, into a single JUnit XML file representing multiple testsuites.
The main functionality is also available as a [Go package](https://pkg.go.dev/github.com/opendevstack/junit-testsuites/combine).
## Usage (CLI)
```
go install github.com/opendevstack/junit-testsuites/cmd/combine-junit-testsuites@latestcombine-junit-testsuites "build/test-results/test/*.xml" > combined.xml
```## Usage (Go)
```
import (
"log"
"os""github.com/opendevstack/junit-testsuites/combine"
)opts := combine.Options{
FilesGlob: "*.xml",
Name: "combined",
KeepStdout: false,
KeepStderr: false,
}
if err := combine.CombineTestsuites(os.Stdout, opts); err != nil {
log.Fatal(err)
}
```## Background Information
See https://github.com/windyroad/JUnit-Schema for more information on the JUnit XML schema.
The main functionality of this repository is implemented using the [github.com/jstemmer/go-junit-report/v2/junit](https://pkg.go.dev/github.com/jstemmer/go-junit-report/v2/junit) package.