junit

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCase

type TestCase struct {
	Name       string `xml:"name,attr"`
	Assertions string `xml:"assertions,attr"`
	Time       string `xml:"time,attr"`
	ClassName  string `xml:"classname,attr"`
	Status     string `xml:"status,attr"`
	SystemOut  string `xml:"system-out"`
	Error      string `xml:"error"`
	Failure    string `xml:"failure"`
}

TestCase maps to <testcase> element

type TestSuite

type TestSuite struct {
	Name      string     `xml:"name,attr"`
	Tests     int        `xml:"tests,attr"`
	Errors    int        `xml:"errors,attr,omitempty"`
	Failures  int        `xml:"failures,attr,omitempty"`
	Disabled  int        `xml:"disabled,attr,omitempty"`
	Skipped   int        `xml:"skipped,attr,omitempty"`
	Time      string     `xml:"time,attr,omitempty"`
	Timestamp string     `xml:"timestamp,attr,omitempty"`
	Package   string     `xml:"package,attr,omitempty"`
	TestCase  []TestCase `xml:"testcase"`
	SystemOut string     `xml:"system-out"`
}

TestSuite maps to <testsuite> element

type TestSuites

type TestSuites struct {
	XMLName   xml.Name    `xml:"testsuites"`
	TestSuite []TestSuite `xml:"testsuite"`
	Name      string      `xml:"name,attr,omitempty"`
	Time      string      `xml:"time,attr,omitempty"`
	Tests     int         `xml:"tests,attr,omitempty"`
	Failures  int         `xml:"failures,attr,omitempty"`
	Disabled  int         `xml:"disabled,attr,omitempty"`
	Errors    int         `xml:"errors,attr,omitempty"`
}

TestSuites maps to root junit <testsuites> element

func Parse

func Parse(data []byte) (TestSuites, error)

Parse parses an xml-encoded byte string and returns a `TestSuites` struct The root <testsuites> element is optional so if its missing, Parse will parse a <testsuite> and wrap it in a `TestSuites` struct

Jump to

Keyboard shortcuts

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