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
Click to show internal directories.
Click to hide internal directories.