Documentation ¶
Index ¶
Constants ¶
const JunitFileName = "junit.xml"
JunitFileName is the name of the JUnit report.
Variables ¶
This section is empty.
Functions ¶
func GetFailedEspressoTests ¶ added in v0.148.0
GetFailedEspressoTests get failed espresso test list from testcases.
func GetFailedXCUITests ¶ added in v0.148.0
GetFailedXCUITests get failed XCUITest test list from testcases.
Types ¶
type Reporter ¶ added in v0.62.0
type Reporter struct { TestResults []report.TestResult Filename string // contains filtered or unexported fields }
Reporter is a junit implementation for report.Reporter.
func (*Reporter) Add ¶ added in v0.62.0
func (r *Reporter) Add(t report.TestResult)
Add adds the test result to the summary.
func (*Reporter) ArtifactRequirements ¶ added in v0.62.0
func (r *Reporter) ArtifactRequirements() []report.ArtifactType
ArtifactRequirements returns a list of artifact types are this reporter requires to create a proper report.
type TestCase ¶
type TestCase struct { Name string `xml:"name,attr"` Assertions string `xml:"assertions,attr,omitempty"` Time string `xml:"time,attr"` Timestamp string `xml:"timestamp,attr"` ClassName string `xml:"classname,attr"` Status string `xml:"status,attr,omitempty"` SystemOut string `xml:"system-out,omitempty"` Error string `xml:"error,omitempty"` Failure string `xml:"failure,omitempty"` }
TestCase maps to <testcase> element
func CollectTestCases ¶ added in v0.144.0
func CollectTestCases(testsuites TestSuites) []TestCase
CollectTestCases collects testcases from a report.
type TestSuite ¶
type TestSuite struct { Name string `xml:"name,attr"` Tests int `xml:"tests,attr"` Properties []Property `xml:"properties>property"` 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"` TestCases []TestCase `xml:"testcase"` SystemOut string `xml:"system-out,omitempty"` }
TestSuite maps to <testsuite> element
type TestSuites ¶
type TestSuites struct { XMLName xml.Name `xml:"testsuites"` TestSuites []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