junit-testsuites

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: Apache-2.0

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.

Usage (CLI)

go install github.com/opendevstack/junit-testsuites/cmd/combine-junit-testsuites@latest

combine-junit-testsuites -junit-glob='build/test-results/test/*.xml' > combined.xml

Usage (Go)

import (
    "log"
    "os"

    "github.com/opendevstack/junit-testsuites/combine"
)

opts := combine.Options{
    JUnitGlob:  "*.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 package.

Directories

Path Synopsis
cmd
combine-junit-testsuites command
Combine multiple JUnit XML files into a single "testsuites" file.
Combine multiple JUnit XML files into a single "testsuites" file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL