junit

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	XMLName xml.Name `xml:"error"`

	Message string `xml:"message,attr,omitempty"`
	Type    string `xml:"type,attr"`

	Value string `xml:",chardata"`
}

Error represents an error information in a test case.

type Failure

type Failure struct {
	XMLName xml.Name `xml:"failure"`

	Message string `xml:"message,attr,omitempty"`
	Type    string `xml:"type,attr"`

	Value string `xml:",chardata"`
}

Failure represents a failure information in a test case.

type Properties

type Properties struct {
	Properties []Property `xml:"property"`
}

Properties represents additional information of a test suite.

type Property

type Property struct {
	XMLName xml.Name `xml:"property"`

	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

Property represents a property in Properties.

type Skipped

type Skipped struct {
	XMLName xml.Name `xml:"skipped"`

	Message string `xml:"message,attr,omitempty"`
}

Skipped represents a skipped information in a test case.

type TestCase

type TestCase struct {
	XMLName xml.Name `xml:"testcase"`

	Name      string  `xml:"name,attr"`
	Classname string  `xml:"classname,attr"`
	Status    string  `xml:"status,attr,omitempty"`
	Time      float64 `xml:"time,attr"`

	Skipped *Skipped `xml:"skipped,omitempty"`
	Error   *Error   `xml:"error,omitempty"`
	Failure *Failure `xml:"failure,omitempty"`

	SystemOut string `xml:"system-out,omitempty"`
	SystemErr string `xml:"system-err,omitempty"`
}

TestCase represents a single test case within a test suite.

type TestSuite

type TestSuite struct {
	XMLName xml.Name `xml:"testsuite"`

	Name      string  `xml:"name,attr"`
	ID        int     `xml:"id,attr"`
	Package   string  `xml:"package,attr"`
	Tests     int     `xml:"tests,attr"`
	Disabled  int     `xml:"disabled,attr,omitempty"`
	Errors    int     `xml:"errors,attr"`
	Failures  int     `xml:"failures,attr"`
	Skipped   int     `xml:"skipped,attr,omitempty"`
	Time      float64 `xml:"time,attr"`
	Timestamp string  `xml:"timestamp,attr"`
	Hostname  string  `xml:"hostname,attr,omitempty"`

	Properties *Properties `xml:"properties,omitempty"`

	TestCases []*TestCase `xml:"testcase"`

	SystemOut string `xml:"system-out,omitempty"`
	SystemErr string `xml:"system-err,omitempty"`
}

TestSuite represents collection of test cases.

type TestSuites

type TestSuites struct {
	XMLName xml.Name `xml:"testsuites"`

	Tests    int     `xml:"tests,attr"`
	Disabled int     `xml:"disabled,attr"`
	Errors   int     `xml:"errors,attr"`
	Failures int     `xml:"failures,attr"`
	Time     float64 `xml:"time,attr"`

	TestSuites []*TestSuite `xml:"testsuite"`
}

TestSuites represents collection of test suites.

func (*TestSuites) WriteReport

func (ts *TestSuites) WriteReport(w io.Writer) error

WriteReport writes Junit XML output to a writer interface.

Jump to

Keyboard shortcuts

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