Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssertionResult ¶ added in v1.13.4
type AssertionResult struct { XMLName xml.Name `xml:"assertionResult"` Name string `xml:"name"` Failure bool `xml:"failure"` Error bool `xml:"error"` FailureMessage string `xml:"failureMessage"` }
AssertionResult contains assertion
type HTTPSample ¶ added in v1.13.4
type HTTPSample struct { XMLName xml.Name `xml:"httpSample"` Time int `xml:"t,attr"` Success bool `xml:"s,attr"` Label string `xml:"lb,attr"` ResponseCode string `xml:"rc,attr"` AssertionResult *AssertionResult `xml:"assertionResult"` }
HTTPSample is http sample details
type Result ¶
type Result struct { Success bool Error string Label string ResponseCode string Duration time.Duration }
func MapElementToResult ¶
type TestResult ¶ added in v1.13.4
type TestResult struct { Message string `xml:"message,attr"` Type string `xml:"type,attr,omitempty"` }
TestResult represents the result of a testcase
type TestResults ¶ added in v1.13.4
type TestResults struct { XMLName xml.Name `xml:"testResults"` HTTPSamples []HTTPSample `xml:"httpSample,omitempty"` }
TestResults is a root element of junit xml report
func ParseXML ¶ added in v1.13.4
func ParseXML(data []byte) (results TestResults, err error)
type Testcase ¶ added in v1.13.4
type Testcase struct { XMLName xml.Name `xml:"testcase"` Name string `xml:"name,attr"` ClassName string `xml:"classname,attr"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr,omitempty"` File string `xml:"file,attr,omitempty"` Line int `xml:"line,attr,omitempty"` Skipped *TestResult `xml:"skipped,omitempty"` Failure *TestResult `xml:"failure,omitempty"` Error *TestResult `xml:"error,omitempty"` }
Testcase define a testcase
type Testsuite ¶ added in v1.13.4
type Testsuite struct { XMLName xml.Name `xml:"testsuite"` Testcases []Testcase `xml:"testcase"` Name string `xml:"name,attr"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Errors int `xml:"errors,attr"` Skipped int `xml:"skipped,attr,omitempty"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr"` Timestamp string `xml:"timestamp,attr,omitempty"` File string `xml:"file,attr,omitempty"` }
Testsuite contains testsuite definition
type Testsuites ¶ added in v1.13.4
type Testsuites struct { XMLName xml.Name `xml:"testsuites"` Testsuites []Testsuite `xml:"testsuite,omitempty"` Name string `xml:"name,attr,omitempty"` Tests int `xml:"tests,attr,omitempty"` Failures int `xml:"failures,attr,omitempty"` Errors int `xml:"errors,attr,omitempty"` Skipped int `xml:"skipped,attr,omitempty"` Assertions int `xml:"assertions,attr,omitempty"` Time float32 `xml:"time,attr,omitempty"` Timestamp string `xml:"timestamp,attr,omitempty"` }
Testsuites is a root element of junit report
Click to show internal directories.
Click to hide internal directories.