Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failure ¶
type Failure struct { // Text provides detailed information regarding failure. It supports multi-line output. Text string `xml:",chardata" json:"text,omitempty"` // Message provides the summary of the failure Message string `xml:"message,attr" json:"message"` Type string `xml:"type,attr" json:"type,omitempty"` }
Failure defines a test failure
func NewFailure ¶
NewFailure returns the address of a newly created Failure
type Properties ¶
type Properties struct {
Property []Property `xml:"property" json:"property,omitempty"`
}
Properties defines the collection of properties
type Property ¶
type Property struct { Name string `xml:"name,attr" json:"name"` Value string `xml:"value,attr" json:"value"` }
Property are name/value pairs which can be provided in the report for things such as kuttl.version
type Testcase ¶
type Testcase struct { // Classname is a junit thing, for kuttl it is the testsuite name Classname string `xml:"classname,attr" json:"classname"` // Name is the name of the test (folder of test if not redefined by the TestStep) Name string `xml:"name,attr" json:"name"` // Time is the elapsed time of the test (and all of it's steps) Time string `xml:"time,attr" json:"time"` // Assertions is the number of asserts and errors defined in the test Assertions int `xml:"assertions,attr" json:"assertions,omitempty"` // Failure defines a failure in this testcase Failure *Failure `xml:"failure" json:"failure,omitempty"` // contains filtered or unexported fields }
Testcase is the finest grain level of reporting, it is the kuttl test (which contains steps)
type Testsuite ¶
type Testsuite struct { // Tests is the number of Testcases in the collection Tests int `xml:"tests,attr" json:"tests"` // Failures is the summary number of all failure in the collection testcases Failures int `xml:"failures,attr" json:"failures"` // Time is the duration of time for this Testsuite, this is tricky as tests run concurrently. // This is the elapse time between the start of the testsuite and the end of the latest testcase in the collection. Time string `xml:"time,attr" json:"time"` // Name is the kuttl test name Name string `xml:"name,attr" json:"name"` // Properties which are specific to this suite Properties *Properties `xml:"properties" json:"properties,omitempty"` // Testcase is a collection of test cases Testcase []*Testcase `xml:"testcase" json:"testcase,omitempty"` // contains filtered or unexported fields }
TestSuite is a collection of Testcase and is a summary of those details
func (*Testsuite) AddProperty ¶
AddProperty adds a property to a testsuite
func (*Testsuite) AddTestcase ¶
AddTestcase adds a testcase to a suite, providing stats and calculations to both
type Testsuites ¶
type Testsuites struct { // XMLName is required to refine the name (or case of the name) in the root xml element. Otherwise it adds no value and is ignored for json output. XMLName xml.Name `json:"-"` // Name is the name of the full set of tests which is possible to set in kuttl but is rarely used :) Name string `xml:"name,attr" json:"name"` // Tests is a summary value of the total number of tests for all testsuites Tests int `xml:"tests,attr" json:"tests"` // Failures is a summary value of the total number of failures for all testsuites Failures int `xml:"failures,attr" json:"failures"` // Time is the elapsed time of the entire suite of tests Time string `xml:"time,attr" json:"time"` // Properties which are for the entire set of tests Properties *Properties `xml:"properties" json:"properties,omitempty"` // Testsuite is a collection of test suites Testsuite []*Testsuite `xml:"testsuite" json:"testsuite,omitempty"` // contains filtered or unexported fields }
Testsuites is a collection of Testsuite and defines the rollup summary of all stats.
func NewSuiteCollection ¶
func NewSuiteCollection(name string) *Testsuites
NewSuiteCollection returns the address of a newly created TestSuites
func (*Testsuites) AddProperty ¶
func (ts *Testsuites) AddProperty(property Property)
AddProperty adds a property to a testsuites
func (*Testsuites) AddTestSuite ¶
func (ts *Testsuites) AddTestSuite(testsuite *Testsuite)
AddTestSuite is a convenience method to add a testsuite to the collection in testsuites
func (*Testsuites) Close ¶
func (ts *Testsuites) Close()
Close closes the report and does all end stat calculations
func (*Testsuites) NewSuite ¶
func (ts *Testsuites) NewSuite(name string) *Testsuite
NewSuite creates and assigns a TestSuite to the TestSuites (then returns the suite)