Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(suites TestSuites) ([]byte, error)
Types ¶
type Failure ¶
type Failure struct { Message string `xml:"message,attr"` Type string `xml:"type,attr"` Contents string `xml:",chardata"` }
Failure contains data related to a failed test.
type SkipMessage ¶
type SkipMessage struct {
Message string `xml:"message,attr"`
}
SkipMessage contains the reason why a testcase was skipped.
type TestCase ¶
type TestCase struct { XMLName xml.Name `xml:"testcase"` Classname string `xml:"classname,attr"` Name string `xml:"name,attr"` Time string `xml:"time,attr"` SkipMessage *SkipMessage `xml:"skipped,omitempty"` Properties []Property `xml:"properties>property,omitempty"` Failure *Failure `xml:"failure,omitempty"` }
TestCase is a single test case with its result.
type TestSuite ¶
type TestSuite struct { XMLName xml.Name `xml:"testsuite"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Skipped int `xml:"skipped,attr"` Time string `xml:"time,attr"` Name string `xml:"name,attr"` Properties []Property `xml:"properties>property,omitempty"` TestCases []TestCase Timestamp string `xml:"timestamp,attr"` }
TestSuite is a single JUnit test suite which may contain many testcases.
func NewTestSuite ¶
type TestSuites ¶
type TestSuites struct { XMLName xml.Name `xml:"testsuites"` Name string `xml:"name,attr,omitempty"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Errors int `xml:"errors,attr"` Skipped int `xml:"skipped,attr"` Time string `xml:"time,attr"` Suites []TestSuite }
TestSuites is a collection of JUnit test suites.
func NewTestSuites ¶
func NewTestSuites(name string) *TestSuites
func (*TestSuites) AddSuite ¶
func (id *TestSuites) AddSuite(suite TestSuite)
func (*TestSuites) WithSuite ¶
func (id *TestSuites) WithSuite(suite TestSuite) *TestSuites
Click to show internal directories.
Click to hide internal directories.