api

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JUnitCounter

type JUnitCounter struct {
	Total    int
	Skipped  int
	Failures int
	Pass     int
}

type JUnitXMLParser

type JUnitXMLParser struct {
	XMLFile  string
	Parsed   *TestSuite
	Counters *JUnitCounter
	Failures []string
	Cases    []*TestCase
}

func NewJUnitXMLParser

func NewJUnitXMLParser(xmlFile string) (*JUnitXMLParser, error)

type Property

type Property struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type TestCase

type TestCase struct {
	Name      string      `xml:"name,attr"`
	Time      string      `xml:"time,attr"`
	Failure   string      `xml:"failure"`
	Skipped   propSkipped `xml:"skipped"`
	SystemOut string      `xml:"system-out"`
	Status    TestStatus
}

type TestStatus

type TestStatus string

Parse the XML data (JUnit created by openshift-tests)

const (
	TestStatusPass    TestStatus = "pass"
	TestStatusFail    TestStatus = "fail"
	TestStatusSkipped TestStatus = "skipped"
)

type TestSuite

type TestSuite struct {
	XMLName    xml.Name   `xml:"testsuite"`
	Name       string     `xml:"name,attr"`
	Tests      int        `xml:"tests,attr"`
	Skipped    int        `xml:"skipped,attr"`
	Failures   int        `xml:"failures,attr"`
	Time       string     `xml:"time,attr"`
	Property   Property   `xml:"property"`
	Properties Property   `xml:"properties,omitempty"`
	TestCases  []TestCase `xml:"testcase"`
}

type TestSuites

type TestSuites struct {
	Tests     int       `xml:"tests,attr"`
	Disabled  int       `xml:"disabled,attr"`
	Errors    int       `xml:"errors,attr"`
	Failures  int       `xml:"failures,attr"`
	Time      string    `xml:"time,attr"`
	TestSuite TestSuite `xml:"testsuite"`
}

Jump to

Keyboard shortcuts

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