junit

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Failure

type Failure struct {
	XMLName        xml.Name `xml:"failure"`
	Message        string   `xml:"message,attr"`
	FailureType    string   `xml:"type,attr"`
	FailureContent string   `xml:",cdata"`
}

Failure from jUnit report

type TestCase

type TestCase struct {
	XMLName    xml.Name `xml:"testcase"`
	ClassName  string   `xml:"classname,attr"`
	Name       string   `xml:"name,attr"`
	Time       float64  `xml:"time,attr"`
	Failure    *Failure `xml:"failure,omitempty"`
	Assertions int      `xml:"assertions,attr"`
}

TestCase from jUnit report

func (*TestCase) IsPassed

func (test *TestCase) IsPassed() bool

IsPassed returns true if there were not error with the tests

type TestSuite

type TestSuite struct {
	XMLName   xml.Name   `xml:"testsuite"`
	Tests     int        `xml:"tests,attr"`
	Failures  int        `xml:"failures,attr"`
	Time      float64    `xml:"time,attr"`
	Name      string     `xml:"name,attr"`
	TestCases []TestCase `xml:"testcase"`
}

TestSuite from jUnit report

type TestSuites

type TestSuites struct {
	XMLName  xml.Name    `xml:"testsuites"`
	Name     string      `xml:"name,attr"`
	Failures int         `xml:"failures,attr"`
	Time     float64     `xml:"time,attr"`
	Tests    int         `xml:"tests,attr"`
	Suites   []TestSuite `xml:"testsuite"`
}

TestSuites from jUnit report

func (*TestSuites) Aggregate

func (suites *TestSuites) Aggregate(anotherSuite *TestSuites)

Aggregate includes another suites under this one

func (*TestSuites) DrawReport

func (suites *TestSuites) DrawReport() error

DrawReport prints a report in the console

func (*TestSuites) Sanitize

func (suites *TestSuites) Sanitize()

Sanitize will clean the name of some of the tests and remove the artifacts test (which is created by KUTTL and does nothing)

func (*TestSuites) SetTestSuiteName

func (suites *TestSuites) SetTestSuiteName(newSuiteName string) error

SetTestSuiteName sets the name for a single test suite. This is needed because KUTTL doesn't set the name of the suites

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL