junitxml

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttachmentRegex = `\[\[ATTACHMENT\|(?<path>[^\[\]\|]+?)\]\]`
	PropertyRegex   = `\[\[PROPERTY\|(?<name>[^\[\]\|=]+)=(?<value>[^\[\]\|=]+)\]\]`
)

Variables

This section is empty.

Functions

func ConvertTestReport

func ConvertTestReport(xmlReport TestReport, job types.JobReference) (types.TestReport, []types.TestSuite, []types.TestCase)

func ParseTextAttachments

func ParseTextAttachments(s string) []string

Types

type Error

type Error struct {
	// XMLName xml.Name `xml:"error"`
	Message string `xml:"message,attr"`
	Type    string `xml:"type,attr"`
	Text    string `xml:",chardata"`
}

func (*Error) Output

func (e *Error) Output() string

type Failure

type Failure struct {
	// XMLName xml.Name `xml:"failure"`
	Message string `xml:"message,attr"`
	Type    string `xml:"type,attr"`
	Text    string `xml:",chardata"`
}

func (*Failure) Output

func (f *Failure) Output() string

type Property

type Property struct {
	// XMLName xml.Name `xml:"property"`
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
	Text  string `xml:",chardata"`
}

func ParseTextProperties

func ParseTextProperties(s string) []Property

type Skipped

type Skipped struct {
	// XMLName xml.Name `xml:"skipped"`
	Message string `xml:"message,attr"`
}

type SystemErr

type SystemErr struct {
	// XMLName xml.Name `xml:"system-err"`
	Text string `xml:",chardata"`
}

type SystemOut

type SystemOut struct {
	// XMLName xml.Name `xml:"system-out"`
	Text string `xml:",chardata"`
}

type TestCase

type TestCase struct {
	// XMLName   xml.Name  `xml:"testcase"`
	Name       string     `xml:"name,attr"`
	Classname  string     `xml:"classname,attr"`
	Tests      int64      `xml:"tests,attr"`
	Time       float64    `xml:"time,attr"`
	File       string     `xml:"file,attr"`
	Line       int64      `xml:"line,attr"`
	Failure    *Failure   `xml:"failure"`
	Error      *Error     `xml:"error"`
	Skipped    *Skipped   `xml:"skipped"`
	Properties []Property `xml:"properties>property"`
	SystemOut  *SystemOut `xml:"system-out"`
	SystemErr  *SystemErr `xml:"system-err"`
}

type TestReport

type TestReport struct {
	XMLName    xml.Name    `xml:"testsuites"`
	Tests      int64       `xml:"tests,attr"`
	Failures   int64       `xml:"failures,attr"`
	Errors     int64       `xml:"errors,attr"`
	Skipped    int64       `xml:"skipped,attr"`
	Time       float64     `xml:"time,attr"`
	Timestamp  string      `xml:"timestamp,attr"`
	TestSuites []TestSuite `xml:"testsuite"`
}

func Parse

func Parse(r io.Reader) (TestReport, error)

type TestSuite

type TestSuite struct {
	// XMLName    xml.Name   `xml:"testsuite"`
	Name       string     `xml:"name,attr"`
	Tests      int64      `xml:"tests,attr"`
	Failures   int64      `xml:"failures,attr"`
	Errors     int64      `xml:"errors,attr"`
	Skipped    int64      `xml:"skipped,attr"`
	Time       float64    `xml:"time,attr"`
	Timestamp  string     `xml:"timestamp,attr"`
	File       string     `xml:"file,attr"`
	Properties []Property `xml:"properties>property"`
	SystemOut  SystemOut  `xml:"system-out"`
	SystemErr  SystemErr  `xml:"system-err"`
	TestCases  []TestCase `xml:"testcase"`
}

Jump to

Keyboard shortcuts

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