Documentation ¶
Index ¶
- Variables
- func CSVToMap(reader io.Reader) ([]map[string]string, error)
- func MakeSuccessExecution(out []byte) (result testkube.ExecutionResult)
- func ParseJTLReport(report io.Reader, resultOutput []byte) (testkube.ExecutionResult, error)
- type AssertionResult
- type CSVResult
- type CSVResults
- type Example
- type TestResult
- type Testcase
- type Testsuite
- type Testsuites
- type XMLResults
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyReport = errors.New("empty JTL report")
Functions ¶
func CSVToMap ¶
CSVToMap takes a reader and returns an array of dictionaries, using the header row as the keys
func MakeSuccessExecution ¶
func MakeSuccessExecution(out []byte) (result testkube.ExecutionResult)
func ParseJTLReport ¶
Types ¶
type AssertionResult ¶
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 CSVResult ¶
type CSVResult struct { Success bool Error string Label string ResponseCode string Duration time.Duration }
func MapElementToResult ¶
type CSVResults ¶
type Example ¶
type Example struct { Time int `xml:"t,attr"` Success bool `xml:"s,attr"` Label string `xml:"lb,attr"` ResponseCode string `xml:"rc,attr"` AssertionResult *AssertionResult `xml:"assertionResult"` }
Example is example details
type TestResult ¶
type TestResult struct { Message string `xml:"message,attr"` Type string `xml:"type,attr,omitempty"` }
TestResult represents the result of a testcase
type Testcase ¶
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 ¶
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 ¶
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.