Documentation
¶
Overview ¶
Package junit describes the test-infra definition of "junit", and provides utilities to parse it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties struct {
PropertyList []Property `xml:"property"`
}
Properties defines the xml element that stores the list of properties that are associated with one benchmark.
type Property ¶
Property defines the xml element that stores additional metrics about each benchmark.
type Result ¶
type Result struct {
Name string `xml:"name,attr"`
Time float64 `xml:"time,attr"`
ClassName string `xml:"classname,attr"`
Failure *string `xml:"failure,omitempty"`
Output *string `xml:"system-out,omitempty"`
Error *string `xml:"system-err,omitempty"`
Errored *string `xml:"error,omitempty"`
Skipped *string `xml:"skipped,omitempty"`
Properties *Properties `xml:"properties,omitempty"`
}
Result holds <testcase/> results
func (Result) Message ¶
Message extracts the message for the junit test case.
Will use the first non-empty <error/>, <failure/>, <skipped/>, <system-err/>, <system-out/> value.
func (*Result) SetProperty ¶
SetProperty adds the specified property to the Result or replaces the existing value if a property with that name already exists.
type Suite ¶
type Suite struct {
XMLName xml.Name `xml:"testsuite"`
Suites []Suite `xml:"testsuite"`
Name string `xml:"name,attr"`
Time float64 `xml:"time,attr"` // Seconds
Failures int `xml:"failures,attr"`
Tests int `xml:"tests,attr"`
Results []Result `xml:"testcase"`
}
Suite holds <testsuite/> results