Documentation ¶
Overview ¶
Package junit provides simplified structures for JUnit test reports.
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" json:"name"` File string `xml:"file,attr" json:"file"` Status TestCaseStatus `xml:"status,attr" json:"status"` Time *time.Duration `xml:"time,attr,omitempty" json:"time,omitempty"` Started *time.Time `xml:"started,attr,omitempty" json:"started,omitempty"` Message string `xml:"message,omitempty" json:"message,omitempty"` }
TestCase information
func NewTestCase ¶
NewTestCase creates a new TestCase
func (*TestCase) Finish ¶
func (tc *TestCase) Finish(status TestCaseStatus, message ...string)
Finish the TestCase
type TestCaseStatus ¶ added in v0.8.10
type TestCaseStatus string
TestCaseStatus represents the status of the test case
const ( Passed TestCaseStatus = "passed" Failed TestCaseStatus = "failed" Error TestCaseStatus = "error" Skipped TestCaseStatus = "skipped" )
type TestSuite ¶
type TestSuite struct { Name string `xml:"name,attr" json:"name"` Total int `xml:"tests,attr" json:"tests"` Passed int `xml:"passed,attr" json:"passed"` Skipped int `xml:"skipped,attr" json:"skipped"` Failures int `xml:"failures,attr" json:"failures"` Errors int `xml:"errors,attr" json:"errors"` TestCase []TestCase `xml:"testcase" json:"testcase"` Started time.Time `xml:"started,attr" json:"timestamp"` Time time.Duration `xml:"time,attr" json:"time"` Message string `xml:"message,omitempty" json:"message,omitempty"` }
TestSuite information
Click to show internal directories.
Click to hide internal directories.